KVM: nSVM: Use KVM-governed feature framework to track "vGIF enabled"
authorSean Christopherson <seanjc@google.com>
Tue, 15 Aug 2023 20:36:51 +0000 (13:36 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Aug 2023 18:43:31 +0000 (11:43 -0700)
commitb89456aee78d22b20c6c83c4d75af7985ae5be8d
treee16bfa3993e1d825507dbdc6340df496cd97eba2
parent59d67fc1f0dbb5ee8841d62140efe0fdc4fbabf5
KVM: nSVM: Use KVM-governed feature framework to track "vGIF enabled"

Track "virtual GIF exposed to L1" via a governed feature flag instead of
using a dedicated bit/flag in vcpu_svm.

Note, checking KVM's capabilities instead of the "vgif" param means that
the code isn't strictly equivalent, as vgif_enabled could have been set
if nested=false where as that the governed feature cannot.  But that's a
glorified nop as the feature/flag is consumed only by paths that are

Link: https://lore.kernel.org/r/20230815203653.519297-14-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/governed_features.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h