aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/smm.c
diff options
context:
space:
mode:
authorGravatar Maxim Levitsky <mlevitsk@redhat.com> 2022-11-29 21:37:11 +0200
committerGravatar Sean Christopherson <seanjc@google.com> 2023-01-31 17:29:09 -0800
commit32e69f232db4ca11f26e5961daeff93906ce232f (patch)
tree87242fe5c003a90cba2906207ff9d339365ec0e1 /arch/x86/kvm/smm.c
parentKVM: x86: Move HF_NMI_MASK and HF_IRET_MASK into "struct vcpu_svm" (diff)
downloadlinux-32e69f232db4ca11f26e5961daeff93906ce232f.tar.gz
linux-32e69f232db4ca11f26e5961daeff93906ce232f.tar.bz2
linux-32e69f232db4ca11f26e5961daeff93906ce232f.zip
KVM: x86: Use emulator callbacks instead of duplicating "host flags"
Instead of re-defining the "host flags" bits, just expose dedicated helpers for each of the two remaining flags that are consumed by the emulator. The emulator never consumes both "is guest" and "is SMM" in close proximity, so there is no motivation to avoid additional indirect branches. Also while at it, garbage collect the recently removed host flags. No functional change is intended. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Tested-by: Santosh Shukla <Santosh.Shukla@amd.com> Link: https://lore.kernel.org/r/20221129193717.513824-6-mlevitsk@redhat.com [sean: fix CONFIG_KVM_SMM=n builds, tweak names of wrappers] Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/smm.c')
-rw-r--r--arch/x86/kvm/smm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/smm.c b/arch/x86/kvm/smm.c
index cc43638d48a3..b42111a24cc2 100644
--- a/arch/x86/kvm/smm.c
+++ b/arch/x86/kvm/smm.c
@@ -111,8 +111,6 @@ static void check_smram_offsets(void)
void kvm_smm_changed(struct kvm_vcpu *vcpu, bool entering_smm)
{
- BUILD_BUG_ON(HF_SMM_MASK != X86EMUL_SMM_MASK);
-
trace_kvm_smm_transition(vcpu->vcpu_id, vcpu->arch.smbase, entering_smm);
if (entering_smm) {