From patchwork Tue Oct 10 17:04:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1845988 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=rBjUKUVH; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=GrKnd3H4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S4j2h1p75z23jb for ; Wed, 11 Oct 2023 04:05:31 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NEyijYGiHcejOrehXCFdOd46FkdsXxal/6En2M3tPjk=; b=rBjUKUVHLVFfuf yRpqxmO97LAHeVPQOwhp3YAsnCsDfwsCIM3Q0K7j1nOvm3Vf5ROuSxkibRK71gLEh3Dp04T4J+K25 HEbGAev15+wJH0jCbk8dCe894rHpC1c6Sx/o97mRyvFKbU9fJQ0RCc9DumNTC0XQKDdOCG+/4NnlH /GBG2wX65rFokfg0dij9Okn0xP3oCNtHdlkZSzQHdVL8pKCz55kp55mG1eRXDRRQEBxhAT2Djul6S e9xzR48M3HQGf6VKToG8jmQzBabKe/+FKq01MRAwL6rKHg886/LBBzfW7dfkfVXeSl6/lafeptazc bv1DBJ6y1o8QLZtf1bQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqGAg-00DoM0-01; Tue, 10 Oct 2023 17:05:26 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqGAd-00DoGN-0Q for kvm-riscv@lists.infradead.org; Tue, 10 Oct 2023 17:05:24 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1c5bf7871dcso43884165ad.1 for ; Tue, 10 Oct 2023 10:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1696957514; x=1697562314; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WPT4Fkg+ojgLC0XZKWvgq9PlzRbEr2TYZf8y6H1Pt5Y=; b=GrKnd3H4+8HpDqLOwAmB1fwAvBoAajq0mXSo5qo/pi1Z97UO58giMKhjpoga0h0tbU DgBEPLZB5FVQLmz4IvraGrcvGVYHSLnmW35vaf14rKQnkwa0S5lAERaE4o5oX4kNyL5M YFEHCeM/AjBPl7tV6n7/8hva2+w9/m8VoPghzOmyFSfeip1N3nT0+/EuolTwoUCXc/Oi AzYmF9AEW66j8sB/4uUEeWPf0A7SqTn9QKsv1NMqkZDZsjQCSCtUCC1THiKaX2duQRqa 58737H18XMoRHHn10X+arI3HRPfV2yw9jIY2hlnMVhkrQpTF5K1+HRuZ3WNKSvpHfpF9 DhBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696957514; x=1697562314; 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=WPT4Fkg+ojgLC0XZKWvgq9PlzRbEr2TYZf8y6H1Pt5Y=; b=B1SCmHHKYvuspnbRQdzRQ07iA06R9CaXi5E8rMEtNviUZfin8+wdz2qXyCHwjZMovA g+bIAC/LUD1DFd2Y5njAvNujquEDCNblxKIgwm1OiG2np2rSvPgh76vequ55EZgMkeXF RM4qqFHfwbnyETFeU9VCxZjSDGNwULyp+RdpeHTutay9izTZINJgaS3avG43xyYynPQ2 SjdFKWxuFxctyBZ6c3WxM17cpzpPWCb3h+mQMK4VVOzhMPtLI3uCiSNWIrHhgajFvd53 jOmmLCHSJkJON5pWg8HJRGo0nyj5cUeV4e5rg851jK3LrsVJbpdaupEOpFK4iCO5FN+r wb4Q== X-Gm-Message-State: AOJu0Yx2xajAX4U/GNItA2X4e4tKrobkV+1Bps2Nj6jQYxLSPGwGnUfv DynRpPyYTw+yi9+Vz//SgKcc1w== X-Google-Smtp-Source: AGHT+IFym/OscZjdiaKnZudFAiUw/7t8pHDcgobeGgruKdPyihzD8VGIHQ5tw7zHoHGLJR6WzQgjAQ== X-Received: by 2002:a17:902:eb46:b0:1c9:c5a6:1d00 with SMTP id i6-20020a170902eb4600b001c9c5a61d00mr895380pli.1.1696957513651; Tue, 10 Oct 2023 10:05:13 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id w19-20020a1709027b9300b001b89536974bsm11979868pll.202.2023.10.10.10.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 10:05:12 -0700 (PDT) From: Anup Patel To: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Greg Kroah-Hartman , Jiri Slaby Cc: 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, Anup Patel Subject: [PATCH 0/6] RISC-V SBI debug console extension support Date: Tue, 10 Oct 2023 22:34:57 +0530 Message-Id: <20231010170503.657189-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_100523_175378_667E4E7F X-CRM114-Status: UNSURE ( 9.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This series adds support for SBI debug console 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 Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:635 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This series adds support for SBI debug console 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_v1 branch at: https://github.com/avpatel/linux.git Anup Patel (5): RISC-V: Add defines for SBI debug console extension RISC-V: KVM: Change the SBI specification version to v2.0 RISC-V: KVM: Forward SBI DBCN extension to user-space 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 | 3 +- arch/riscv/include/asm/sbi.h | 7 +++ arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_sbi.c | 4 ++ arch/riscv/kvm/vcpu_sbi_replace.c | 31 ++++++++++ drivers/tty/hvc/Kconfig | 2 +- drivers/tty/hvc/hvc_riscv_sbi.c | 80 ++++++++++++++++++++++--- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/earlycon-riscv-sbi.c | 35 +++++++++-- 11 files changed, 153 insertions(+), 14 deletions(-)