diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-04-23 13:22:27 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-05-13 12:14:21 -0400 |
commit | f74f94140fa50f768e61d626de4c146502b9102d (patch) | |
tree | fe70a9a81d8cd3c9ef6f23658d311f05de66b1d4 /arch/x86/kvm/svm/svm.h | |
parent | 4aef2ec9022b217f74d0f4c9b84081f07cc223d9 (diff) | |
download | linux-f74f94140fa50f768e61d626de4c146502b9102d.tar.gz |
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>
Diffstat (limited to 'arch/x86/kvm/svm/svm.h')
-rw-r--r-- | arch/x86/kvm/svm/svm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h index 98c2890d561d..435f3328c99c 100644 --- a/arch/x86/kvm/svm/svm.h +++ b/arch/x86/kvm/svm/svm.h @@ -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; |