KVM: x86: latch INITs while in system management mode
Do not process INITs immediately while in system management mode, keep it instead in apic->pending_events. Tell userspace if an INIT is pending when they issue GET_VCPU_EVENTS, and similarly handle the new field in SET_VCPU_EVENTS. Note that the same treatment should be done while in VMX non-root mode. Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -5482,6 +5482,9 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu)
|
||||
if (unlikely(vcpu->arch.smi_pending)) {
|
||||
kvm_make_request(KVM_REQ_SMI, vcpu);
|
||||
vcpu->arch.smi_pending = 0;
|
||||
} else {
|
||||
/* Process a latched INIT, if any. */
|
||||
kvm_make_request(KVM_REQ_EVENT, vcpu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user