KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments
authorSean Christopherson <seanjc@google.com>
Tue, 1 Nov 2022 14:53:41 +0000 (15:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Nov 2022 17:58:58 +0000 (12:58 -0500)
commit68ae7c7bc56a4504ed5efde7c2f8d6024148a35e
tree2d5f8b3844818dc8d0a6d85f7dafc3dcb676c8c1
parent381fc63ac0754e05d3921e9d399b89dfdfd2b2e5
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>
arch/x86/include/asm/svm.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/svm/svm_onhyperv.c
arch/x86/kvm/svm/svm_onhyperv.h
tools/testing/selftests/kvm/include/x86_64/svm.h
tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c