yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-linux-headers-synchronize-generic-and-x86-KVM-header.patch

Pablo Greco e6a3ae
From 4a8e202ddd9bde207a5a9caaee6e0f06399a3052 Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Date: Mon, 22 Jul 2019 18:22:13 +0100
Pablo Greco e6a3ae
Subject: [PATCH 32/39] linux-headers: synchronize generic and x86 KVM headers
Pablo Greco e6a3ae
 with upstream [rhel-only]
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
Message-id: <20190722182220.19374-12-pbonzini@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 89628
Pablo Greco e6a3ae
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 11/18] linux-headers: synchronize generic and x86 KVM headers with upstream [rhel-only]
Pablo Greco e6a3ae
Bugzilla: 1689269
Pablo Greco e6a3ae
RH-Acked-by: Peter Xu <zhexu@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
From: Liran Alon <liran.alon@oracle.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Relevant files copied from upstream QEMU at commit
Pablo Greco e6a3ae
1d33bea4d013104f01d1c4badc4c670e55c16cca.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 linux-headers/asm-x86/kvm.h | 76 ++++++++++++++++++++++++++++++++++++--
Pablo Greco e6a3ae
 linux-headers/linux/kvm.h   | 89 +++++++++++++++++++++++++++++++++++++++++++--
Pablo Greco e6a3ae
 2 files changed, 158 insertions(+), 7 deletions(-)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
Pablo Greco e6a3ae
index dcf4dc9..6e7dd79 100644
Pablo Greco e6a3ae
--- a/linux-headers/asm-x86/kvm.h
Pablo Greco e6a3ae
+++ b/linux-headers/asm-x86/kvm.h
Pablo Greco e6a3ae
@@ -288,6 +288,7 @@ struct kvm_reinject_control {
Pablo Greco e6a3ae
 #define KVM_VCPUEVENT_VALID_SIPI_VECTOR	0x00000002
Pablo Greco e6a3ae
 #define KVM_VCPUEVENT_VALID_SHADOW	0x00000004
Pablo Greco e6a3ae
 #define KVM_VCPUEVENT_VALID_SMM		0x00000008
Pablo Greco e6a3ae
+#define KVM_VCPUEVENT_VALID_PAYLOAD	0x00000010
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 /* Interrupt shadow states */
Pablo Greco e6a3ae
 #define KVM_X86_SHADOW_INT_MOV_SS	0x01
Pablo Greco e6a3ae
@@ -299,7 +300,7 @@ struct kvm_vcpu_events {
Pablo Greco e6a3ae
 		__u8 injected;
Pablo Greco e6a3ae
 		__u8 nr;
Pablo Greco e6a3ae
 		__u8 has_error_code;
Pablo Greco e6a3ae
-		__u8 pad;
Pablo Greco e6a3ae
+		__u8 pending;
Pablo Greco e6a3ae
 		__u32 error_code;
Pablo Greco e6a3ae
 	} exception;
Pablo Greco e6a3ae
 	struct {
Pablo Greco e6a3ae
@@ -322,7 +323,9 @@ struct kvm_vcpu_events {
Pablo Greco e6a3ae
 		__u8 smm_inside_nmi;
Pablo Greco e6a3ae
 		__u8 latched_init;
Pablo Greco e6a3ae
 	} smi;
Pablo Greco e6a3ae
-	__u32 reserved[9];
Pablo Greco e6a3ae
+	__u8 reserved[27];
Pablo Greco e6a3ae
+	__u8 exception_has_payload;
Pablo Greco e6a3ae
+	__u64 exception_payload;
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 /* for KVM_GET/SET_DEBUGREGS */
Pablo Greco e6a3ae
@@ -354,12 +357,79 @@ struct kvm_xcrs {
Pablo Greco e6a3ae
 	__u64 padding[16];
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
-/* definition of registers in kvm_run */
Pablo Greco e6a3ae
+#define KVM_SYNC_X86_REGS      (1UL << 0)
Pablo Greco e6a3ae
+#define KVM_SYNC_X86_SREGS     (1UL << 1)
Pablo Greco e6a3ae
+#define KVM_SYNC_X86_EVENTS    (1UL << 2)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+#define KVM_SYNC_X86_VALID_FIELDS \
Pablo Greco e6a3ae
+	(KVM_SYNC_X86_REGS| \
Pablo Greco e6a3ae
+	 KVM_SYNC_X86_SREGS| \
Pablo Greco e6a3ae
+	 KVM_SYNC_X86_EVENTS)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+/* kvm_sync_regs struct included by kvm_run struct */
Pablo Greco e6a3ae
 struct kvm_sync_regs {
Pablo Greco e6a3ae
+	/* Members of this structure are potentially malicious.
Pablo Greco e6a3ae
+	 * Care must be taken by code reading, esp. interpreting,
Pablo Greco e6a3ae
+	 * data fields from them inside KVM to prevent TOCTOU and
Pablo Greco e6a3ae
+	 * double-fetch types of vulnerabilities.
Pablo Greco e6a3ae
+	 */
Pablo Greco e6a3ae
+	struct kvm_regs regs;
Pablo Greco e6a3ae
+	struct kvm_sregs sregs;
Pablo Greco e6a3ae
+	struct kvm_vcpu_events events;
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 #define KVM_X86_QUIRK_LINT0_REENABLED	(1 << 0)
Pablo Greco e6a3ae
 #define KVM_X86_QUIRK_CD_NW_CLEARED	(1 << 1)
Pablo Greco e6a3ae
 #define KVM_X86_QUIRK_LAPIC_MMIO_HOLE	(1 << 2)
Pablo Greco e6a3ae
+#define KVM_X86_QUIRK_OUT_7E_INC_RIP	(1 << 3)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_FORMAT_VMX	0
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_FORMAT_SVM	1
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_GUEST_MODE	0x00000001
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_RUN_PENDING	0x00000002
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_EVMCS		0x00000004
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_VMX_VMCS_SIZE	0x1000
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_SMM_GUEST_MODE	0x00000001
Pablo Greco e6a3ae
+#define KVM_STATE_NESTED_SMM_VMXON	0x00000002
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+struct kvm_vmx_nested_state_data {
Pablo Greco e6a3ae
+	__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
Pablo Greco e6a3ae
+	__u8 shadow_vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
Pablo Greco e6a3ae
+};
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+struct kvm_vmx_nested_state_hdr {
Pablo Greco e6a3ae
+	__u64 vmxon_pa;
Pablo Greco e6a3ae
+	__u64 vmcs12_pa;
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+	struct {
Pablo Greco e6a3ae
+		__u16 flags;
Pablo Greco e6a3ae
+	} smm;
Pablo Greco e6a3ae
+};
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+/* for KVM_CAP_NESTED_STATE */
Pablo Greco e6a3ae
+struct kvm_nested_state {
Pablo Greco e6a3ae
+	__u16 flags;
Pablo Greco e6a3ae
+	__u16 format;
Pablo Greco e6a3ae
+	__u32 size;
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+	union {
Pablo Greco e6a3ae
+		struct kvm_vmx_nested_state_hdr vmx;
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+		/* Pad the header to 128 bytes.  */
Pablo Greco e6a3ae
+		__u8 pad[120];
Pablo Greco e6a3ae
+	} hdr;
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+	/*
Pablo Greco e6a3ae
+	 * Define data region as 0 bytes to preserve backwards-compatability
Pablo Greco e6a3ae
+	 * to old definition of kvm_nested_state in order to avoid changing
Pablo Greco e6a3ae
+	 * KVM_{GET,PUT}_NESTED_STATE ioctl values.
Pablo Greco e6a3ae
+	 */
Pablo Greco e6a3ae
+	union {
Pablo Greco e6a3ae
+		struct kvm_vmx_nested_state_data vmx[0];
Pablo Greco e6a3ae
+	} data;
Pablo Greco e6a3ae
+};
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 #endif /* _ASM_X86_KVM_H */
Pablo Greco e6a3ae
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
Pablo Greco e6a3ae
index 8be1232..c8423e7 100644
Pablo Greco e6a3ae
--- a/linux-headers/linux/kvm.h
Pablo Greco e6a3ae
+++ b/linux-headers/linux/kvm.h
Pablo Greco e6a3ae
@@ -396,6 +396,10 @@ struct kvm_run {
Pablo Greco e6a3ae
 		char padding[256];
Pablo Greco e6a3ae
 	};
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
+	/* 2048 is the size of the char array used to bound/pad the size
Pablo Greco e6a3ae
+	 * of the union that holds sync regs.
Pablo Greco e6a3ae
+	 */
Pablo Greco e6a3ae
+	#define SYNC_REGS_SIZE_BYTES 2048
Pablo Greco e6a3ae
 	/*
Pablo Greco e6a3ae
 	 * shared registers between kvm and userspace.
Pablo Greco e6a3ae
 	 * kvm_valid_regs specifies the register classes set by the host
Pablo Greco e6a3ae
@@ -407,7 +411,7 @@ struct kvm_run {
Pablo Greco e6a3ae
 	__u64 kvm_dirty_regs;
Pablo Greco e6a3ae
 	union {
Pablo Greco e6a3ae
 		struct kvm_sync_regs regs;
Pablo Greco e6a3ae
-		char padding[2048];
Pablo Greco e6a3ae
+		char padding[SYNC_REGS_SIZE_BYTES];
Pablo Greco e6a3ae
 	} s;
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
@@ -416,13 +420,19 @@ struct kvm_run {
Pablo Greco e6a3ae
 struct kvm_coalesced_mmio_zone {
Pablo Greco e6a3ae
 	__u64 addr;
Pablo Greco e6a3ae
 	__u32 size;
Pablo Greco e6a3ae
-	__u32 pad;
Pablo Greco e6a3ae
+	union {
Pablo Greco e6a3ae
+		__u32 pad;
Pablo Greco e6a3ae
+		__u32 pio;
Pablo Greco e6a3ae
+	};
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 struct kvm_coalesced_mmio {
Pablo Greco e6a3ae
 	__u64 phys_addr;
Pablo Greco e6a3ae
 	__u32 len;
Pablo Greco e6a3ae
-	__u32 pad;
Pablo Greco e6a3ae
+	union {
Pablo Greco e6a3ae
+		__u32 pad;
Pablo Greco e6a3ae
+		__u32 pio;
Pablo Greco e6a3ae
+	};
Pablo Greco e6a3ae
 	__u8  data[8];
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
@@ -482,6 +492,17 @@ struct kvm_dirty_log {
Pablo Greco e6a3ae
 	};
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
+/* for KVM_CLEAR_DIRTY_LOG */
Pablo Greco e6a3ae
+struct kvm_clear_dirty_log {
Pablo Greco e6a3ae
+	__u32 slot;
Pablo Greco e6a3ae
+	__u32 num_pages;
Pablo Greco e6a3ae
+	__u64 first_page;
Pablo Greco e6a3ae
+	union {
Pablo Greco e6a3ae
+		void *dirty_bitmap; /* one bit per page */
Pablo Greco e6a3ae
+		__u64 padding2;
Pablo Greco e6a3ae
+	};
Pablo Greco e6a3ae
+};
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
 /* for KVM_SET_SIGNAL_MASK */
Pablo Greco e6a3ae
 struct kvm_signal_mask {
Pablo Greco e6a3ae
 	__u32 len;
Pablo Greco e6a3ae
@@ -672,6 +693,13 @@ struct kvm_ioeventfd {
Pablo Greco e6a3ae
 	__u8  pad[36];
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
+#define KVM_X86_DISABLE_EXITS_MWAIT          (1 << 0)
Pablo Greco e6a3ae
+#define KVM_X86_DISABLE_EXITS_HLT            (1 << 1)
Pablo Greco e6a3ae
+#define KVM_X86_DISABLE_EXITS_PAUSE          (1 << 2)
Pablo Greco e6a3ae
+#define KVM_X86_DISABLE_VALID_EXITS          (KVM_X86_DISABLE_EXITS_MWAIT | \
Pablo Greco e6a3ae
+                                              KVM_X86_DISABLE_EXITS_HLT | \
Pablo Greco e6a3ae
+                                              KVM_X86_DISABLE_EXITS_PAUSE)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
 /* for KVM_ENABLE_CAP */
Pablo Greco e6a3ae
 struct kvm_enable_cap {
Pablo Greco e6a3ae
 	/* in */
Pablo Greco e6a3ae
@@ -708,6 +736,7 @@ struct kvm_ppc_one_seg_page_size {
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 #define KVM_PPC_PAGE_SIZES_REAL		0x00000001
Pablo Greco e6a3ae
 #define KVM_PPC_1T_SEGMENTS		0x00000002
Pablo Greco e6a3ae
+#define KVM_PPC_NO_HASH			0x00000004
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 struct kvm_ppc_smmu_info {
Pablo Greco e6a3ae
 	__u64 flags;
Pablo Greco e6a3ae
@@ -740,6 +769,15 @@ struct kvm_ppc_resize_hpt {
Pablo Greco e6a3ae
 #define KVM_S390_SIE_PAGE_OFFSET 1
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 /*
Pablo Greco e6a3ae
+ * On arm64, machine type can be used to request the physical
Pablo Greco e6a3ae
+ * address size for the VM. Bits[7-0] are reserved for the guest
Pablo Greco e6a3ae
+ * PA size shift (i.e, log2(PA_Size)). For backward compatibility,
Pablo Greco e6a3ae
+ * value 0 implies the default IPA size, 40bits.
Pablo Greco e6a3ae
+ */
Pablo Greco e6a3ae
+#define KVM_VM_TYPE_ARM_IPA_SIZE_MASK	0xffULL
Pablo Greco e6a3ae
+#define KVM_VM_TYPE_ARM_IPA_SIZE(x)		\
Pablo Greco e6a3ae
+	((x) & KVM_VM_TYPE_ARM_IPA_SIZE_MASK)
Pablo Greco e6a3ae
+/*
Pablo Greco e6a3ae
  * ioctls for /dev/kvm fds:
Pablo Greco e6a3ae
  */
Pablo Greco e6a3ae
 #define KVM_GET_API_VERSION       _IO(KVMIO,   0x00)
Pablo Greco e6a3ae
@@ -925,7 +963,7 @@ struct kvm_ppc_resize_hpt {
Pablo Greco e6a3ae
 #define KVM_CAP_S390_GS 140
Pablo Greco e6a3ae
 #define KVM_CAP_S390_AIS 141
Pablo Greco e6a3ae
 #define KVM_CAP_SPAPR_TCE_VFIO 142
Pablo Greco e6a3ae
-#define KVM_CAP_X86_GUEST_MWAIT 143
Pablo Greco e6a3ae
+#define KVM_CAP_X86_DISABLE_EXITS 143
Pablo Greco e6a3ae
 #define KVM_CAP_ARM_USER_IRQ 144
Pablo Greco e6a3ae
 #define KVM_CAP_S390_CMMA_MIGRATION 145
Pablo Greco e6a3ae
 #define KVM_CAP_PPC_FWNMI 146
Pablo Greco e6a3ae
@@ -936,11 +974,25 @@ struct kvm_ppc_resize_hpt {
Pablo Greco e6a3ae
 #define KVM_CAP_PPC_GET_CPU_CHAR 151
Pablo Greco e6a3ae
 #define KVM_CAP_S390_BPB 152
Pablo Greco e6a3ae
 #define KVM_CAP_GET_MSR_FEATURES 153
Pablo Greco e6a3ae
+#define KVM_CAP_HYPERV_EVENTFD 154
Pablo Greco e6a3ae
+#define KVM_CAP_HYPERV_TLBFLUSH 155
Pablo Greco e6a3ae
 #define KVM_CAP_S390_HPAGE_1M 156
Pablo Greco e6a3ae
 #define KVM_CAP_NESTED_STATE 157
Pablo Greco e6a3ae
 #define KVM_CAP_ARM_INJECT_SERROR_ESR 158
Pablo Greco e6a3ae
 #define KVM_CAP_MSR_PLATFORM_INFO 159
Pablo Greco e6a3ae
 #define KVM_CAP_PPC_NESTED_HV 160
Pablo Greco e6a3ae
+#define KVM_CAP_HYPERV_SEND_IPI 161
Pablo Greco e6a3ae
+#define KVM_CAP_COALESCED_PIO 162
Pablo Greco e6a3ae
+#define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163
Pablo Greco e6a3ae
+#define KVM_CAP_EXCEPTION_PAYLOAD 164
Pablo Greco e6a3ae
+#define KVM_CAP_ARM_VM_IPA_SIZE 165
Pablo Greco e6a3ae
+#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 /* Obsolete */
Pablo Greco e6a3ae
+#define KVM_CAP_HYPERV_CPUID 167
Pablo Greco e6a3ae
+#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 168
Pablo Greco e6a3ae
+#define KVM_CAP_PPC_IRQ_XIVE 169
Pablo Greco e6a3ae
+#define KVM_CAP_ARM_SVE 170
Pablo Greco e6a3ae
+#define KVM_CAP_ARM_PTRAUTH_ADDRESS 171
Pablo Greco e6a3ae
+#define KVM_CAP_ARM_PTRAUTH_GENERIC 172
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 #ifdef KVM_CAP_IRQ_ROUTING
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
@@ -1098,6 +1150,7 @@ struct kvm_dirty_tlb {
Pablo Greco e6a3ae
 #define KVM_REG_SIZE_U256	0x0050000000000000ULL
Pablo Greco e6a3ae
 #define KVM_REG_SIZE_U512	0x0060000000000000ULL
Pablo Greco e6a3ae
 #define KVM_REG_SIZE_U1024	0x0070000000000000ULL
Pablo Greco e6a3ae
+#define KVM_REG_SIZE_U2048	0x0080000000000000ULL
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 struct kvm_reg_list {
Pablo Greco e6a3ae
 	__u64 n; /* number of regs */
Pablo Greco e6a3ae
@@ -1164,6 +1217,8 @@ enum kvm_device_type {
Pablo Greco e6a3ae
 #define KVM_DEV_TYPE_ARM_VGIC_V3	KVM_DEV_TYPE_ARM_VGIC_V3
Pablo Greco e6a3ae
 	KVM_DEV_TYPE_ARM_VGIC_ITS,
Pablo Greco e6a3ae
 #define KVM_DEV_TYPE_ARM_VGIC_ITS	KVM_DEV_TYPE_ARM_VGIC_ITS
Pablo Greco e6a3ae
+	KVM_DEV_TYPE_XIVE,
Pablo Greco e6a3ae
+#define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE
Pablo Greco e6a3ae
 	KVM_DEV_TYPE_MAX,
Pablo Greco e6a3ae
 };
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
@@ -1380,6 +1435,22 @@ struct kvm_enc_region {
Pablo Greco e6a3ae
 #define KVM_MEMORY_ENCRYPT_REG_REGION    _IOR(KVMIO, 0xbb, struct kvm_enc_region)
Pablo Greco e6a3ae
 #define KVM_MEMORY_ENCRYPT_UNREG_REGION  _IOR(KVMIO, 0xbc, struct kvm_enc_region)
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
+/* Available with KVM_CAP_HYPERV_EVENTFD */
Pablo Greco e6a3ae
+#define KVM_HYPERV_EVENTFD        _IOW(KVMIO,  0xbd, struct kvm_hyperv_eventfd)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+/* Available with KVM_CAP_NESTED_STATE */
Pablo Greco e6a3ae
+#define KVM_GET_NESTED_STATE         _IOWR(KVMIO, 0xbe, struct kvm_nested_state)
Pablo Greco e6a3ae
+#define KVM_SET_NESTED_STATE         _IOW(KVMIO,  0xbf, struct kvm_nested_state)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */
Pablo Greco e6a3ae
+#define KVM_CLEAR_DIRTY_LOG          _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+/* Available with KVM_CAP_HYPERV_CPUID */
Pablo Greco e6a3ae
+#define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+/* Available with KVM_CAP_ARM_SVE */
Pablo Greco e6a3ae
+#define KVM_ARM_VCPU_FINALIZE	  _IOW(KVMIO,  0xc2, int)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
 /* Secure Encrypted Virtualization command */
Pablo Greco e6a3ae
 enum sev_cmd_id {
Pablo Greco e6a3ae
 	/* Guest initialization commands */
Pablo Greco e6a3ae
@@ -1520,4 +1591,14 @@ struct kvm_assigned_msix_entry {
Pablo Greco e6a3ae
 #define KVM_ARM_DEV_EL1_PTIMER		(1 << 1)
Pablo Greco e6a3ae
 #define KVM_ARM_DEV_PMU			(1 << 2)
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
+struct kvm_hyperv_eventfd {
Pablo Greco e6a3ae
+	__u32 conn_id;
Pablo Greco e6a3ae
+	__s32 fd;
Pablo Greco e6a3ae
+	__u32 flags;
Pablo Greco e6a3ae
+	__u32 padding[3];
Pablo Greco e6a3ae
+};
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
+#define KVM_HYPERV_CONN_ID_MASK		0x00ffffff
Pablo Greco e6a3ae
+#define KVM_HYPERV_EVENTFD_DEASSIGN	(1 << 0)
Pablo Greco e6a3ae
+
Pablo Greco e6a3ae
 #endif /* __LINUX_KVM_H */
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae