aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/smm.h
diff options
context:
space:
mode:
authorGravatar Paolo Bonzini <pbonzini@redhat.com> 2022-10-28 06:01:26 -0400
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2022-11-09 12:31:18 -0500
commitf1554150d3c694e30e92c681c20ce9714cac3d42 (patch)
tree74b77ecaebc0b9e9228cc030cc709b01c6ba490b /arch/x86/kvm/smm.h
parentKVM: x86: move SMM entry to a new file (diff)
downloadlinux-f1554150d3c694e30e92c681c20ce9714cac3d42.tar.gz
linux-f1554150d3c694e30e92c681c20ce9714cac3d42.tar.bz2
linux-f1554150d3c694e30e92c681c20ce9714cac3d42.zip
KVM: x86: move SMM exit to a new file
Some users of KVM implement the UEFI variable store through a paravirtual device that does not require the "SMM lockbox" component of edk2, and would like to compile out system management mode. In preparation for that, move the SMM exit code out of emulate.c and into a new file. The code is still written as a series of invocations of the emulator callbacks, but the two exiting_smm and leave_smm callbacks are merged into one, and all the code from em_rsm is now part of the callback. This removes all knowledge of the format of the SMM save state area from the emulator. Further patches will clean up the code and invoke KVM's own functions to access control registers, descriptor caches, etc. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20220929172016.319443-4-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, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/smm.h b/arch/x86/kvm/smm.h
index aacc6dac2c99..b0602a92e511 100644
--- a/arch/x86/kvm/smm.h
+++ b/arch/x86/kvm/smm.h
@@ -21,6 +21,7 @@ static inline bool is_smm(struct kvm_vcpu *vcpu)
void kvm_smm_changed(struct kvm_vcpu *vcpu, bool in_smm);
void enter_smm(struct kvm_vcpu *vcpu);
+int emulator_leave_smm(struct x86_emulate_ctxt *ctxt);
void process_smi(struct kvm_vcpu *vcpu);
#endif