KVM: nVMX: Add helpers to identify shadowed VMCS fields
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 15:36:28 +0000 (08:36 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:46:47 +0000 (11:46 +0200)
commite2174295b41d8c9115ab246a630d4630724a2cd5
tree3da02ceb03368594324e6ff8c638502e718af5a7
parent3731905ef28fc1a9240d1532b2a9efbaea205dc0
KVM: nVMX: Add helpers to identify shadowed VMCS fields

So that future optimizations related to shadowed fields don't need to
define their own switch statement.

Add a BUILD_BUG_ON() to ensure at least one of the types (RW vs RO) is
defined when including vmcs_shadow_fields.h (guess who keeps mistyping
SHADOW_FIELD_RO as SHADOW_FIELD_R0).

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmcs_shadow_fields.h