KVM: SVM: introduce nested_run_pending

We want to inject vmexits immediately from svm_check_nested_events,
so that the interrupt/NMI window requests happen in inject_pending_event
right after it returns.

This however has the same issue as in vmx_check_nested_events, so
introduce a nested_run_pending flag with the exact same purpose
of delaying vmexit injection after the vmentry.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini
2020-04-23 13:22:27 -04:00
parent 4aef2ec902
commit f74f94140f
3 changed files with 8 additions and 1 deletions

View File

@@ -97,6 +97,10 @@ struct nested_state {
/* A VMEXIT is required but not yet emulated */
bool exit_required;
/* A VMRUN has started but has not yet been performed, so
* we cannot inject a nested vmexit yet. */
bool nested_run_pending;
/* cache for intercepts of the guest */
u32 intercept_cr;
u32 intercept_dr;