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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:35:12 +0000 (12:35 +0200)
commit8eb5ca7f344e55ed3eb2f23824448054251c80e4
treee6c65254ada1addcae696ab87d0e69c9f80a16f5
parent38b091c8a3f25739d6ea096b0ccbe23c26450140
KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments

[ Upstream commit 68ae7c7bc56a4504ed5efde7c2f8d6024148a35e ]

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>
Stable-dep-of: e5c972c1fada ("KVM: SVM: Flush Hyper-V TLB when required")
Signed-off-by: Sasha Levin <sashal@kernel.org>
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