Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp941606rdb; Fri, 20 Oct 2023 04:14:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4FFJ2am8cQN5kX98NZdu66scv05YBlDcQjpIMI2NiJ1XULJW++l9pvC/ZdSWnrXoCu/+x X-Received: by 2002:a05:6602:2cc4:b0:787:8cf:fe8a with SMTP id j4-20020a0566022cc400b0078708cffe8amr2289883iow.2.1697800450820; Fri, 20 Oct 2023 04:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697800450; cv=none; d=google.com; s=arc-20160816; b=dtolB5o/YWntviulKbxoud5JFLW4R164/wkL/fdP7UDHWwNt3eO8odQt3htn1lrhFM X4B0jzXDwsJkdQWaNIDxLnk5LzI2lMEQpInLYYslv3d7q4CD1qA7VtSRzY6A3X29r/+b jCH4pyypStAI9niIgDAP6oRtL/M2F9CAM4ME1nVR6fyzO40v0virQxbUWJktNNaIsbIt 1ylqLquhXiZ17FeTKvY4QyI3uO3x5ExjqYMjBPcYBh8wUKwZa+/YjudOEeLWesnqbUPZ WPHzCqAvqN5b8qfKforo695gckjZKwHB8JM+jNBEcfrHmFi2ivrAXCtoaixk568aRSmg XNSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0Ui4lAScxS4avp7oCJ7ZH8jd7TnRHOi5lmcUoRRDmRE=; fh=3gUNhGbZlctNHsEUXkkZQf4JcLDkjBahl1D3HdnFyxs=; b=kcG5V4iDnW7KZBiWaULYx7ObpD1X5VUCR1/RRR2Pd3rrD+mt1bGa1r7bEDfQ5UUW7M L1+0z3QeyLm75Z+qGm1vJvSdmCh23mMGniXb9xk7sd5Ku5ts7EgAZzImvgpeuULXEFMa CDXqebw0vOPUaTljWQd2Dx68/b4WtNDVTawgiyxbW93ASih+UmEyRM5JMAiH3a99OJAG cmMq2h6lCpYYMcd3bpNoYLX2dSDEiK7JVLD4m8NP67/vgnYSH3TpNuZdZyEzUNWloAuE mg6+4PWp0wIA6TRFCxkZwsfFymRJjX+a14c7vM3ZlkGQOhOCkGi1HLHnfO+6BBp4khm9 WkxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20230601.gappssmtp.com header.s=20230601 header.b=Cpj3I7CB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bx35-20020a056a02052300b005ae22729b09si1947965pgb.683.2023.10.20.04.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:14:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20230601.gappssmtp.com header.s=20230601 header.b=Cpj3I7CB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id AA88B82E53E7; Fri, 20 Oct 2023 04:14:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377028AbjJTLOH (ORCPT + 99 others); Fri, 20 Oct 2023 07:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376994AbjJTLOF (ORCPT ); Fri, 20 Oct 2023 07:14:05 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73A1C1AE for ; Fri, 20 Oct 2023 04:14:02 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-3573dc94399so2616285ab.0 for ; Fri, 20 Oct 2023 04:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20230601.gappssmtp.com; s=20230601; t=1697800441; x=1698405241; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0Ui4lAScxS4avp7oCJ7ZH8jd7TnRHOi5lmcUoRRDmRE=; b=Cpj3I7CBqqtjU1eMO55yWvD4nivuNfVhBaom75clkV+yxX2/QanwvFJwSvSWTOq6F8 hvxzseN2uR1tUTfrxETJionCMWLh68iNTjgJc+A/4g12BaUSl05srD39ZQ5UfiTQ1WhY hBW1TOocPprig61gN1hS1RE8eUmlbTLraZ4P9cmk4MzurNPATRMffnJ4rElw23mLFkkY yhtp28S2up5RoAPHo2ddrNj7ZTWCr4TN7jRqT1vyby2BFlYKSL+HFBOKRH7RgW8EPnVA iEu4AIn2ZsIo3rFtvocNJQjojVQVEik0g1QD1uQJzH5J1lvAyURvMWWryagY1nBo2/8a +bBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697800441; x=1698405241; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Ui4lAScxS4avp7oCJ7ZH8jd7TnRHOi5lmcUoRRDmRE=; b=M40DXAtxybx6SdsbGytZ2WGr4Nd502feTavy78UF9ldPGI//I3yqAiCXtyrOzdgwlL E6q8yIyW3WVhiTYWt3Pnb5JibjKoytX8/VOBR8FWbNl9/BleOTWGdo22zBXQLmvtrxiJ T05ih6ZDk7I4WmKgbR58TLsWUsC9pbbYpHqzalY/H0gol1kGUFKGzYzvcUTHGRlcLD59 AOLr265KCdQL2GMeO5G3YBDg/I3cLDKP/ODVlhnMJHX72jurX/rwyqIIBjsiyW6JC+xT EgEL+GRKsNCRYXrUL7TkiD8eQWurBf5vBIXuFD+fv6Whpv2RI03ZHnKmDPme62vxDhai C/RA== X-Gm-Message-State: AOJu0YyBTDtiUt/Ye9v0YkgB/7nwb9LDM8qveVpHRiaOp69I/aK40VjR YJ1nHiGSINUNkFizuN7/AY0bnwBRFdxGgp8Qxx5png== X-Received: by 2002:a05:6e02:147:b0:357:5234:802d with SMTP id j7-20020a056e02014700b003575234802dmr1903255ilr.10.1697800441567; Fri, 20 Oct 2023 04:14:01 -0700 (PDT) MIME-Version: 1.0 References: <20231020072140.900967-1-apatel@ventanamicro.com> In-Reply-To: <20231020072140.900967-1-apatel@ventanamicro.com> From: Anup Patel Date: Fri, 20 Oct 2023 16:43:49 +0530 Message-ID: Subject: Re: [PATCH v3 0/9] RISC-V SBI debug console extension support To: Anup Patel Cc: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Greg Kroah-Hartman , Jiri Slaby , Conor Dooley , Andrew Jones , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 20 Oct 2023 04:14:09 -0700 (PDT) On Fri, Oct 20, 2023 at 12:51=E2=80=AFPM Anup Patel wrote: > > The SBI v2.0 specification is now frozen. The SBI v2.0 specification defi= nes > 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/release= s) > > This series adds support for SBI debug console (DBCN) extension in KVM RI= SC-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 sp= ace > work fine and newer KVM user space have to explicitly opt-in for emula= ting > 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