aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/smm.h
diff options
context:
space:
mode:
authorGravatar Paolo Bonzini <pbonzini@redhat.com> 2022-09-29 13:20:14 -0400
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2022-11-09 12:31:19 -0500
commit31e83e21cf00fe5b669eb352ff3ed70e74b40fad (patch)
tree32e3b3a6364ed65869853abd8315e723d538bbf5 /arch/x86/kvm/smm.h
parentKVM: allow compiling out SMM support (diff)
downloadlinux-31e83e21cf00fe5b669eb352ff3ed70e74b40fad.tar.gz
linux-31e83e21cf00fe5b669eb352ff3ed70e74b40fad.tar.bz2
linux-31e83e21cf00fe5b669eb352ff3ed70e74b40fad.zip
KVM: x86: compile out vendor-specific code if SMM is disabled
Vendor-specific code that deals with SMI injection and saving/restoring SMM state is not needed if CONFIG_KVM_SMM is disabled, so remove the four callbacks smi_allowed, enter_smm, leave_smm and enable_smi_window. The users in svm/nested.c and x86.c also have to be compiled out; the amount of #ifdef'ed code is small and it's not worth moving it to smm.c. enter_smm is now used only within #ifdef CONFIG_KVM_SMM, and the stub can therefore be removed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20220929172016.319443-7-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/smm.h')
-rw-r--r--arch/x86/kvm/smm.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/smm.h b/arch/x86/kvm/smm.h
index 0e1bd8bd6dc4..8debe81494c6 100644
--- a/arch/x86/kvm/smm.h
+++ b/arch/x86/kvm/smm.h
@@ -27,7 +27,6 @@ void process_smi(struct kvm_vcpu *vcpu);
#else
static inline int kvm_inject_smi(struct kvm_vcpu *vcpu) { return -ENOTTY; }
static inline bool is_smm(struct kvm_vcpu *vcpu) { return false; }
-static inline void enter_smm(struct kvm_vcpu *vcpu) { WARN_ON_ONCE(1); }
static inline void process_smi(struct kvm_vcpu *vcpu) { WARN_ON_ONCE(1); }
/*