All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11
@ 2024-10-05  8:00 ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

This series adds support for new ISA extensions based on Linux-6.11
namely: Zawrs, Zca, Zcb, Zcd, Zcf, Zcmop, and Zimop.

These patches can also be found in the riscv_more_exts_round4_v2 branch
at: https://github.com/avpatel/kvmtool.git

Changes since v1:
- Updated PATCH1 to sync-up header with released Linux-6.11 kernel

Anup Patel (8):
  Sync-up headers with Linux-6.11 kernel
  riscv: Add Zawrs extension support
  riscv: Add Zca extension support
  riscv: Add Zcb extension support
  riscv: Add Zcd extension support
  riscv: Add Zcf extension support
  riscv: Add Zcmop extension support
  riscv: Add Zimop extension support

 include/linux/kvm.h                 | 27 +++++++++++++++-
 powerpc/include/asm/kvm.h           |  3 ++
 riscv/fdt.c                         |  7 +++++
 riscv/include/asm/kvm.h             |  7 +++++
 riscv/include/kvm/kvm-config-arch.h | 21 +++++++++++++
 x86/include/asm/kvm.h               | 49 +++++++++++++++++++++++++++++
 6 files changed, 113 insertions(+), 1 deletion(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11
@ 2024-10-05  8:00 ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

This series adds support for new ISA extensions based on Linux-6.11
namely: Zawrs, Zca, Zcb, Zcd, Zcf, Zcmop, and Zimop.

These patches can also be found in the riscv_more_exts_round4_v2 branch
at: https://github.com/avpatel/kvmtool.git

Changes since v1:
- Updated PATCH1 to sync-up header with released Linux-6.11 kernel

Anup Patel (8):
  Sync-up headers with Linux-6.11 kernel
  riscv: Add Zawrs extension support
  riscv: Add Zca extension support
  riscv: Add Zcb extension support
  riscv: Add Zcd extension support
  riscv: Add Zcf extension support
  riscv: Add Zcmop extension support
  riscv: Add Zimop extension support

 include/linux/kvm.h                 | 27 +++++++++++++++-
 powerpc/include/asm/kvm.h           |  3 ++
 riscv/fdt.c                         |  7 +++++
 riscv/include/asm/kvm.h             |  7 +++++
 riscv/include/kvm/kvm-config-arch.h | 21 +++++++++++++
 x86/include/asm/kvm.h               | 49 +++++++++++++++++++++++++++++
 6 files changed, 113 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 1/8] Sync-up headers with Linux-6.11 kernel
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

We sync-up Linux headers to get latest KVM RISC-V headers having
newly added ISA extensions in ONE_REG interface.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
 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@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 <symbol> to <symbol>__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 */
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 1/8] Sync-up headers with Linux-6.11 kernel
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

We sync-up Linux headers to get latest KVM RISC-V headers having
newly added ISA extensions in ONE_REG interface.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
 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 <symbol> to <symbol>__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 */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 2/8] riscv: Add Zawrs extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 2/8] riscv: Add Zawrs extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 3/8] riscv: Add Zca extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 3/8] riscv: Add Zca extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 4/8] riscv: Add Zcb extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 4/8] riscv: Add Zcb extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 5/8] riscv: Add Zcd extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 5/8] riscv: Add Zcd extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 6/8] riscv: Add Zcf extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 6/8] riscv: Add Zcf extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 7/8] riscv: Add Zcmop extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 7/8] riscv: Add Zcmop extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 8/8] riscv: Add Zimop extension support
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-05  8:00   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: kvm-riscv

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 8/8] riscv: Add Zimop extension support
@ 2024-10-05  8:00   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-05  8:00 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv, Anup Patel

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 <apatel@ventanamicro.com>
---
 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"),				\
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-14 16:30   ` Anup Patel
  -1 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-14 16:30 UTC (permalink / raw)
  To: kvm-riscv

Hi Will,

On Sat, Oct 5, 2024 at 1:30?PM Anup Patel <apatel@ventanamicro.com> wrote:
>
> This series adds support for new ISA extensions based on Linux-6.11
> namely: Zawrs, Zca, Zcb, Zcd, Zcf, Zcmop, and Zimop.
>
> These patches can also be found in the riscv_more_exts_round4_v2 branch
> at: https://github.com/avpatel/kvmtool.git
>
> Changes since v1:
> - Updated PATCH1 to sync-up header with released Linux-6.11 kernel
>
> Anup Patel (8):
>   Sync-up headers with Linux-6.11 kernel
>   riscv: Add Zawrs extension support
>   riscv: Add Zca extension support
>   riscv: Add Zcb extension support
>   riscv: Add Zcd extension support
>   riscv: Add Zcf extension support
>   riscv: Add Zcmop extension support
>   riscv: Add Zimop extension support
>
>  include/linux/kvm.h                 | 27 +++++++++++++++-
>  powerpc/include/asm/kvm.h           |  3 ++
>  riscv/fdt.c                         |  7 +++++
>  riscv/include/asm/kvm.h             |  7 +++++
>  riscv/include/kvm/kvm-config-arch.h | 21 +++++++++++++
>  x86/include/asm/kvm.h               | 49 +++++++++++++++++++++++++++++
>  6 files changed, 113 insertions(+), 1 deletion(-)

Friendly ping ?

Regards,
Anup


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11
@ 2024-10-14 16:30   ` Anup Patel
  0 siblings, 0 replies; 22+ messages in thread
From: Anup Patel @ 2024-10-14 16:30 UTC (permalink / raw)
  To: Will Deacon, julien.thierry.kdev, maz
  Cc: Paolo Bonzini, Atish Patra, Andrew Jones, Anup Patel, kvm,
	kvm-riscv

Hi Will,

On Sat, Oct 5, 2024 at 1:30 PM Anup Patel <apatel@ventanamicro.com> wrote:
>
> This series adds support for new ISA extensions based on Linux-6.11
> namely: Zawrs, Zca, Zcb, Zcd, Zcf, Zcmop, and Zimop.
>
> These patches can also be found in the riscv_more_exts_round4_v2 branch
> at: https://github.com/avpatel/kvmtool.git
>
> Changes since v1:
> - Updated PATCH1 to sync-up header with released Linux-6.11 kernel
>
> Anup Patel (8):
>   Sync-up headers with Linux-6.11 kernel
>   riscv: Add Zawrs extension support
>   riscv: Add Zca extension support
>   riscv: Add Zcb extension support
>   riscv: Add Zcd extension support
>   riscv: Add Zcf extension support
>   riscv: Add Zcmop extension support
>   riscv: Add Zimop extension support
>
>  include/linux/kvm.h                 | 27 +++++++++++++++-
>  powerpc/include/asm/kvm.h           |  3 ++
>  riscv/fdt.c                         |  7 +++++
>  riscv/include/asm/kvm.h             |  7 +++++
>  riscv/include/kvm/kvm-config-arch.h | 21 +++++++++++++
>  x86/include/asm/kvm.h               | 49 +++++++++++++++++++++++++++++
>  6 files changed, 113 insertions(+), 1 deletion(-)

Friendly ping ?

Regards,
Anup

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11
  2024-10-05  8:00 ` Anup Patel
@ 2024-10-23 16:21   ` Will Deacon
  -1 siblings, 0 replies; 22+ messages in thread
From: Will Deacon @ 2024-10-23 16:21 UTC (permalink / raw)
  To: kvm-riscv

On Sat, 05 Oct 2024 13:30:16 +0530, Anup Patel wrote:
> This series adds support for new ISA extensions based on Linux-6.11
> namely: Zawrs, Zca, Zcb, Zcd, Zcf, Zcmop, and Zimop.
> 
> These patches can also be found in the riscv_more_exts_round4_v2 branch
> at: https://github.com/avpatel/kvmtool.git
> 
> Changes since v1:
> - Updated PATCH1 to sync-up header with released Linux-6.11 kernel
> 
> [...]

Applied to kvmtool (master), thanks!

[1/8] Sync-up headers with Linux-6.11 kernel
      https://git.kernel.org/will/kvmtool/c/b862ed4bbe34
[2/8] riscv: Add Zawrs extension support
      https://git.kernel.org/will/kvmtool/c/c7a4bd93833f
[3/8] riscv: Add Zca extension support
      https://git.kernel.org/will/kvmtool/c/4b8b352b0c25
[4/8] riscv: Add Zcb extension support
      https://git.kernel.org/will/kvmtool/c/78bafd5691be
[5/8] riscv: Add Zcd extension support
      https://git.kernel.org/will/kvmtool/c/80d2e0cd1496
[6/8] riscv: Add Zcf extension support
      https://git.kernel.org/will/kvmtool/c/9f50870b2701
[7/8] riscv: Add Zcmop extension support
      https://git.kernel.org/will/kvmtool/c/1f0e5ba9e458
[8/8] riscv: Add Zimop extension support
      https://git.kernel.org/will/kvmtool/c/3040b298156e

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11
@ 2024-10-23 16:21   ` Will Deacon
  0 siblings, 0 replies; 22+ messages in thread
From: Will Deacon @ 2024-10-23 16:21 UTC (permalink / raw)
  To: julien.thierry.kdev, maz, Anup Patel
  Cc: catalin.marinas, kernel-team, Will Deacon, Paolo Bonzini,
	Atish Patra, Andrew Jones, Anup Patel, kvm, kvm-riscv

On Sat, 05 Oct 2024 13:30:16 +0530, Anup Patel wrote:
> This series adds support for new ISA extensions based on Linux-6.11
> namely: Zawrs, Zca, Zcb, Zcd, Zcf, Zcmop, and Zimop.
> 
> These patches can also be found in the riscv_more_exts_round4_v2 branch
> at: https://github.com/avpatel/kvmtool.git
> 
> Changes since v1:
> - Updated PATCH1 to sync-up header with released Linux-6.11 kernel
> 
> [...]

Applied to kvmtool (master), thanks!

[1/8] Sync-up headers with Linux-6.11 kernel
      https://git.kernel.org/will/kvmtool/c/b862ed4bbe34
[2/8] riscv: Add Zawrs extension support
      https://git.kernel.org/will/kvmtool/c/c7a4bd93833f
[3/8] riscv: Add Zca extension support
      https://git.kernel.org/will/kvmtool/c/4b8b352b0c25
[4/8] riscv: Add Zcb extension support
      https://git.kernel.org/will/kvmtool/c/78bafd5691be
[5/8] riscv: Add Zcd extension support
      https://git.kernel.org/will/kvmtool/c/80d2e0cd1496
[6/8] riscv: Add Zcf extension support
      https://git.kernel.org/will/kvmtool/c/9f50870b2701
[7/8] riscv: Add Zcmop extension support
      https://git.kernel.org/will/kvmtool/c/1f0e5ba9e458
[8/8] riscv: Add Zimop extension support
      https://git.kernel.org/will/kvmtool/c/3040b298156e

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-10-23 16:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05  8:00 [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11 Anup Patel
2024-10-05  8:00 ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 1/8] Sync-up headers with Linux-6.11 kernel Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 2/8] riscv: Add Zawrs extension support Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 3/8] riscv: Add Zca " Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 4/8] riscv: Add Zcb " Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 5/8] riscv: Add Zcd " Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 6/8] riscv: Add Zcf " Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 7/8] riscv: Add Zcmop " Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-05  8:00 ` [kvmtool PATCH v2 8/8] riscv: Add Zimop " Anup Patel
2024-10-05  8:00   ` Anup Patel
2024-10-14 16:30 ` [kvmtool PATCH v2 0/8] Add RISC-V ISA extensions based on Linux-6.11 Anup Patel
2024-10-14 16:30   ` Anup Patel
2024-10-23 16:21 ` Will Deacon
2024-10-23 16:21   ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.