From patchwork Sat Oct 5 08:00:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1993019 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=cYYzXZ+R; 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=fNKeln8j; 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 4XLHsY1PBCz1xv1 for ; Sat, 5 Oct 2024 18:00:49 +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=4UC/AECUlWpUAWBHBTj4wsvegUys01TyDd7tilMErKs=; b=cYYzXZ+RIc/cud SSU9rTCURZA1IxcuMNdNKwvMT4UiQyA0klaG/ZANcLs9ZAL/aAc2WcOne9FY/7CRJ01ay4MD25ODb 1oDugHWlPtv53BGmK73oRJH7qv1BkFD1mHhTKYfem39KYBBY6L9qvZicayYNdBJDyBb0OPyI76RYE hiHbrjBp0LHHzx4GMmKVIccv20s92ftiV7lguY/lt58FB7yqYzKqFGDPJPtY3tqNydNJQvC9yFDWG x5VmzOnY9GJI8l2phPQTllKNGSdrbDqFXwVNhb2xYEpj0587ld/afoEP7E80hgzZAxoM5TGfR4eED ZGro7matq/a5nXtZnotQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swziZ-0000000Ey0z-46TJ; Sat, 05 Oct 2024 08:00:47 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swziX-0000000Exyx-3uWt for kvm-riscv@lists.infradead.org; Sat, 05 Oct 2024 08:00:47 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2e0a060f6e8so2161052a91.1 for ; Sat, 05 Oct 2024 01:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1728115244; x=1728720044; 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=UQsf+jR6aG4NjI4xejRTeVTRkVyoQSxLnCUJFtnhGtw=; b=fNKeln8jZmTJ7dYJ7GAKTWsRhEjBXL1vwH+EUP5Mvt4si6iUBSLVUUXgt1Eomtmca8 TPD5UyO39MQEmDFNFJ9SEKGaqDGlVO7M1qMF3ru7klss1bDeFgpTvKZxrTARZAQzXcwf p0ZlE/zNFRNuSr3aR7JWjkqqz5YlrQOUkze6VmdnClZrTgU8mQyibRfR+5EJ1kEFhn29 DpZEAHZkBWlgH7RBUrrVmJ9p/KNL3rEKlx66J5CnB8z6b5lAxLWM4/TnOCu8aL84Uk95 eGt8pyZnIIkJI5S3U6CkbdgROwV2lQuWcqzPemoyxpyouMbWrWCUANB29IT1FnM8qrDj hW3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728115244; x=1728720044; 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=UQsf+jR6aG4NjI4xejRTeVTRkVyoQSxLnCUJFtnhGtw=; b=Ope2QFGwzDN/dfFh/dFztOSLMnuZIOpkxgla9GqdAp1utSpM7qc+dC1q42VBgXr28v i25lpobPG2OMQwk3cX1T6hVRptGoljTaE4B+Bwf1OL4J3pJ5qpSqoL520jbCB2/yyNlQ x/cv08eWLHJcgHoamIaM49kRddbbCx8+HCdKgfZppT8mu0Y6VZmK0FAs4hrCMmjjGkeO oSmo12lf4Ch+a1m0RnztPHYv4r+2idryHdmlpELSRAdKszW5ekEDx/gLbrXFrAisbpUc KnpkcSCeiAFmpG/AgE2L6xds/92eIJLMTeaUH9K2fDCLL8F062eGDEu5Bb7SUB56y7K7 UaDA== X-Forwarded-Encrypted: i=1; AJvYcCU20xjlv53SimZYdmCyfbjFtPY1AOBYaVO5U5U6HiRisJ+FoiWIKS89ktRxzNud5WgqsBVTikgE13M=@lists.infradead.org X-Gm-Message-State: AOJu0YykE/yZybpNAfPNwHDoQx41hQW9g/+twmluFThFtu0PsV4O3VV8 Kerg25lNTaXwVgAxyDXguYrhyiCf1qiYVP6+oRmYC4BU9svIVL2JZJO/0Tk2YIk= X-Google-Smtp-Source: AGHT+IGdz7RXo2myL3SxDLY6yZr6Hkugoz+QUjnFI/C6nrX2W1ljAdcvfo02FUviIgHA+yyHeYhQgw== X-Received: by 2002:a17:90a:2e89:b0:2e0:8e36:128 with SMTP id 98e67ed59e1d1-2e1e620f811mr6961515a91.5.1728115244474; Sat, 05 Oct 2024 01:00:44 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 01:00:44 -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 3/8] riscv: Add Zca extension support Date: Sat, 5 Oct 2024 13:30:19 +0530 Message-ID: <20241005080024.11927-4-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_010045_995288_A948E15E 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 Zca 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:1030 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 Zca 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 9d0c038..4fe4583 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -32,6 +32,7 @@ struct isa_ext_info isa_info_arr[] = { {"zbkc", KVM_RISCV_ISA_EXT_ZBKC}, {"zbkx", KVM_RISCV_ISA_EXT_ZBKX}, {"zbs", KVM_RISCV_ISA_EXT_ZBS}, + {"zca", KVM_RISCV_ISA_EXT_ZCA}, {"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 0b79d62..40679ef 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -73,6 +73,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zbs", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZBS], \ "Disable Zbs Extension"), \ + OPT_BOOLEAN('\0', "disable-zca", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCA], \ + "Disable Zca Extension"), \ OPT_BOOLEAN('\0', "disable-zfa", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZFA], \ "Disable Zfa Extension"), \