From patchwork Sat Aug 31 11:27:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979292 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=hux4mBJf; 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=P6YqgXj3; 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 4Wwt784BK9z1yXY for ; Sat, 31 Aug 2024 21:28:20 +1000 (AEST) 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:References:In-Reply-To: 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: List-Owner; bh=udEKZ3edyMFUo9zK61ad13qZLvtXkGcCMGIwz8iMhOs=; b=hux4mBJf2xw9A4 hCc7pc+fVGL8r9ioF8sEhTO4OfTGxKecqJHJLw+c9mRE/9/MN7SPOkT8Z35sy5qTUS8pv00TMPSto VFIeK1f50dS2Ng+nlTMznEfHhrHciyVwCYY8wAeA/RfKMxDQwdUK+IaXV8BaNwCcXITOZ3DqouKhh JdSQe5Z8Q6isypfqygrikSFluBV8PLbj2NFAA96sqlOLlZq8cx6R4ibeQt8n5sdQkmznJz3mlazN1 2tXVQ9/5BMPYj+ZdirxjIpC+ww40Uy2/kelcquWDe3eBLmNkVUrqGJd2oQ/5syD313tOAKpxFtBBs qKEJZiCMKF1Ke2X5hBNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHD-00000009EUb-1au1; Sat, 31 Aug 2024 11:28:19 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHA-00000009ETT-1rzJ for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:17 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-20543fdb7acso5005705ad.1 for ; Sat, 31 Aug 2024 04:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103695; x=1725708495; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tXdSRSEmTvo6sMNXYdaHKPgibvgWAOri4J2oivTeXtU=; b=P6YqgXj314zGrUzIOwFhVKgcHjsOMhDAZu1+HWY9IjGidSNY4IcziM5DPMa4g0XXNG YbudF9VqI6FymgXN3aWn+TcGI9iSCfWrtdYJFL9N3OwqLnmT4k5xk1mjumtDFQUp5to6 Dj8SKx8JzxXfqmIWuDOZsHZAuz8WcMX2gBBphZ36H+KjPkf1AEpJ+h4p6ixWZn9emnKQ D3wphmtCSoGm74zdc1zsCvgIGGdoRiWfRGmu3LkKNCamxwkMA2YHuQipUpDNu5YT7Hxr fUdFDtJTlC67AcxNA8wLQ0PqrLjoiwxZnOmtfK/uIdMORFP8WRmLcgfRtl9G01xOlqHF syJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103695; x=1725708495; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tXdSRSEmTvo6sMNXYdaHKPgibvgWAOri4J2oivTeXtU=; b=mTFWsZZCrdLeH6ZQvSHY2AnwfhHKMOAsJ1O6TeJtPLYtPcT7hrsiV4DKoVWyjoz+F/ x+/f8Rp3Ieo3O2jc+OmKauxvVMUD3NL0tliPZmjuH3jguW1u76v8lRaJRl+Rq+nQRhtB uwtwKThuZoGtSZ8OyWk79Y5lXJalotzPCrOQKCNdeQmD3zbn56hyaqQLo53YLvzZhfIL 00CIYKe6AWwXo76rlyKyWcbyfPY7vsaa/nJzdSzAiG0cmmd8f4bivpCkwhMzrGHFprAz F6KLQCEpX1ivg9PpYJnlTfGFKF6IONkzPhHzNnv0WSBs78ZogNnYAeuCuATbG7Euo7xK ymmA== X-Forwarded-Encrypted: i=1; AJvYcCWEN/fI8+4euQOcsacvr6Jw9eEVU6J1FX8NM1JEqPU2dPBUyImkQJv/EhaT4pH/0Juz+RWVLPPgkhA=@lists.infradead.org X-Gm-Message-State: AOJu0YwtRDmvCNM83GgSXRCzsRgLyt0300q1ZS/OE6ZIN+U3hi2fGwof 5GkJoyBlYazAIsNRP2nwAir9eyMnljKgV/WsYzRoVRVaJkyUhvl8nqcnSc0ucAE= X-Google-Smtp-Source: AGHT+IGBQF/RklUqRdEy3O8AxYUqet69JKdRJE18Ux3VuXiVLZkLiHhukunLvYx/vAWNbtRyNXDMvA== X-Received: by 2002:a17:902:f34c:b0:202:190e:2adb with SMTP id d9443c01a7336-2054bd15aa9mr7563845ad.36.1725103695192; Sat, 31 Aug 2024 04:28:15 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20542d5d1b2sm11934415ad.36.2024.08.31.04.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:14 -0700 (PDT) From: Anup Patel To: Will Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Paolo Bonzini , Atish Patra , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Anup Patel Subject: [kvmtool PATCH 4/8] riscv: Add Zcb extension support Date: Sat, 31 Aug 2024 16:57:39 +0530 Message-ID: <20240831112743.379709-5-apatel@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240831112743.379709-1-apatel@ventanamicro.com> References: <20240831112743.379709-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240831_042816_509445_8D8BD2B9 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) 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: When the Zcb extension is available expose it to the guest via device tree so that guest can use it. Signed-off-by: Anup Patel Anup Patel --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+) Content analysis details: (-2.1 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:62b 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 Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 When the Zcb extension is available expose it to the guest via device tree so that guest can use it. Signed-off-by: Anup Patel Anup Patel --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/riscv/fdt.c b/riscv/fdt.c index 4fe4583..c62d4a3 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -33,6 +33,7 @@ struct isa_ext_info isa_info_arr[] = { {"zbkx", KVM_RISCV_ISA_EXT_ZBKX}, {"zbs", KVM_RISCV_ISA_EXT_ZBS}, {"zca", KVM_RISCV_ISA_EXT_ZCA}, + {"zcb", KVM_RISCV_ISA_EXT_ZCB}, {"zfa", KVM_RISCV_ISA_EXT_ZFA}, {"zfh", KVM_RISCV_ISA_EXT_ZFH}, {"zfhmin", KVM_RISCV_ISA_EXT_ZFHMIN}, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index 40679ef..68fc47c 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -76,6 +76,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zca", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCA], \ "Disable Zca Extension"), \ + OPT_BOOLEAN('\0', "disable-zcb", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCB], \ + "Disable Zcb Extension"), \ OPT_BOOLEAN('\0', "disable-zfa", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZFA], \ "Disable Zfa Extension"), \