From patchwork Sat Oct 5 08:00:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1993020 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=4/6ym93P; 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=R+VIgNsO; 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 4XLHsd6gxPz1xtH for ; Sat, 5 Oct 2024 18:00:53 +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=TpbqZjihZAxshypQiKbro7qcIZerl+5rJO4L33iu3+s=; b=4/6ym93P92Q2Ca i41wI+Cr66IWuY4XmFoEqQMwfpUSkjV6fZ3KcRSR4AV3zc8bVncAATsEZgQINuuxizf7RKd2zOP+f /bdIe9ZEY/kcUJ61Bpg9lUhgWPLmTLHbpsZffnEzWyfj+67zWzaOVIL64ZUkLdtgY7SiP6AEKnMeK jOmrAMy/99ZNm8MEhrIGvMeeFdtIJ7wrk9Z6vAR1+Q3e5nq6O9RqHmq7y4SDiT1gLjPF8MYeD6ubX V3Dq4gkZY5jC7fINg9A5lhfEiRRF1BR9vxC6+xQdaxfU0w051bO/o0iEYYAcY7iGcckK5kylrXczu DPqp9VOefZXKSBx8YhuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swzie-0000000Ey3y-2yvu; Sat, 05 Oct 2024 08:00:52 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swzib-0000000Ey1N-1Wmp for kvm-riscv@lists.infradead.org; Sat, 05 Oct 2024 08:00:50 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-20b5affde14so22408275ad.3 for ; Sat, 05 Oct 2024 01:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1728115248; x=1728720048; 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=DM/N+JeqYmdY2NXCjdx0WYlyoYAIQjty9vGRP5j+u3c=; b=R+VIgNsOXjnWmazggRiftFhzomo3WWK4vEVEwgs+QxpV1V6MZ5zNCb69T97YdAnXjB ZQ1WYhqHfuGsN9AYYivwsI+tamSHGHjyglSGeCtpzYoWDvUKYtD7KY/Xb+kafUuTXhF3 SS40tkcuH840xb0MZGlsk+pVVVAER4xm5g3aGEfpJq6db75ZTnIawJRL+S/MkjHkNMRD 6La4AKo0s6JanLqGc2/QQegAwLe7OiMWgRiOPdoXIGevHoaht/yxAmHH053EnVol2beG BsYivliZeJeQFyOHCFOlGKcR9cTvDZEwD10loD0rLNDVyHii3mBciFvA4XWBvp3gy0Nt fZ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728115248; x=1728720048; 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=DM/N+JeqYmdY2NXCjdx0WYlyoYAIQjty9vGRP5j+u3c=; b=h2Btc7qFiTvGA/n4fMBD2A4td80RfenX/xUuk8FYl25sniceEQRNmWszY+DIhZJ7Xn 9urEZnG82IhgAIPLI1lxSD900eEKCdmW3e7e1/xWfhgBBX3pNEoibFSpVAuMxNRcPvbY ZP7CuIrpaEv8H8pmgQ2Qi3nkry2AB8hYtVWJkj7Qwd3Ka6K478OjD2+xcDCXfLMze7/n LyUIEKNtnWqLG/c+x54YqSD+DQn8r1uG36yR85yVMgxA5JZiNqQYhiG3Oj5i20371y5l pWhQMhwmQf3PlcTAqwf6G6EmpMYqiNSo/PBl5YCYq/POAgkREFoSdm4xCYfe0phtgYpz p9Tw== X-Forwarded-Encrypted: i=1; AJvYcCWifnpoRWocpdGV3Juu0+0Vk0JPnKA1IzW9vd3YN3Hp68a9CJelALf1jM4/p0tSRfJKjhTiGnkV7Q4=@lists.infradead.org X-Gm-Message-State: AOJu0YxPhrfyES+dkdCOKVY2OGYRgzjaneO3dk2yZGrUCXild000dKuQ P5qSAEfijr/cAoALX8yGvlyp8LXSye6aNixEcw3yb1hWLTh/prD4TGNHUBaR9Gc= X-Google-Smtp-Source: AGHT+IGI+zpaqn3faEdRdE8+EoO4jUPW+w/Mg8yq3mm05z1gf+V8soWztvDLvAWEaG9XJ94CGTRTBg== X-Received: by 2002:a17:90a:458b:b0:2d3:d09a:630e with SMTP id 98e67ed59e1d1-2e1e6212e23mr6986690a91.1.1728115247905; Sat, 05 Oct 2024 01:00:47 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([223.185.135.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e20ae69766sm1259172a91.8.2024.10.05.01.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 01:00:47 -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 v2 4/8] riscv: Add Zcb extension support Date: Sat, 5 Oct 2024 13:30:20 +0530 Message-ID: <20241005080024.11927-5-apatel@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241005080024.11927-1-apatel@ventanamicro.com> References: <20241005080024.11927-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241005_010049_784602_97D9FD56 X-CRM114-Status: UNSURE ( 9.03 ) 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 --- 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:635 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 --- 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"), \