summary refs log tree commit diff stats
path: root/linux-headers/asm-riscv/kvm.h
diff options
context:
space:
mode:
authorChenyi Qiang <chenyi.qiang@intel.com>2022-09-15 17:10:35 +0800
committerThomas Huth <thuth@redhat.com>2022-09-26 17:23:47 +0200
commitd525f73f9186a5bc641b8caf0b2c9bb94e5aa963 (patch)
tree97bf687812bc54f7d809c043b3ab37461cf8fd3e /linux-headers/asm-riscv/kvm.h
parent28d01b1d69e947a50b9ab9b45113fda1c4f96ac9 (diff)
downloadfocaccia-qemu-d525f73f9186a5bc641b8caf0b2c9bb94e5aa963.tar.gz
focaccia-qemu-d525f73f9186a5bc641b8caf0b2c9bb94e5aa963.zip
Update linux headers to v6.0-rc4
commit 7e18e42e4b280c85b76967a9106a13ca61c16179

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20220915091035.3897-3-chenyi.qiang@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'linux-headers/asm-riscv/kvm.h')
-rw-r--r--linux-headers/asm-riscv/kvm.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/linux-headers/asm-riscv/kvm.h b/linux-headers/asm-riscv/kvm.h
index f808ad1ce5..7351417afd 100644
--- a/linux-headers/asm-riscv/kvm.h
+++ b/linux-headers/asm-riscv/kvm.h
@@ -82,6 +82,25 @@ struct kvm_riscv_timer {
 	__u64 state;
 };
 
+/*
+ * ISA extension IDs specific to KVM. This is not the same as the host ISA
+ * extension IDs as that is internal to the host and should not be exposed
+ * to the guest. This should always be contiguous to keep the mapping simple
+ * in KVM implementation.
+ */
+enum KVM_RISCV_ISA_EXT_ID {
+	KVM_RISCV_ISA_EXT_A = 0,
+	KVM_RISCV_ISA_EXT_C,
+	KVM_RISCV_ISA_EXT_D,
+	KVM_RISCV_ISA_EXT_F,
+	KVM_RISCV_ISA_EXT_H,
+	KVM_RISCV_ISA_EXT_I,
+	KVM_RISCV_ISA_EXT_M,
+	KVM_RISCV_ISA_EXT_SVPBMT,
+	KVM_RISCV_ISA_EXT_SSTC,
+	KVM_RISCV_ISA_EXT_MAX,
+};
+
 /* Possible states for kvm_riscv_timer */
 #define KVM_RISCV_TIMER_STATE_OFF	0
 #define KVM_RISCV_TIMER_STATE_ON	1
@@ -123,6 +142,9 @@ struct kvm_riscv_timer {
 #define KVM_REG_RISCV_FP_D_REG(name)	\
 		(offsetof(struct __riscv_d_ext_state, name) / sizeof(__u64))
 
+/* ISA Extension registers are mapped as type 7 */
+#define KVM_REG_RISCV_ISA_EXT		(0x07 << KVM_REG_RISCV_TYPE_SHIFT)
+
 #endif
 
 #endif /* __LINUX_KVM_RISCV_H */