thebeanogamer / rpms / qemu-kvm

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