]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: do not set st->preempted when going back to user space
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jun 2022 14:07:11 +0000 (10:07 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:21:06 +0000 (04:21 -0400)
commitd020758f309961482a2ab611f3d95a4de3622b0a
treed7d4efd13d42a72a0e05252689037bc08e126037
parent0f2248ffb9fa3fe0b256dc6bdec1f69de7692d2a
KVM: x86: do not set st->preempted when going back to user space

Similar to the Xen path, only change the vCPU's reported state if the vCPU
was actually preempted.  The reason for KVM's behavior is that for example
optimistic spinning might not be a good idea if the guest is doing repeated
exits to userspace; however, it is confusing and unlikely to make a difference,
because well-tuned guests will hardly ever exit KVM_RUN in the first place.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c
arch/x86/kvm/xen.h