summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/svm.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-04-23 20:22:27 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-13 19:14:21 +0300
commitf74f94140fa50f768e61d626de4c146502b9102d (patch)
treefe70a9a81d8cd3c9ef6f23658d311f05de66b1d4 /arch/x86/kvm/svm/svm.c
parent4aef2ec9022b217f74d0f4c9b84081f07cc223d9 (diff)
downloadlinux-f74f94140fa50f768e61d626de4c146502b9102d.tar.xz
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.c')
-rw-r--r--arch/x86/kvm/svm/svm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index b627564e41f9..c2a4e2d21676 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -3429,6 +3429,7 @@ static enum exit_fastpath_completion svm_vcpu_run(struct kvm_vcpu *vcpu)
sync_cr8_to_lapic(vcpu);
svm->next_rip = 0;
+ svm->nested.nested_run_pending = 0;
svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING;