Paolo Bonzini 1c96dcceae KVM: x86: fix apic_accept_events vs check_nested_events
vmx_apic_init_signal_blocked is buggy in that it returns true
even in VMX non-root mode.  In non-root mode, however, INITs
are not latched, they just cause a vmexit.  Previously,
KVM was waiting for them to be processed when kvm_apic_accept_events
and in the meanwhile it ate the SIPIs that the processor received.

However, in order to implement the wait-for-SIPI activity state,
KVM will have to process KVM_APIC_SIPI in vmx_check_nested_events,
and it will not be possible anymore to disregard SIPIs in non-root
mode as the code is currently doing.

By calling kvm_x86_ops.nested_ops->check_events, we can force a vmexit
(with the side-effect of latching INITs) before incorrectly injecting
an INIT or SIPI in a guest, and therefore vmx_apic_init_signal_blocked
can do the right thing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-11-15 09:49:08 -05:00
..
2020-10-23 10:06:38 -07:00
2020-11-13 06:28:23 -05:00
2020-10-23 10:06:38 -07:00
2020-10-23 10:06:38 -07:00
2020-10-23 10:06:38 -07:00
2020-10-23 10:06:38 -07:00
2020-10-23 10:06:38 -07:00
2020-10-23 10:06:38 -07:00
2020-10-23 10:06:38 -07:00