|
|
902636 |
From 9d1b94d3739567245578f30866facc13edb3be92 Mon Sep 17 00:00:00 2001
|
|
|
902636 |
From: Thomas Huth <thuth@redhat.com>
|
|
|
902636 |
Date: Fri, 29 May 2020 05:53:44 -0400
|
|
|
902636 |
Subject: [PATCH 02/42] linux-headers: update kvm.h
|
|
|
902636 |
|
|
|
902636 |
RH-Author: Thomas Huth <thuth@redhat.com>
|
|
|
902636 |
Message-id: <20200529055420.16855-3-thuth@redhat.com>
|
|
|
902636 |
Patchwork-id: 97020
|
|
|
902636 |
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH v2 02/38] linux-headers: update kvm.h
|
|
|
902636 |
Bugzilla: 1828317
|
|
|
902636 |
RH-Acked-by: Claudio Imbrenda <cimbrend@redhat.com>
|
|
|
902636 |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
902636 |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
|
902636 |
|
|
|
902636 |
Upstream-status: n/a
|
|
|
902636 |
|
|
|
902636 |
Update kvm.h for the upcoming new s390x reset and protected virtualization
|
|
|
902636 |
ioctls. This patch is based on commit ddda37483dd17c9936fdde9ebf8f6ca2692b3842
|
|
|
902636 |
and commit dc6f8d458a4ccc360723993f31d310d06469f55f, but I dropped all
|
|
|
902636 |
(unrequired) changes to the other linux-header files.
|
|
|
902636 |
|
|
|
902636 |
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
|
902636 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
902636 |
---
|
|
|
902636 |
linux-headers/linux/kvm.h | 55 +++++++++++++++++++++++++++++++++++++--
|
|
|
902636 |
1 file changed, 53 insertions(+), 2 deletions(-)
|
|
|
902636 |
|
|
|
902636 |
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
|
|
|
902636 |
index 3d9b18f7f8..578cd97c0d 100644
|
|
|
902636 |
--- a/linux-headers/linux/kvm.h
|
|
|
902636 |
+++ b/linux-headers/linux/kvm.h
|
|
|
902636 |
@@ -468,12 +468,17 @@ struct kvm_s390_mem_op {
|
|
|
902636 |
__u32 size; /* amount of bytes */
|
|
|
902636 |
__u32 op; /* type of operation */
|
|
|
902636 |
__u64 buf; /* buffer in userspace */
|
|
|
902636 |
- __u8 ar; /* the access register number */
|
|
|
902636 |
- __u8 reserved[31]; /* should be set to 0 */
|
|
|
902636 |
+ union {
|
|
|
902636 |
+ __u8 ar; /* the access register number */
|
|
|
902636 |
+ __u32 sida_offset; /* offset into the sida */
|
|
|
902636 |
+ __u8 reserved[32]; /* should be set to 0 */
|
|
|
902636 |
+ };
|
|
|
902636 |
};
|
|
|
902636 |
/* types for kvm_s390_mem_op->op */
|
|
|
902636 |
#define KVM_S390_MEMOP_LOGICAL_READ 0
|
|
|
902636 |
#define KVM_S390_MEMOP_LOGICAL_WRITE 1
|
|
|
902636 |
+#define KVM_S390_MEMOP_SIDA_READ 2
|
|
|
902636 |
+#define KVM_S390_MEMOP_SIDA_WRITE 3
|
|
|
902636 |
/* flags for kvm_s390_mem_op->flags */
|
|
|
902636 |
#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
|
|
|
902636 |
#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
|
|
|
902636 |
@@ -1000,6 +1005,12 @@ struct kvm_ppc_resize_hpt {
|
|
|
902636 |
#define KVM_CAP_PMU_EVENT_FILTER 173
|
|
|
902636 |
#define KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 174
|
|
|
902636 |
#define KVM_CAP_HYPERV_DIRECT_TLBFLUSH 175
|
|
|
902636 |
+#define KVM_CAP_PPC_GUEST_DEBUG_SSTEP 176
|
|
|
902636 |
+#define KVM_CAP_ARM_NISV_TO_USER 177
|
|
|
902636 |
+#define KVM_CAP_ARM_INJECT_EXT_DABT 178
|
|
|
902636 |
+#define KVM_CAP_S390_VCPU_RESETS 179
|
|
|
902636 |
+#define KVM_CAP_S390_PROTECTED 180
|
|
|
902636 |
+#define KVM_CAP_PPC_SECURE_GUEST 181
|
|
|
902636 |
|
|
|
902636 |
#ifdef KVM_CAP_IRQ_ROUTING
|
|
|
902636 |
|
|
|
902636 |
@@ -1461,6 +1472,43 @@ struct kvm_enc_region {
|
|
|
902636 |
/* Available with KVM_CAP_ARM_SVE */
|
|
|
902636 |
#define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int)
|
|
|
902636 |
|
|
|
902636 |
+/* Available with KVM_CAP_S390_VCPU_RESETS */
|
|
|
902636 |
+#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3)
|
|
|
902636 |
+#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4)
|
|
|
902636 |
+
|
|
|
902636 |
+struct kvm_s390_pv_sec_parm {
|
|
|
902636 |
+ __u64 origin;
|
|
|
902636 |
+ __u64 length;
|
|
|
902636 |
+};
|
|
|
902636 |
+
|
|
|
902636 |
+struct kvm_s390_pv_unp {
|
|
|
902636 |
+ __u64 addr;
|
|
|
902636 |
+ __u64 size;
|
|
|
902636 |
+ __u64 tweak;
|
|
|
902636 |
+};
|
|
|
902636 |
+
|
|
|
902636 |
+enum pv_cmd_id {
|
|
|
902636 |
+ KVM_PV_ENABLE,
|
|
|
902636 |
+ KVM_PV_DISABLE,
|
|
|
902636 |
+ KVM_PV_SET_SEC_PARMS,
|
|
|
902636 |
+ KVM_PV_UNPACK,
|
|
|
902636 |
+ KVM_PV_VERIFY,
|
|
|
902636 |
+ KVM_PV_PREP_RESET,
|
|
|
902636 |
+ KVM_PV_UNSHARE_ALL,
|
|
|
902636 |
+};
|
|
|
902636 |
+
|
|
|
902636 |
+struct kvm_pv_cmd {
|
|
|
902636 |
+ __u32 cmd; /* Command to be executed */
|
|
|
902636 |
+ __u16 rc; /* Ultravisor return code */
|
|
|
902636 |
+ __u16 rrc; /* Ultravisor return reason code */
|
|
|
902636 |
+ __u64 data; /* Data or address */
|
|
|
902636 |
+ __u32 flags; /* flags for future extensions. Must be 0 for now */
|
|
|
902636 |
+ __u32 reserved[3];
|
|
|
902636 |
+};
|
|
|
902636 |
+
|
|
|
902636 |
+/* Available with KVM_CAP_S390_PROTECTED */
|
|
|
902636 |
+#define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd)
|
|
|
902636 |
+
|
|
|
902636 |
/* Secure Encrypted Virtualization command */
|
|
|
902636 |
enum sev_cmd_id {
|
|
|
902636 |
/* Guest initialization commands */
|
|
|
902636 |
@@ -1611,4 +1659,7 @@ struct kvm_hyperv_eventfd {
|
|
|
902636 |
#define KVM_HYPERV_CONN_ID_MASK 0x00ffffff
|
|
|
902636 |
#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)
|
|
|
902636 |
|
|
|
902636 |
+#define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0)
|
|
|
902636 |
+#define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1)
|
|
|
902636 |
+
|
|
|
902636 |
#endif /* __LINUX_KVM_H */
|
|
|
902636 |
--
|
|
|
902636 |
2.27.0
|
|
|
902636 |
|