diff options
author | 2021-02-04 16:57:50 -0800 | |
---|---|---|
committer | 2021-03-15 04:43:22 -0400 | |
commit | c8781feaf1b590dd4363b76327088561cbeaa6f5 (patch) | |
tree | df8d23b482969446568c3e31b47c79ad206237fd | |
parent | KVM: SVM: Don't manually emulate RDPMC if nrips=0 (diff) | |
download | linux-dev-c8781feaf1b590dd4363b76327088561cbeaa6f5.tar.xz linux-dev-c8781feaf1b590dd4363b76327088561cbeaa6f5.zip |
KVM: SVM: Skip intercepted PAUSE instructions after emulation
Skip PAUSE after interception to avoid unnecessarily re-executing the
instruction in the guest, e.g. after regaining control post-yield.
This is a benign bug as KVM disables PAUSE interception if filtering is
off, including the case where pause_filter_count is set to zero.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210205005750.3841462-10-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/svm/svm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 100cf2419587..74f2658cfd52 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -2980,7 +2980,7 @@ static int pause_interception(struct kvm_vcpu *vcpu) grow_ple_window(vcpu); kvm_vcpu_on_spin(vcpu, in_kernel); - return 1; + return kvm_skip_emulated_instruction(vcpu); } static int invpcid_interception(struct kvm_vcpu *vcpu) |