thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 7 months ago
Clone

Blame SOURCES/kvm-redhat-Update-linux-headers-linux-kvm.h-to-v5.18-rc6.patch

586cba
From 236f216309261bc924e49014267998fdc2ef7f46 Mon Sep 17 00:00:00 2001
586cba
From: Thomas Huth <thuth@redhat.com>
586cba
Date: Fri, 29 Jul 2022 16:55:34 +0200
586cba
Subject: [PATCH 28/32] redhat: Update linux-headers/linux/kvm.h to v5.18-rc6
586cba
586cba
RH-Author: Thomas Huth <thuth@redhat.com>
586cba
RH-MergeRequest: 109: Honor storage keys during emulation of I/O instructions
586cba
RH-Commit: [1/2] f306d7ff8efa64b14158388b95815ac556a25d8a (thuth/qemu-kvm-cs9)
586cba
RH-Bugzilla: 2111994
586cba
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
586cba
RH-Acked-by: David Hildenbrand <david@redhat.com>
586cba
RH-Acked-by: Claudio Imbrenda <None>
586cba
586cba
Upstream Status: RHEL-only
586cba
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2111994
586cba
586cba
Based on upstream commit e4082063e47e9731dbeb1c26174c17f6038f577f
586cba
("linux-headers: Update to v5.18-rc6"), but this is focusing on
586cba
the file linux-headers/linux/kvm.h only (since the other changes
586cba
related to the VFIO renaming might break some stuff).
586cba
586cba
Signed-off-by: Thomas Huth <thuth@redhat.com>
586cba
---
586cba
 linux-headers/linux/kvm.h | 27 +++++++++++++++++++++------
586cba
 1 file changed, 21 insertions(+), 6 deletions(-)
586cba
586cba
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
586cba
index d232feaae9..0d05d02ee4 100644
586cba
--- a/linux-headers/linux/kvm.h
586cba
+++ b/linux-headers/linux/kvm.h
586cba
@@ -445,7 +445,11 @@ struct kvm_run {
586cba
 #define KVM_SYSTEM_EVENT_RESET          2
586cba
 #define KVM_SYSTEM_EVENT_CRASH          3
586cba
 			__u32 type;
586cba
-			__u64 flags;
586cba
+			__u32 ndata;
586cba
+			union {
586cba
+				__u64 flags;
586cba
+				__u64 data[16];
586cba
+			};
586cba
 		} system_event;
586cba
 		/* KVM_EXIT_S390_STSI */
586cba
 		struct {
586cba
@@ -562,9 +566,12 @@ struct kvm_s390_mem_op {
586cba
 	__u32 op;		/* type of operation */
586cba
 	__u64 buf;		/* buffer in userspace */
586cba
 	union {
586cba
-		__u8 ar;	/* the access register number */
586cba
+		struct {
586cba
+			__u8 ar;	/* the access register number */
586cba
+			__u8 key;	/* access key, ignored if flag unset */
586cba
+		};
586cba
 		__u32 sida_offset; /* offset into the sida */
586cba
-		__u8 reserved[32]; /* should be set to 0 */
586cba
+		__u8 reserved[32]; /* ignored */
586cba
 	};
586cba
 };
586cba
 /* types for kvm_s390_mem_op->op */
586cba
@@ -572,9 +579,12 @@ struct kvm_s390_mem_op {
586cba
 #define KVM_S390_MEMOP_LOGICAL_WRITE	1
586cba
 #define KVM_S390_MEMOP_SIDA_READ	2
586cba
 #define KVM_S390_MEMOP_SIDA_WRITE	3
586cba
+#define KVM_S390_MEMOP_ABSOLUTE_READ	4
586cba
+#define KVM_S390_MEMOP_ABSOLUTE_WRITE	5
586cba
 /* flags for kvm_s390_mem_op->flags */
586cba
 #define KVM_S390_MEMOP_F_CHECK_ONLY		(1ULL << 0)
586cba
 #define KVM_S390_MEMOP_F_INJECT_EXCEPTION	(1ULL << 1)
586cba
+#define KVM_S390_MEMOP_F_SKEY_PROTECTION	(1ULL << 2)
586cba
 
586cba
 /* for KVM_INTERRUPT */
586cba
 struct kvm_interrupt {
586cba
@@ -1134,6 +1144,12 @@ struct kvm_ppc_resize_hpt {
586cba
 #define KVM_CAP_VM_GPA_BITS 207
586cba
 #define KVM_CAP_XSAVE2 208
586cba
 #define KVM_CAP_SYS_ATTRIBUTES 209
586cba
+#define KVM_CAP_PPC_AIL_MODE_3 210
586cba
+#define KVM_CAP_S390_MEM_OP_EXTENSION 211
586cba
+#define KVM_CAP_PMU_CAPABILITY 212
586cba
+#define KVM_CAP_DISABLE_QUIRKS2 213
586cba
+/* #define KVM_CAP_VM_TSC_CONTROL 214 */
586cba
+#define KVM_CAP_SYSTEM_EVENT_DATA 215
586cba
 
586cba
 #ifdef KVM_CAP_IRQ_ROUTING
586cba
 
586cba
@@ -1624,9 +1640,6 @@ struct kvm_enc_region {
586cba
 #define KVM_S390_NORMAL_RESET	_IO(KVMIO,   0xc3)
586cba
 #define KVM_S390_CLEAR_RESET	_IO(KVMIO,   0xc4)
586cba
 
586cba
-/* Available with KVM_CAP_XSAVE2 */
586cba
-#define KVM_GET_XSAVE2		  _IOR(KVMIO,  0xcf, struct kvm_xsave)
586cba
-
586cba
 struct kvm_s390_pv_sec_parm {
586cba
 	__u64 origin;
586cba
 	__u64 length;
586cba
@@ -1973,6 +1986,8 @@ struct kvm_dirty_gfn {
586cba
 #define KVM_BUS_LOCK_DETECTION_OFF             (1 << 0)
586cba
 #define KVM_BUS_LOCK_DETECTION_EXIT            (1 << 1)
586cba
 
586cba
+#define KVM_PMU_CAP_DISABLE                    (1 << 0)
586cba
+
586cba
 /**
586cba
  * struct kvm_stats_header - Header of per vm/vcpu binary statistics data.
586cba
  * @flags: Some extra information for header, always 0 for now.
586cba
-- 
586cba
2.31.1
586cba