From patchwork Sat Aug 31 11:27:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979288 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=HoZKpzsA; 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=D7A7H29G; 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 4Wwt6w5FPPz1yfX for ; Sat, 31 Aug 2024 21:28:08 +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=SaruKIAXb5HhJdDRXFvJP1Jf0MOZNMVl9gAgM/JlM4Q=; b=HoZKpzsAqgzZ7t Dr5TL4ng0CqgvC+jrhj5FwLBBq6QsP+ms02tFZSqyJcq7U6xwddCjDt+CcRL1ROZWMcRhgwAyZLqc rPvA8EC0K10a9yw8w0DwTd4Y64wGG15jfu3qWqc3E0VIlo7Top2/FuH6DhgXY0SFjvGlQqXBY331X MfZP5AgSm+u+Kbm1eeXXzRyJUFM0sbpC77zqXatnNoo/wJACM1lw0wHBzNsfM7hYhox+ufr8Jkv5d j+DTIa7yu4rmH9SJLLz3bRufSoh1AI0CeeFs5z0dTfHilRFz83xs6dMdXT+miL7RrVecSKOwO4siR y8mHVXyLNZa2L7R2Tmdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMH0-00000009EOt-3qxW; Sat, 31 Aug 2024 11:28:07 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMGx-00000009ENk-49ki for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:05 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2054feabfc3so2041675ad.1 for ; Sat, 31 Aug 2024 04:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103683; x=1725708483; 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=/BXM/UjcLm0O8HfweJKHKopg0DzPpx/VDjUX4pXUr5s=; b=D7A7H29GSMc4iaAJSZ0XHFNbTa/wZr5Qo4yogyHBYSC1AYtstC5H/6HWtcEj2oq1H+ 982slXV/503KV6Jy2fbXWOEHlapoWEvvrvZmKRc+d4xQHQN1u27BMKcdTtQ8QL57UpZj 8dNDwshu6pzLsXkJE0nLXO9fSvo/P4JgoJmW7KQsHIrR45PsHbl73twePCzzGuPstnY1 ceRbDoJn1TTW09fUuGl9hBXGQZ0eVjXWxM8gVgBPpN+1slR/UqZrCJykyaQPQFkAKEcE rbn1pKjRMPAQSsOvttU3lAhOtx8a5bJPVVY9LcmFBD6TsP29rCrh8uYGLuR3BJirYufk eNtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103683; x=1725708483; 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=/BXM/UjcLm0O8HfweJKHKopg0DzPpx/VDjUX4pXUr5s=; b=UMrshorweGQIAuoNJL38ZXLkmMO1S8nXUv1rHhOCuVJci7mTe2Mr1C7WS2cmU84gos C4osnWermMx159gVdly+k4M7iJ4QAnYHOGMWCQIuC7HX66pNtietFYgoRy44NS+QonHw zP533yQO+D0N0+9eWtH7fG+NS6mS20Fckei3RdUSx+jU9Z8XDBwx1aQGH2tPhxHaoDis dbYW59BKswUG3W4w//uxT3jbLej9k8KOb9P+k+GGe+41k76aD+W0LVZitKSW5DfFlsXm lvNUq72SbmPjY2TGUQ0U33Hzw6KX5CsU0xATrkueMuSfOtX+GdAyC/cL0/XHuLf4eAke xdMw== X-Forwarded-Encrypted: i=1; AJvYcCVj8KfxtPIke4DQyFwvS3uPkEU3kLzr4bfVeHrD1jT94hJXRUuY34eP3RddALVr6gMeTwrhxR6nDwc=@lists.infradead.org X-Gm-Message-State: AOJu0YxBNnLq7870oCWoXmwc348A0ofx1zVWF2O4BeEgRRhehEXBOIdP y8BD2qFt8o6Okhf3/dfEnavBoDHzZKmAgccqLG4bFrmulkqNNeBOnq9R9GZVG/s= X-Google-Smtp-Source: AGHT+IEQIeW8TsJRj3YdPcy+zVYnpU6q86s+Ay93nPwfWubG0G4A/nhUXxKmJgbl2LeoLHyQsp6O+w== X-Received: by 2002:a17:902:d2c2:b0:1fd:67c2:f97f with SMTP id d9443c01a7336-20544514f71mr23150075ad.28.1725103682450; Sat, 31 Aug 2024 04:28:02 -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.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:02 -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 1/8] Sync-up headers with Linux-6.11-rc4 kernel Date: Sat, 31 Aug 2024 16:57:36 +0530 Message-ID: <20240831112743.379709-2-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_042804_057150_F4123370 X-CRM114-Status: GOOD ( 13.60 ) 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: We sync-up Linux headers to get latest KVM RISC-V headers having Zawrs support. Signed-off-by: Anup Patel Anup Patel --- include/linux/kvm.h | 27 ++++++++++++++++++++- powerpc/include/asm/kvm.h | 3 +++ riscv/include/asm/kvm.h | 7 ++++++ x86/include/asm/k [...] 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:636 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 We sync-up Linux headers to get latest KVM RISC-V headers having Zawrs support. Signed-off-by: Anup Patel Anup Patel --- include/linux/kvm.h | 27 ++++++++++++++++++++- powerpc/include/asm/kvm.h | 3 +++ riscv/include/asm/kvm.h | 7 ++++++ x86/include/asm/kvm.h | 49 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index d03842a..637efc0 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -192,11 +192,24 @@ struct kvm_xen_exit { /* Flags that describe what fields in emulation_failure hold valid data. */ #define KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES (1ULL << 0) +/* + * struct kvm_run can be modified by userspace at any time, so KVM must be + * careful to avoid TOCTOU bugs. In order to protect KVM, HINT_UNSAFE_IN_KVM() + * renames fields in struct kvm_run from to __unsafe when + * compiled into the kernel, ensuring that any use within KVM is obvious and + * gets extra scrutiny. + */ +#ifdef __KERNEL__ +#define HINT_UNSAFE_IN_KVM(_symbol) _symbol##__unsafe +#else +#define HINT_UNSAFE_IN_KVM(_symbol) _symbol +#endif + /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ struct kvm_run { /* in */ __u8 request_interrupt_window; - __u8 immediate_exit; + __u8 HINT_UNSAFE_IN_KVM(immediate_exit); __u8 padding1[6]; /* out */ @@ -917,6 +930,9 @@ struct kvm_enable_cap { #define KVM_CAP_MEMORY_ATTRIBUTES 233 #define KVM_CAP_GUEST_MEMFD 234 #define KVM_CAP_VM_TYPES 235 +#define KVM_CAP_PRE_FAULT_MEMORY 236 +#define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 +#define KVM_CAP_X86_GUEST_MODE 238 struct kvm_irq_routing_irqchip { __u32 irqchip; @@ -1548,4 +1564,13 @@ struct kvm_create_guest_memfd { __u64 reserved[6]; }; +#define KVM_PRE_FAULT_MEMORY _IOWR(KVMIO, 0xd5, struct kvm_pre_fault_memory) + +struct kvm_pre_fault_memory { + __u64 gpa; + __u64 size; + __u64 flags; + __u64 padding[5]; +}; + #endif /* __LINUX_KVM_H */ diff --git a/powerpc/include/asm/kvm.h b/powerpc/include/asm/kvm.h index 1691297..eaeda00 100644 --- a/powerpc/include/asm/kvm.h +++ b/powerpc/include/asm/kvm.h @@ -645,6 +645,9 @@ struct kvm_ppc_cpu_char { #define KVM_REG_PPC_SIER3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc3) #define KVM_REG_PPC_DAWR1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc4) #define KVM_REG_PPC_DAWRX1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc5) +#define KVM_REG_PPC_DEXCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc6) +#define KVM_REG_PPC_HASHKEYR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc7) +#define KVM_REG_PPC_HASHPKEYR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc8) /* Transactional Memory checkpointed state: * This is all GPRs, all VSX regs and a subset of SPRs diff --git a/riscv/include/asm/kvm.h b/riscv/include/asm/kvm.h index e878e7c..e97db32 100644 --- a/riscv/include/asm/kvm.h +++ b/riscv/include/asm/kvm.h @@ -168,6 +168,13 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZTSO, KVM_RISCV_ISA_EXT_ZACAS, KVM_RISCV_ISA_EXT_SSCOFPMF, + KVM_RISCV_ISA_EXT_ZIMOP, + KVM_RISCV_ISA_EXT_ZCA, + KVM_RISCV_ISA_EXT_ZCB, + KVM_RISCV_ISA_EXT_ZCD, + KVM_RISCV_ISA_EXT_ZCF, + KVM_RISCV_ISA_EXT_ZCMOP, + KVM_RISCV_ISA_EXT_ZAWRS, KVM_RISCV_ISA_EXT_MAX, }; diff --git a/x86/include/asm/kvm.h b/x86/include/asm/kvm.h index 9fae1b7..bf57a82 100644 --- a/x86/include/asm/kvm.h +++ b/x86/include/asm/kvm.h @@ -106,6 +106,7 @@ struct kvm_ioapic_state { #define KVM_RUN_X86_SMM (1 << 0) #define KVM_RUN_X86_BUS_LOCK (1 << 1) +#define KVM_RUN_X86_GUEST_MODE (1 << 2) /* for KVM_GET_REGS and KVM_SET_REGS */ struct kvm_regs { @@ -697,6 +698,11 @@ enum sev_cmd_id { /* Second time is the charm; improved versions of the above ioctls. */ KVM_SEV_INIT2, + /* SNP-specific commands */ + KVM_SEV_SNP_LAUNCH_START = 100, + KVM_SEV_SNP_LAUNCH_UPDATE, + KVM_SEV_SNP_LAUNCH_FINISH, + KVM_SEV_NR_MAX, }; @@ -824,6 +830,48 @@ struct kvm_sev_receive_update_data { __u32 pad2; }; +struct kvm_sev_snp_launch_start { + __u64 policy; + __u8 gosvw[16]; + __u16 flags; + __u8 pad0[6]; + __u64 pad1[4]; +}; + +/* Kept in sync with firmware values for simplicity. */ +#define KVM_SEV_SNP_PAGE_TYPE_NORMAL 0x1 +#define KVM_SEV_SNP_PAGE_TYPE_ZERO 0x3 +#define KVM_SEV_SNP_PAGE_TYPE_UNMEASURED 0x4 +#define KVM_SEV_SNP_PAGE_TYPE_SECRETS 0x5 +#define KVM_SEV_SNP_PAGE_TYPE_CPUID 0x6 + +struct kvm_sev_snp_launch_update { + __u64 gfn_start; + __u64 uaddr; + __u64 len; + __u8 type; + __u8 pad0; + __u16 flags; + __u32 pad1; + __u64 pad2[4]; +}; + +#define KVM_SEV_SNP_ID_BLOCK_SIZE 96 +#define KVM_SEV_SNP_ID_AUTH_SIZE 4096 +#define KVM_SEV_SNP_FINISH_DATA_SIZE 32 + +struct kvm_sev_snp_launch_finish { + __u64 id_block_uaddr; + __u64 id_auth_uaddr; + __u8 id_block_en; + __u8 auth_key_en; + __u8 vcek_disabled; + __u8 host_data[KVM_SEV_SNP_FINISH_DATA_SIZE]; + __u8 pad0[3]; + __u16 flags; + __u64 pad1[4]; +}; + #define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1) @@ -874,5 +922,6 @@ struct kvm_hyperv_eventfd { #define KVM_X86_SW_PROTECTED_VM 1 #define KVM_X86_SEV_VM 2 #define KVM_X86_SEV_ES_VM 3 +#define KVM_X86_SNP_VM 4 #endif /* _ASM_X86_KVM_H */ From patchwork Sat Aug 31 11:27:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979289 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=MzUkWKTF; 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=JN3oFdYm; 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 4Wwt7018hNz1yfn for ; Sat, 31 Aug 2024 21:28:12 +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=Le9T2vmdIeyl8b4JdL6PgiF8U5BZqoHJG7LzhbGVnZ4=; b=MzUkWKTFDM0sKn 6+4PrqdHrmvK5dIsIRMDgAcA2sj2P7JRw51ba/vet9hL7vMV2muOUNw5jcNMC3WbgzwvHl32ZIrTA OA7A4G/XE7x1eqBDr4e0OkDy1p+ftuR1EpUKb+zOpNzATEIWrYXmA01qIS72bj15zJS2ZgvMJOlSV vxU7kzax2IEcjiQI00CHWA6EZH3ljmrOk4MdvE6pUmTDaDyKc9CyAJLtFtfriozPuTCkhtumDeGv+ BCJfB1iHyqSs3O1sPcxQcv3HuHyvrxczNhtLDiEbuKecZIIf9JIQC6V4DY6AxBY+IzI1GjpoopNAM mPgOPaBlV9CtySrZP3VA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMH4-00000009EQe-3e82; Sat, 31 Aug 2024 11:28:10 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMH1-00000009EOv-3tfK for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:09 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-201fba05363so22372855ad.3 for ; Sat, 31 Aug 2024 04:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103687; x=1725708487; 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=amrFrBBY/dGhGTVucOT6fTXuPbDgIkbswePVZ2ud29k=; b=JN3oFdYm62CAciySQxBjgqYOgbb3wsyMUBoZmajo5I2E+RfC+Tj5FR1dEeHf+bcqIX Sdl52dd9hMukE0TTKtwI0TDmCVXPttApvJ1z0nXChHV7ljxQVSLnhFwuTMRKOoEXvwFn iWZhaSdP6Sv3N0tiTf0xbIHr9NmJ5nso6L43NCu80oBXMvyQLgOkPbsKTHiIb6wmNdoQ YlMjPqlmvpylirKz5lcuuZAoaIgvYPAtXgwMskQ5zRGrj7i/pe7+zcCqQRDD1ATtQVDN mlMB+PSVPNQLSFQTidGh6OojsV7zt4ASywKNPcY1Oql/YMINmvX2I59Ch+Atlp5f7HLY /EOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103687; x=1725708487; 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=amrFrBBY/dGhGTVucOT6fTXuPbDgIkbswePVZ2ud29k=; b=vWMyjrYUXTc7FH18jGmG1nzoKQb3TDLya8IMST3d7JmvqGqwx1SktGJ6Xgr6VS3rZ0 Np9Bf8CkuggkXCrKKGSrzhg9T0wvAzNc1BgOanPz+iUXzj4mzmI4rfDOdjrkVy+wnPne YwSJdKEvmh83Kdnlkzk+Ot4ayYIaUnsLxixaIsxxhL1byjJgnWCoAQSVqjOoyIcwtECt 6K1rZVJFMcIQJOfuTtHyezTzTWVETwL2crl+iFI2lMlU7IADp6Z1LePb/MKE9UGAkPYu nKk9DHTOBDCvhwoVSIqOfanye2cKAMBrnLoHXTH9HrvYt7qY/sKSDymFt9iZe8W7Qz+V NBxg== X-Forwarded-Encrypted: i=1; AJvYcCV+NaQZId64hVZmsyQkUDAZNB0GSSkuMicJgLfSlwQLWZAlQmeXQnHwhr+QCnlJMO6r89tFHLeucpA=@lists.infradead.org X-Gm-Message-State: AOJu0YwWTz/VFJmqvWTN5rxSZqnYZIwlrnA/rO0O7rjI8SBxi+ARhRQ0 deniwan1N9kDDsgdroXHCcP+uJMvh0DZZSD40TKRIr3NN9h4rLoLqEOLx/7xqRg= X-Google-Smtp-Source: AGHT+IHNCPuYTkZ5ewBczhrpsP1Fp01YKGsd3IZMcvqfAJZhV9rk5L4wnPoTAfR3/F/G81ss8F83+w== X-Received: by 2002:a17:902:d48c:b0:202:2ed:b3a2 with SMTP id d9443c01a7336-205443ddd83mr23280685ad.8.1725103686583; Sat, 31 Aug 2024 04:28:06 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:06 -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 2/8] riscv: Add Zawrs extension support Date: Sat, 31 Aug 2024 16:57:37 +0530 Message-ID: <20240831112743.379709-3-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_042807_987896_789EAC82 X-CRM114-Status: UNSURE ( 9.44 ) 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 Zawrs 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:62c 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 Zawrs 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 e331f80..9d0c038 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -24,6 +24,7 @@ struct isa_ext_info isa_info_arr[] = { {"svnapot", KVM_RISCV_ISA_EXT_SVNAPOT}, {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT}, {"zacas", KVM_RISCV_ISA_EXT_ZACAS}, + {"zawrs", KVM_RISCV_ISA_EXT_ZAWRS}, {"zba", KVM_RISCV_ISA_EXT_ZBA}, {"zbb", KVM_RISCV_ISA_EXT_ZBB}, {"zbc", KVM_RISCV_ISA_EXT_ZBC}, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index 3fbc4f7..0b79d62 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -49,6 +49,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zacas", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZACAS], \ "Disable Zacas Extension"), \ + OPT_BOOLEAN('\0', "disable-zawrs", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZAWRS], \ + "Disable Zawrs Extension"), \ OPT_BOOLEAN('\0', "disable-zba", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZBA], \ "Disable Zba Extension"), \ From patchwork Sat Aug 31 11:27:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979291 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=Yd3SU+AK; 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=KJYtoTEi; 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 4Wwt746QSdz1yXY for ; Sat, 31 Aug 2024 21:28:16 +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=1j0T2SYpDrm43WaErf3adKQ9Lp4JXEXXgs09uvWbpjI=; b=Yd3SU+AKOmLo1I Qa4zCl6QREkDoR2UuTVheBQbX/z7++Sq2Onl+4B4vRiu3xUMXD5dQmm3Gld/sqjtiXvs/zegg2s2A HwjqxfvIDlVIblLucmhEeVr7VeWgx0Wf0qfX/7Ks9OiYdI0BUkNF29di6ZioSPAlOvkTwq1SB7xOG J0fTPlOiyCLEgBUM0zKzvNOatsYuqs/7atnrTSUf9+EVdOImcXE582ckSZfmQiwmY42b2PQaDygLl jTymD5z9JQmE5t6VvFNGVtChptocnY2n2kvGQrV9eUM8JF0Mv8SS98ma+9jcBB6HiTX0QtUrPgUAI fxNJcXHcmQ0SEFSCdV7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMH9-00000009ETE-2J5s; Sat, 31 Aug 2024 11:28:15 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMH5-00000009ERA-3my7 for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:13 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-715abede256so2092184b3a.3 for ; Sat, 31 Aug 2024 04:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103691; x=1725708491; 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=r6po97RhZOZUf+IwPgmxPkXAAKqo/0ExO40UV6np7to=; b=KJYtoTEiCpK+5tqGHT2kKpNc8NTySE98WiTA1JZM6LX0HMkT/J2+3Xe8ZubqreRVqm NK3YZcwOCiNEe5fmi172udxlG178Bfx6MZuZDArkobjqptrdNZLuZA65gvHsgx4OFk6S MQA/Ak+W8NeAQQpOoTskUUxxXa9mvC6HhwLgulBvDrzn9E/8EAQwe1tAaAk1r8O2sti6 AGGXH0RdmrtlESflx/NrejRyjDntli8+N+kfvaNdu0OXAWq4glErgjiqEMRm5CvpYr3b irv+qbJyuellpm2v6MKBRzGkMjnQnpoG/MtR/kKHwjRvP0gFLhkleWaAU79e7xsIJ501 3kNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103691; x=1725708491; 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=r6po97RhZOZUf+IwPgmxPkXAAKqo/0ExO40UV6np7to=; b=MO/LCyHbaupDTsG/6us/03x4NxxiD65wKTKc5PPLWTdRilOIsn47zhR8Dmu6s8ukiu u5YNkvFcTyELVmt1nTm2xFbJFL0eQ7Bod3qpEM4UpltqcIXveC50VUNdA0L4vDLtids0 tqaE3QuVtdXC5ubLcE0RZK9tkcGLP5JCLNZ2dwQ7cY8iOmmaBsRPSlHKszoxuUke75lL uMaG4/YUNwUXIdcF/qZO+5lBWR2q6zjtecH+EPZc20npPzgkeLAYqXTz2V7vkNOKeJ8i 22NCuyFnHvanXPbMDLyGWRxKvUVlC5pYz7J+oBIvaVdmbpDC5w6bUoNjxLdD/gYTPCY3 iyfw== X-Forwarded-Encrypted: i=1; AJvYcCWm//2sNqQkDLgq2YD5fRExZ+gQgjciOZCY1F9G737CVRQpkku8uq8jlKfSp2MWUYncZbwsTWN+Zig=@lists.infradead.org X-Gm-Message-State: AOJu0YzvVEFSed7HhBm8EUjgkOjokiSUODwZRrB1AbSu3JsFY2BCH6/V SVrry58w52bBwReAECchxCqnhBRQgT7kMht0KmXcAzmfCL9cdL9f6y1RuN2iaB8= X-Google-Smtp-Source: AGHT+IGCVKzkl5zO2EKWqgNuFwQNK7XHEay2aT6rHxuqgJByJRJTnZ4Qv+QSyrTUaTCGSKYNrf52CA== X-Received: by 2002:a05:6a21:1585:b0:1c0:f2a5:c8dc with SMTP id adf61e73a8af0-1ced6549f90mr512913637.50.1725103690686; Sat, 31 Aug 2024 04:28:10 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:10 -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 3/8] riscv: Add Zca extension support Date: Sat, 31 Aug 2024 16:57:38 +0530 Message-ID: <20240831112743.379709-4-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_042811_963613_604426CB 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 Zca 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:433 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 Zca 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 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"), \ 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"), \ From patchwork Sat Aug 31 11:27:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979293 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=BUSwgxf9; 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=TTmiyJCn; 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 4Wwt7D0Jl5z1yXY for ; Sat, 31 Aug 2024 21:28:24 +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=XlUb+CAbtOka14j/di4LgMdFd0ij9IaJ94Hdkf+AVy4=; b=BUSwgxf9c9KHDd IJpZXBFa3e+0gwZHqF3odRESBwnRQbQMy+CsR/mTRE8XqsHYr57UC0Of0opQRObPmLw84TMdafV3j PAZdri0rlw+IBEVMtDcyMQax9j6hrdQIxS98lrbxhzMLuJGo1oo4jfb4OAWadkZ5vq1kT9gT2LHvQ sJGjY0R9zwNfMBgTZl0nsvtGSDLnmt2rNPq+ajnaVVfKM/KqpTZG/cycLfdn13s+JVPlzLabklrXX hd4Fc+nJGw8fw8SezIhIl7Z7CeOFjmA8f0KMakzt1naTCIRcWzN4kypsfy4fMQil9UdaYKzkrSJr6 Jwnxy4I35/AvT1pxYO/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHG-00000009EWp-3TwP; Sat, 31 Aug 2024 11:28:22 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHE-00000009EV6-2Wie for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:22 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-71423273c62so2172236b3a.0 for ; Sat, 31 Aug 2024 04:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103700; x=1725708500; 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=IN9zWgfThfW7vB975JaElm6zTXWCeSIChlwuRZr9WjQ=; b=TTmiyJCn69dD8OO3SWYcn4L149K3sRS3f25vfh0FsuGt8Q3hWX6eh2WhqToAZiR/Kh TV7DeHB5Ok8KJunatVQGgOITSo9lDRoRMrmJUv7EVvtWqGrU7VTt5MjC3kaxqpYpGdVf UIxHoIVzU1PO9O7dpgVzjpSo18FsgGaJqHjOgTaAqwaUScpc1OP9z96F1mms6Yl2UOze hM6PZbSPHeCKJMvtBbctmAxJ+T9W+xMtfE95xVlL9UPmcml5OWZ1LqvJCOPDjYebWOpw gZ8ygKqzzsYRF8b92ecH7Sz88PuCv2mxane9hhKGTf+rR8HE2K45RmZcGToxAM4+pdOz WiJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103700; x=1725708500; 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=IN9zWgfThfW7vB975JaElm6zTXWCeSIChlwuRZr9WjQ=; b=QGCe5cfNL5Y927etS/dEZ4mTeHXOK7c93ZBWGngBSELpqMHxklm2qFexqscOqoL3Hp 5T8jJU3K4NX30aHTfBNX/yuVV/McqS1/3bfYbz+OsOWU15DmSOl2fG2ZnzjLGdsqEMZh TX7LlJaqbsIuqcAZP45dYBbNfiNqvrc7H6ZskDwnHLaurZs3QGHyWPMSA1GfFszaUQGX BWNuEHDYZfsiXK++mA819PqLOp5hYJDgzLVTMHSUdNnMVglK3EFe57iRAoOFsmODAvS8 hAmIjHPcYqRvCRvOr7Rxd3el1q2JXb/qErdtt6FUHv80iLNje2Dq9mmbmCVINzOmE90X zj2Q== X-Forwarded-Encrypted: i=1; AJvYcCUyU9uw5V1TjsSlT6x2nwf+KQfUSs1VIoANm9gHZG69nheU80pO/d+SfwNYDUvUu0V0ptUPiCEabqE=@lists.infradead.org X-Gm-Message-State: AOJu0YwSCD67d/VJ3XlBAVL1gin919nSYJfalZ4VeTtewbh4YGb/GT5f zSkGtzvC3QCZLOXz8cGMYTm7IiAE0hEhgBrz2d7ewVG/0gbRzyhUGjJj0RQ3Ztc= X-Google-Smtp-Source: AGHT+IF4Fve2vOx5CS/sqFIy/XsxZ/BrevhiyP3Y+gnDhrSyaPt5YS2F96MtmxwIKsKduhz5mXw+qQ== X-Received: by 2002:a05:6a21:6b0c:b0:1c2:8d33:af69 with SMTP id adf61e73a8af0-1cece5d1678mr2539298637.41.1725103699429; Sat, 31 Aug 2024 04:28:19 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:19 -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 5/8] riscv: Add Zcd extension support Date: Sat, 31 Aug 2024 16:57:40 +0530 Message-ID: <20240831112743.379709-6-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_042820_685556_5DC766C7 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 Zcd 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:42a 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 Zcd 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 c62d4a3..5587343 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -34,6 +34,7 @@ struct isa_ext_info isa_info_arr[] = { {"zbs", KVM_RISCV_ISA_EXT_ZBS}, {"zca", KVM_RISCV_ISA_EXT_ZCA}, {"zcb", KVM_RISCV_ISA_EXT_ZCB}, + {"zcd", KVM_RISCV_ISA_EXT_ZCD}, {"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 68fc47c..155faa6 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -79,6 +79,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zcb", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCB], \ "Disable Zcb Extension"), \ + OPT_BOOLEAN('\0', "disable-zcd", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCD], \ + "Disable Zcd Extension"), \ OPT_BOOLEAN('\0', "disable-zfa", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZFA], \ "Disable Zfa Extension"), \ From patchwork Sat Aug 31 11:27:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979294 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=Q3x8Wc6z; 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=leCwowcG; 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 4Wwt7J3WPYz1yXY for ; Sat, 31 Aug 2024 21:28:28 +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=5WUzbBE64+t46AftchPZS1/xk3UGY2xtBw4B0qMGk4w=; b=Q3x8Wc6z8Xu+2s RAgVvkA/Z5Qz5x6FOT70/kOJStwEVvXAZgM+ABSaUQis5lU9Zqey6Pzkr/Em05Q764ocS+cjvwkPI JAj4ceHX7cqT2TxEjTtSTKCfb2+vQGN5L1wB+ciLRCuSDuNrJo7HlRWGMFJ6haIrA7sKNbknukyBt bk2ezrOq5ABvAGt9wUreKpW8OqDEM6hHjsqc0eGdIC61AEVqZLAi2nVESSnDY6g9Gr+fxM2394gp6 NQQGMiLCpL/Div20pS54YuHzehBjCjrqTNNoUm2xE2BL69IIc/0N71HQHGD5XoE9W9tDWTa1IUOWk /KLlJLDLt9FkjDATF+IA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHL-00000009EYv-1CbJ; Sat, 31 Aug 2024 11:28:27 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHI-00000009EXN-1y1i for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:25 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-20543fdb7acso5006035ad.1 for ; Sat, 31 Aug 2024 04:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103704; x=1725708504; 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=tuRFySUd5303Km4p+Lb412XdEn4ed1XKXd6/Xjv+mkE=; b=leCwowcGOzVU2hDePW5AFz4RuiR+E9zStj6sP7LU5jQ317anx36ccs+qqS5czoYsCZ eRf/HpBuKHyUXikZTvhhLphyrsDMEUPqQYTeiDXwSNSRf8BpTpH1Kml/fprO7Y5dKYPY sx/DhKesTyiWqFavYi1LF3rU1wMhj8iNBRsI3CaJ1Nsj2xrWedQ7IRqaMmIrWEquslQg vN9S8P4ouR/bS96IKQah1tOyYiMX250/vKxDqK1649pTSBSmv9FkKEoTXjmwlSaJdVd7 0eUZ8VNWK+Yqqem/Ut//O8d5S4XJqbVojfS47uYbnx6zuqij7pAd+zFSDHI0EFHtET/d HEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103704; x=1725708504; 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=tuRFySUd5303Km4p+Lb412XdEn4ed1XKXd6/Xjv+mkE=; b=wyg/eY5CezRUNqTaSXQ0wygYEm2/uu8VsvqIk41r/sPE5JwjhRfduJsrST1ZUEnWlh YNXCo10HWA0ITYDoBqtWgz+WtiyGsz4xuCTFEoS8suMl9woel9k/ciVeIAFS6Qjhr62i V+oInPK+cMHsSoPc1cmiydaFtqA9KifAkMxq5+80sxPnfzsApuFhSUnqie/44gZSLUET FPLYmDjOD0dzfU0jKxuLUNcjembbvFZnDSnyLBtgnTDbrjuXqjjPxhiP3pti9T+NSVKj g6kVDyfohMTqd8WX5FalXAT4XEvMJHQ0Ghle4H/Dc5OMCf9IxJgZ2200H6cON+4Sn837 GMFg== X-Forwarded-Encrypted: i=1; AJvYcCXluB7QPjAWTStfoQL+j8/loNOhcSJkgc9lh/kkdWsbeAccUJsJJ8NImvCgV7rSoAhleKh0EuzvXp4=@lists.infradead.org X-Gm-Message-State: AOJu0YwxS2bMJLhnGQFKM4ZuczHdK9+Xdrw7GuaYuXviI7drAIOL3px7 4/jXPIJuNjesobYkmnw00EfOpcN3I54FHQGTpRx9Plc0o/ne+qgnw8yZYWxF8qk= X-Google-Smtp-Source: AGHT+IEaSOkI/cI6vZxDuGm0bHQEb2cbDyK5243XEeb3lPa/1FsXdIRjrM+XMXSYUJC/OBQjDjGeng== X-Received: by 2002:a17:903:3643:b0:202:47a4:7a1e with SMTP id d9443c01a7336-2054bcbbaafmr9803955ad.16.1725103703655; Sat, 31 Aug 2024 04:28:23 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:23 -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 6/8] riscv: Add Zcf extension support Date: Sat, 31 Aug 2024 16:57:41 +0530 Message-ID: <20240831112743.379709-7-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_042824_528187_4929B4C9 X-CRM114-Status: UNSURE ( 9.62 ) 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 Zcf 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:62c 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 Zcf 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 5587343..7d8a39d 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -35,6 +35,7 @@ struct isa_ext_info isa_info_arr[] = { {"zca", KVM_RISCV_ISA_EXT_ZCA}, {"zcb", KVM_RISCV_ISA_EXT_ZCB}, {"zcd", KVM_RISCV_ISA_EXT_ZCD}, + {"zcf", KVM_RISCV_ISA_EXT_ZCF}, {"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 155faa6..09ab59d 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -82,6 +82,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zcd", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCD], \ "Disable Zcd Extension"), \ + OPT_BOOLEAN('\0', "disable-zcf", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCF], \ + "Disable Zcf Extension"), \ OPT_BOOLEAN('\0', "disable-zfa", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZFA], \ "Disable Zfa Extension"), \ From patchwork Sat Aug 31 11:27:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979295 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=DMNBUjR4; 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=CVhNmlfN; 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 4Wwt7P6ln0z1yXY for ; Sat, 31 Aug 2024 21:28:33 +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=jfJf6r6WB62maG4jWHvop7jN0Cli3KD/uPPK0igFqw0=; b=DMNBUjR4ZhrckN yL4Spa9FE2+Jyajp0EE8BixiyH111yJ+yM9vCquvsgXI8oP7pFERDVQ3x84j4oK1ioy4/skbtrJBJ cokoZ1/uhKdUm71DafMGaFBMyYZnC66JqxAUEDmMeaRGlhRIC7CTL3dUqERZyOuXdAKKpnkSZSK3y +ohf9+m9HM7wnSCaLLUgzRKscF6U2uSUURS9mGYLoHa77jFHFSeWkxceEeIdEXjheY+u1B2KP/6Dy XesCHpNLAQRq5FdbQBHO2L4F57rnlk+RJyADQnnAQToGDnHu2icSr6UHQGHbB9bv/Tn2vnDt8jKzS PDMRl+rHjKIFiEbUSK+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHQ-00000009EbA-36i9; Sat, 31 Aug 2024 11:28:32 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHN-00000009EZN-0BuN for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:31 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7142e4dddbfso2214641b3a.0 for ; Sat, 31 Aug 2024 04:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103708; x=1725708508; 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=dSG2mOQ3WcTVmUmPxjtLmw3x1sU5mFnJXlTn3zaT6k0=; b=CVhNmlfN8sDGFlCL4zXHFOylPG1JSudrGeO/0rWqo/f2VQYsJgoNMk++Ft194+dysO pAxZ2DA34TpWUdY87jlQCjmc6XOTIqMZcrO9trotluXFw0AmR6I57AETIIdtfQ8mg6b4 L8pz3FyqtqWEhYGlxKH0ZEbLONIPi81ZId5NtQSVXF/p70HTKR/gdvrXhZkUJf+owqtS dOQn8c8RBVB2xuIIojj7QRGXhf7aPK/c3EITpEC9D617uSn2UEc4Fyc+Y+rothMHZuzM syVbeMv/2OMjdMUh07MmK+bX4plLJZILXs4wrMWsYBQdKhMojIsTB61VkKkAKhYZmnvI z1qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103708; x=1725708508; 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=dSG2mOQ3WcTVmUmPxjtLmw3x1sU5mFnJXlTn3zaT6k0=; b=MOJ70jmMNeHIPL6A+Cc+Ah8Ynq4lf2VltPveVEgl+x8DhCZHyOcV0+W/9kFGUCq5ao EtutQkBtv3S/BMS71Ipd6aGU8NYhWHygIS+Q6T5dDdyNSHr9rQIxxIpwt98wKkZ9OcYZ yijUQ0bvLysmQyfHfuDLXijc9vqq2GHdJNN47hC+Xw159hUnhl0BH5YXIN5W1Tn/f6BR JRO0mXsap+TkO7e5ZKPqwEHPBPcE/0KgLBniNBRDQFU0wZl3x4cA9HgKE2Vp7envJt2y B+J15GAFkW7GrFm1Q5ZDL77OdXwSE/M5IdwWAscvJNADvCuHDRYGOijAaOFMju6OsEWq am2w== X-Forwarded-Encrypted: i=1; AJvYcCUdww6yJxiDrThJV8a5PdHaQJWvZq7DjidMsW61umi1QGCTABanOx1lisH+thbEAgpfuWzhulEdj8c=@lists.infradead.org X-Gm-Message-State: AOJu0YyShA0ZScW+YJxVGHilcOT/Jtxrv/fVnnLc07hObIYXwd+ziHB8 ykMXOMYWe34w0oW3PgC4FId/RRUNew89UXUOR/Gq9V+iH3VWHhXCGGTAFwbcoy65jc//N2F8qFU JRxs= X-Google-Smtp-Source: AGHT+IFh9Ai8wStJ+N534RDR5PveZM8RSUWaPoQXrVQAjBv83RkO2n3cEqrD7NyYR6ioJJxN+V+nYw== X-Received: by 2002:a05:6a21:6e4b:b0:1c6:ac08:8dd2 with SMTP id adf61e73a8af0-1ced6087aaemr528545637.15.1725103707810; Sat, 31 Aug 2024 04:28:27 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:27 -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 7/8] riscv: Add Zcmop extension support Date: Sat, 31 Aug 2024 16:57:42 +0530 Message-ID: <20240831112743.379709-8-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_042829_109940_BBDD2482 X-CRM114-Status: UNSURE ( 9.41 ) 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 Zcmop 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:434 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 Zcmop 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 7d8a39d..768ee1f 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -36,6 +36,7 @@ struct isa_ext_info isa_info_arr[] = { {"zcb", KVM_RISCV_ISA_EXT_ZCB}, {"zcd", KVM_RISCV_ISA_EXT_ZCD}, {"zcf", KVM_RISCV_ISA_EXT_ZCF}, + {"zcmop", KVM_RISCV_ISA_EXT_ZCMOP}, {"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 09ab59d..5d655cf 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -85,6 +85,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zcf", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCF], \ "Disable Zcf Extension"), \ + OPT_BOOLEAN('\0', "disable-zcmop", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZCMOP], \ + "Disable Zcmop Extension"), \ OPT_BOOLEAN('\0', "disable-zfa", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZFA], \ "Disable Zfa Extension"), \ From patchwork Sat Aug 31 11:27:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1979296 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=0U8+VFY2; 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=DXHcqBFD; 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 4Wwt7T2TBCz1yXY for ; Sat, 31 Aug 2024 21:28:37 +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=I09UPG0rF801w0mZg65fKHZZQuFFxxKS0GN9ctqTDgk=; b=0U8+VFY2Ij5J0S HfIJUdeiSwkhB38YTfDJtgnYUrn/Py66L2v9wChi/inzgtU4dQ31HApGjmc1Mp/pNED0o++dvwJ2v 58CoG9ZrbaDK4O4ts7fAQESG/GMS8FQ6sadi3cK617ooEQx08BacbtLNLKQxwouk5eM/I7Av+54PM FVm8zuBeCCLnSNNwgE0hGIyKPoejNkJ+yt4UamHNZ93vSqXd7Av5q1Vucq+CEUu8n0/xudaUDiKDV OK2jbozw5oziuFa0k5BHiN3U3NnZeTZHAHexLttCF3W8v/pE0hK4jOzv/SdgrZ5NGUOtUb6s0QTiD 6Bh3/3zeBSker161vI8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHU-00000009Ecx-0ZY3; Sat, 31 Aug 2024 11:28:36 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skMHR-00000009EbP-1let for kvm-riscv@lists.infradead.org; Sat, 31 Aug 2024 11:28:34 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2020b730049so23621095ad.3 for ; Sat, 31 Aug 2024 04:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1725103712; x=1725708512; 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=G9W/PvPhY4YAzclM2JSelJpHbbRGL1br7E3OrpY+DrE=; b=DXHcqBFDX7dZndIJaU6GvdblWYmXf6YAFEn3chrGzFo8oSdqi5Mc6LFZScIPvOM+7u +99DnShMfHcmP4skHn4Se6jW2Tby+N8uBM8P6RGop31ILUQndsg+WT5IGxXrPwAGskq1 aKd1zJXou+eddi9XDXpF+sT7J9QNIt12ny3C7QdESgeFkH2w1JOjL16jTKhSsToIrtT3 3gwbcAp+AzLnaxgbshkX+iagrti9wO1//eqEBL6Lbp/SIMbCB6BQ1WnGuTqyFa4JCjgo 2rhY++jGC2glhUR8X9kAmQevJa3t6O3t2R8rJvGJiU+yWuU/XQCefMXRF0b0V3d4bb4z P1Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725103712; x=1725708512; 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=G9W/PvPhY4YAzclM2JSelJpHbbRGL1br7E3OrpY+DrE=; b=qMFLT+I18DbMI4/fwSWfr+/pS0wGFdx4pjMjdyZHyTRJBpaxVT6YrabmC4DxNh1/LO dgKfaVm3BHomyKfLYmLTDgLspW5zV/3uAcrdZWj1GRAwVk7WPtpOvUY9TFL9EiQZ0J3Q 33JFeZcnEMFO4f6N4KWDATh0ASocnY7MoHlKqyjTmKHxS9qtb3E7zfDIiyRO9trikg8U H0X+52HwKUXRQ+Y0oyvbYBS4PUwFN43qu9AzbT0i0NmWwrECm2vyidKegOYN26mWI3Ux GTwTlBW2KppBkhmleMEo+axc64TnR89G7fzKl6ZrP6u2srJn6+yyJz6oz3/80GQBqkog rjbQ== X-Forwarded-Encrypted: i=1; AJvYcCUCn2Xjpn4RdimEj6mdjCvgK3ns0YQ5E3+YR8wQfRzLJkXgHKR2gd4jHc07A7XWYtx71i5SmkTrbOo=@lists.infradead.org X-Gm-Message-State: AOJu0YzhpEgm4m+yOvwaL/PAJpRtklqk8PA6D9Pro6pW8qIwJ1fRCZNp XufnOEJlfk0Tf9tmz48fZWRU/V09m82of18tJTuglqWwbuvywTHwgM0nbbk0fQE= X-Google-Smtp-Source: AGHT+IFrEDhaUx0SUuyIxblepXLqKc+yV2RqLyxEoF9AakA78LY3iMIC9EnV+9+yK3tprr3uVNI74g== X-Received: by 2002:a17:903:1109:b0:203:a0c5:fcfd with SMTP id d9443c01a7336-2050c215d63mr88151465ad.3.1725103712253; Sat, 31 Aug 2024 04:28:32 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2024 04:28:31 -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 8/8] riscv: Add Zimop extension support Date: Sat, 31 Aug 2024 16:57:43 +0530 Message-ID: <20240831112743.379709-9-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_042833_479743_FB73265F 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 Zimop 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:634 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 Zimop 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 768ee1f..8189601 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -49,6 +49,7 @@ struct isa_ext_info isa_info_arr[] = { {"zihintntl", KVM_RISCV_ISA_EXT_ZIHINTNTL}, {"zihintpause", KVM_RISCV_ISA_EXT_ZIHINTPAUSE}, {"zihpm", KVM_RISCV_ISA_EXT_ZIHPM}, + {"zimop", KVM_RISCV_ISA_EXT_ZIMOP}, {"zknd", KVM_RISCV_ISA_EXT_ZKND}, {"zkne", KVM_RISCV_ISA_EXT_ZKNE}, {"zknh", KVM_RISCV_ISA_EXT_ZKNH}, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index 5d655cf..7a9ca60 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -124,6 +124,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-zihpm", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZIHPM], \ "Disable Zihpm Extension"), \ + OPT_BOOLEAN('\0', "disable-zimop", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZIMOP], \ + "Disable Zimop Extension"), \ OPT_BOOLEAN('\0', "disable-zknd", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZKND], \ "Disable Zknd Extension"), \