Message ID | 20231020072140.900967-1-apatel@ventanamicro.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp881210vqb; Fri, 20 Oct 2023 00:22:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqlFwop6chYhCUIFEzuAwrEQcQRdZEmb9awfpx6Ougz4Wo+V2JtiVNMG3JxHdCBra/AfpL X-Received: by 2002:a05:6358:904c:b0:166:9c14:a838 with SMTP id f12-20020a056358904c00b001669c14a838mr1089299rwf.19.1697786529456; Fri, 20 Oct 2023 00:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697786529; cv=none; d=google.com; s=arc-20160816; b=mS6DQEFgHBTArahCYZWDD3ZcIe1lVgqZDNk/oDjp9cZLvK3XDt2t8dovQDwRfF+Kd4 OO56acMm87dAdUF3DNcw39G2xl1oTEVmiAe38wul2tGQY9yHjr50PJ2tdu7CKxTd9sRv 3CLsMZm38U/x62mN4slHwrga9SnOZjsZdtQqzmAtJm1YsNaT0ly/RjS8xVEglI9BDMNr m6W7pzG5u6EdrUq26LpNzbFR/XT5VK+lCNHz3GRbo41vcXzmiaOXlBK9W7VAAIbkZVaj +RDd0FfAPztwVbofpPjTcUDtJZnGLAVS9GZkUCAmesARJtUDkMATQwE0e0Vj5JB7nz3A hwUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vbaUx5tgc13C+fDPGJz++EpIqc5R/EjgaTQRdQ/gzH0=; fh=7GYORjoWw1oF4BCDuq40hd+MOEKRwzNqXwnZ/K2vS9Q=; b=LMKpZPJ3r8tWKKmV8G+RLNFP09Ir1Ju/y4/3YYE2a79Bek+4R/kc62OaQtlzolwP5O z47wPsCvrzWz8Y+N/915iziUmMIlmF82YxFfUtGQtEQdnij9Yxl92U+PWi2F/SqKXeLw uqTicVKlnm1NSmWMtH67e1yI4K3Yojmyg5JJqPavG913TCwmjU64TEXDPePu7OEkX5yL X/SkjQI7vmqs4m2xGLsqWUeaQsKass9o2E2wnDVw+4cQQd8IGOq4HWVldctdcT2zVRJ7 oNJ3/JG44Jx/8BauTqazcR8VrIZN9f76kQIp75ZfIZ6w0gfoXPFsDJKwcU4tCqRQgOeD ycFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=IQJxLwRn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id a184-20020a6390c1000000b0057c7d7036b8si1352533pge.389.2023.10.20.00.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 00:22:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=IQJxLwRn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 51B71837CF31; Fri, 20 Oct 2023 00:22:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376388AbjJTHVx (ORCPT <rfc822;lkml4gm@gmail.com> + 25 others); Fri, 20 Oct 2023 03:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbjJTHVw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Oct 2023 03:21:52 -0400 Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F501A3 for <linux-kernel@vger.kernel.org>; Fri, 20 Oct 2023 00:21:50 -0700 (PDT) Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-581edcde26cso281699eaf.1 for <linux-kernel@vger.kernel.org>; Fri, 20 Oct 2023 00:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1697786510; x=1698391310; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vbaUx5tgc13C+fDPGJz++EpIqc5R/EjgaTQRdQ/gzH0=; b=IQJxLwRnkVJswQiTcQ3xGR/+3EunbGluullE4WmjRR1F3aiazKBSlwTp3x6/MDhojj 7wgvd9gAOfUGEbtRVNUKCD/tVmzRyeN3gpaJJTGSrwZWs9qZtz2mk3tM7NmJGVxAOGi1 gRHv/MxPhOODdRGWEMk0c4RB/uOVuX6+tc5lJ64YK7NANRncHXaezJ34/1M4iFHI0dSd syTMDZgoJhnJ+pWmDd0bz0aQGF/ArsTDkXb0QZGr7oKjhK89aZP3sxZ7BoD7ZIPmj4oY ZdsaU5zldRjJhSOCPJnNH8pYLrJV5ji6LcsVv7t9sVfhQkYwjTfrIGqkurVDAnomQ8+m q2sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697786510; x=1698391310; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vbaUx5tgc13C+fDPGJz++EpIqc5R/EjgaTQRdQ/gzH0=; b=fWPlYKk+v0zzeHBEfMnVPB1sCWkoisKL7xkxf/bLjpsoaxhNk4V0ZopLtzw3VW3C1E Fuyd/ZiCG4vzNVWXLozp/3swcg4w6iwd8pCrXy4PSJxKnUZRk4gNMegH9DpGtRA3m+oe 2uA/g+qmfUCq1YRC2FK8rF2ImR0NkhEgth/PnT1m45JZGMAZ3+2UFJH/UdB2wggPx430 5XWCkUiPW9wrzE0QLYYTUC+z9hFZoXGABskfT611t6Qg3L2QJtYKxeJ1niPxwy9Yl4iN h7OIrm+oH9FhJaLysiiJF5oiJYWpN6bMCXFtRbv3C8l69kX4s+E28Lefnr5uBfiOoPvh xdIw== X-Gm-Message-State: AOJu0YzvWoNQWDd7LYH18nV4lKX7Q66XYRsEYi4vksxTcaBrkYC77Uw3 ZdOZCNwVqUSVwoz1WnmStOYX+g== X-Received: by 2002:a05:6358:5927:b0:168:a3b2:945a with SMTP id g39-20020a056358592700b00168a3b2945amr1087904rwf.0.1697786509722; Fri, 20 Oct 2023 00:21:49 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([171.76.83.81]) by smtp.gmail.com with ESMTPSA id v12-20020a63f20c000000b005b32d6b4f2fsm828204pgh.81.2023.10.20.00.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 00:21:49 -0700 (PDT) From: Anup Patel <apatel@ventanamicro.com> To: Paolo Bonzini <pbonzini@redhat.com>, Atish Patra <atishp@atishpatra.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org> Cc: Conor Dooley <conor@kernel.org>, Andrew Jones <ajones@ventanamicro.com>, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Anup Patel <apatel@ventanamicro.com> Subject: [PATCH v3 0/9] RISC-V SBI debug console extension support Date: Fri, 20 Oct 2023 12:51:31 +0530 Message-Id: <20231020072140.900967-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 00:22:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780258207794904800 X-GMAIL-MSGID: 1780258207794904800 |
Series |
RISC-V SBI debug console extension support
|
|
Message
Anup Patel
Oct. 20, 2023, 7:21 a.m. UTC
The SBI v2.0 specification is now frozen. The SBI v2.0 specification defines SBI debug console (DBCN) extension which replaces the legacy SBI v0.1 functions sbi_console_putchar() and sbi_console_getchar(). (Refer v2.0-rc5 at https://github.com/riscv-non-isa/riscv-sbi-doc/releases) This series adds support for SBI debug console (DBCN) extension in KVM RISC-V and Linux RISC-V. To try these patches with KVM RISC-V, use KVMTOOL from riscv_sbi_dbcn_v1 branch at: https://github.com/avpatel/kvmtool.git These patches can also be found in the riscv_sbi_dbcn_v3 branch at: https://github.com/avpatel/linux.git Changes since v2: - Rebased on Linux-6.6-rc5 - Handled page-crossing in PATCH7 of v2 series - Addressed Drew's comment in PATCH3 of v2 series - Added new PATCH5 to make get-reg-list test aware of SBI DBCN extension Changes since v1: - Remove use of #ifdef from PATCH4 and PATCH5 of the v1 series - Improved commit description of PATCH3 in v1 series - Introduced new PATCH3 in this series to allow some SBI extensions (such as SBI DBCN) do to disabled by default so that older KVM user space work fine and newer KVM user space have to explicitly opt-in for emulating SBI DBCN. - Introduced new PATCH5 in this series which adds inline version of sbi_console_getchar() and sbi_console_putchar() for the case where CONFIG_RISCV_SBI_V01 is disabled. Anup Patel (8): RISC-V: Add defines for SBI debug console extension RISC-V: KVM: Change the SBI specification version to v2.0 RISC-V: KVM: Allow some SBI extensions to be disabled by default RISC-V: KVM: Forward SBI DBCN extension to user-space KVM: riscv: selftests: Add SBI DBCN extension to get-reg-list test RISC-V: Add stubs for sbi_console_putchar/getchar() tty/serial: Add RISC-V SBI debug console based earlycon RISC-V: Enable SBI based earlycon support Atish Patra (1): tty: Add SBI debug console support to HVC SBI driver arch/riscv/configs/defconfig | 1 + arch/riscv/configs/rv32_defconfig | 1 + arch/riscv/include/asm/kvm_vcpu_sbi.h | 7 +- arch/riscv/include/asm/sbi.h | 12 +++ arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu.c | 6 ++ arch/riscv/kvm/vcpu_sbi.c | 61 +++++++------- arch/riscv/kvm/vcpu_sbi_replace.c | 32 ++++++++ drivers/tty/hvc/Kconfig | 2 +- drivers/tty/hvc/hvc_riscv_sbi.c | 82 +++++++++++++++++-- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/earlycon-riscv-sbi.c | 32 +++++++- .../selftests/kvm/riscv/get-reg-list.c | 2 + 13 files changed, 198 insertions(+), 43 deletions(-)
Comments
On Fri, Oct 20, 2023 at 12:51 PM Anup Patel <apatel@ventanamicro.com> wrote: > > The SBI v2.0 specification is now frozen. The SBI v2.0 specification defines > SBI debug console (DBCN) extension which replaces the legacy SBI v0.1 > functions sbi_console_putchar() and sbi_console_getchar(). > (Refer v2.0-rc5 at https://github.com/riscv-non-isa/riscv-sbi-doc/releases) > > This series adds support for SBI debug console (DBCN) extension in KVM RISC-V > and Linux RISC-V. > > To try these patches with KVM RISC-V, use KVMTOOL from riscv_sbi_dbcn_v1 > branch at: https://github.com/avpatel/kvmtool.git > > These patches can also be found in the riscv_sbi_dbcn_v3 branch at: > https://github.com/avpatel/linux.git > > Changes since v2: > - Rebased on Linux-6.6-rc5 > - Handled page-crossing in PATCH7 of v2 series > - Addressed Drew's comment in PATCH3 of v2 series > - Added new PATCH5 to make get-reg-list test aware of SBI DBCN extension > > Changes since v1: > - Remove use of #ifdef from PATCH4 and PATCH5 of the v1 series > - Improved commit description of PATCH3 in v1 series > - Introduced new PATCH3 in this series to allow some SBI extensions > (such as SBI DBCN) do to disabled by default so that older KVM user space > work fine and newer KVM user space have to explicitly opt-in for emulating > SBI DBCN. > - Introduced new PATCH5 in this series which adds inline version of > sbi_console_getchar() and sbi_console_putchar() for the case where > CONFIG_RISCV_SBI_V01 is disabled. > > Anup Patel (8): > RISC-V: Add defines for SBI debug console extension > RISC-V: KVM: Change the SBI specification version to v2.0 > RISC-V: KVM: Allow some SBI extensions to be disabled by default > RISC-V: KVM: Forward SBI DBCN extension to user-space > KVM: riscv: selftests: Add SBI DBCN extension to get-reg-list test > RISC-V: Add stubs for sbi_console_putchar/getchar() > tty/serial: Add RISC-V SBI debug console based earlycon > RISC-V: Enable SBI based earlycon support > > Atish Patra (1): > tty: Add SBI debug console support to HVC SBI driver Queued PATCH1 to PATCH5 for Linux-6.7 Remaining PATCH6 to PATCH9 are still under review. Thanks, Anup > > arch/riscv/configs/defconfig | 1 + > arch/riscv/configs/rv32_defconfig | 1 + > arch/riscv/include/asm/kvm_vcpu_sbi.h | 7 +- > arch/riscv/include/asm/sbi.h | 12 +++ > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu.c | 6 ++ > arch/riscv/kvm/vcpu_sbi.c | 61 +++++++------- > arch/riscv/kvm/vcpu_sbi_replace.c | 32 ++++++++ > drivers/tty/hvc/Kconfig | 2 +- > drivers/tty/hvc/hvc_riscv_sbi.c | 82 +++++++++++++++++-- > drivers/tty/serial/Kconfig | 2 +- > drivers/tty/serial/earlycon-riscv-sbi.c | 32 +++++++- > .../selftests/kvm/riscv/get-reg-list.c | 2 + > 13 files changed, 198 insertions(+), 43 deletions(-) > > -- > 2.34.1 > > > -- > kvm-riscv mailing list > kvm-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kvm-riscv
Hello: This series was applied to riscv/linux.git (fixes) by Anup Patel <anup@brainfault.org>: On Fri, 20 Oct 2023 12:51:31 +0530 you wrote: > The SBI v2.0 specification is now frozen. The SBI v2.0 specification defines > SBI debug console (DBCN) extension which replaces the legacy SBI v0.1 > functions sbi_console_putchar() and sbi_console_getchar(). > (Refer v2.0-rc5 at https://github.com/riscv-non-isa/riscv-sbi-doc/releases) > > This series adds support for SBI debug console (DBCN) extension in KVM RISC-V > and Linux RISC-V. > > [...] Here is the summary with links: - [v3,1/9] RISC-V: Add defines for SBI debug console extension https://git.kernel.org/riscv/c/dadf7886993c - [v3,2/9] RISC-V: KVM: Change the SBI specification version to v2.0 https://git.kernel.org/riscv/c/b88e87a0a1ec - [v3,3/9] RISC-V: KVM: Allow some SBI extensions to be disabled by default https://git.kernel.org/riscv/c/56d8a385b605 - [v3,4/9] RISC-V: KVM: Forward SBI DBCN extension to user-space https://git.kernel.org/riscv/c/c667ad229d13 - [v3,5/9] KVM: riscv: selftests: Add SBI DBCN extension to get-reg-list test https://git.kernel.org/riscv/c/d9c00f44e5de - [v3,6/9] RISC-V: Add stubs for sbi_console_putchar/getchar() (no matching commit) - [v3,7/9] tty/serial: Add RISC-V SBI debug console based earlycon (no matching commit) - [v3,8/9] tty: Add SBI debug console support to HVC SBI driver (no matching commit) - [v3,9/9] RISC-V: Enable SBI based earlycon support (no matching commit) You are awesome, thank you!