summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorLadi Prosek2017-10-11 16:54:41 +0200
committerPaolo Bonzini2017-10-12 14:01:55 +0200
commit72d7b374b14d67e973bce476e4a75552478cc42d (patch)
tree6124240991e78d9e00afd6328e9650523bfe8669 /arch/x86/kvm/vmx.c
parentKVM: x86: introduce ISA specific SMM entry/exit callbacks (diff)
downloadkernel-qcow2-linux-72d7b374b14d67e973bce476e4a75552478cc42d.tar.gz
kernel-qcow2-linux-72d7b374b14d67e973bce476e4a75552478cc42d.tar.xz
kernel-qcow2-linux-72d7b374b14d67e973bce476e4a75552478cc42d.zip
KVM: x86: introduce ISA specific smi_allowed callback
Similar to NMI, there may be ISA specific reasons why an SMI cannot be injected into the guest. This commit adds a new smi_allowed callback to be implemented in following commits. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 1305bb65688b..156ecbaad1e6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -11916,6 +11916,11 @@ static void vmx_setup_mce(struct kvm_vcpu *vcpu)
~FEATURE_CONTROL_LMCE;
}
+static int vmx_smi_allowed(struct kvm_vcpu *vcpu)
+{
+ return 1;
+}
+
static int vmx_pre_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
{
/* TODO: Implement */
@@ -12054,6 +12059,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = {
.setup_mce = vmx_setup_mce,
+ .smi_allowed = vmx_smi_allowed,
.pre_enter_smm = vmx_pre_enter_smm,
.pre_leave_smm = vmx_pre_leave_smm,
};