aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/include/asm/svm.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-11-01 15:53:41 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-11-18 12:58:58 -0500
commit68ae7c7bc56a4504ed5efde7c2f8d6024148a35e (patch)
tree2d5f8b3844818dc8d0a6d85f7dafc3dcb676c8c1 /arch/x86/include/asm/svm.h
parentKVM: selftests: Move "struct hv_enlightenments" to x86_64/svm.h (diff)
downloadwireguard-linux-68ae7c7bc56a4504ed5efde7c2f8d6024148a35e.tar.xz
wireguard-linux-68ae7c7bc56a4504ed5efde7c2f8d6024148a35e.zip
KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments
Add a union to provide hv_enlightenments side-by-side with the sw_reserved bytes that Hyper-V's enlightenments overlay. Casting sw_reserved everywhere is messy, confusing, and unnecessarily unsafe. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20221101145426.251680-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/svm.h')
-rw-r--r--arch/x86/include/asm/svm.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 4352b46dd20c..b37249e7c660 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -5,6 +5,8 @@
#include <uapi/asm/svm.h>
#include <uapi/asm/kvm.h>
+#include <asm/hyperv-tlfs.h>
+
/*
* 32-bit intercept words in the VMCB Control Area, starting
* at Byte offset 000h.
@@ -161,7 +163,10 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
* Offset 0x3e0, 32 bytes reserved
* for use by hypervisor/software.
*/
- u8 reserved_sw[32];
+ union {
+ struct hv_enlightenments hv_enlightenments;
+ u8 reserved_sw[32];
+ };
};