]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Take KVM's SRCU lock only if steal time update is needed
authorSean Christopherson <seanjc@google.com>
Sat, 23 Jan 2021 00:03:34 +0000 (16:03 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:14 +0000 (05:27 -0500)
commit10f76cd4b80a6f4c15a3f8f06403e7bd604f37ea
tree2333c9a496b81bcfd5247b425a313eea321e3a63
parent1e326d80924ff937ee3fa2ac350a786dc09fc669
KVM: x86: Take KVM's SRCU lock only if steal time update is needed

Enter a SRCU critical section for a memslots lookup during steal time
update if and only if a steal time update is actually needed.  Taking
the lock can be avoided if steal time is disabled by the guest, or if
KVM knows it has already flagged the vCPU as being preempted.

Reword the comment to be more precise as to exactly why memslots will
be queried.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210123000334.3123628-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c