]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Drop AVIC's intermediate avic_set_running() helper
authorSean Christopherson <seanjc@google.com>
Wed, 8 Dec 2021 01:52:31 +0000 (01:52 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Jan 2022 17:14:48 +0000 (12:14 -0500)
commitfd4fa667d0cebc3e4bcfe1e0676f35bce03e59db
treeb52d7a8480650479786b2c2ea3457d4029905769
parentddf5b2f95eb48a935983f082cf1f1be33445d9b8
KVM: SVM: Drop AVIC's intermediate avic_set_running() helper

Drop avic_set_running() in favor of calling avic_vcpu_{load,put}()
directly, and modify the block+put path to use preempt_disable/enable()
instead of get/put_cpu(), as it doesn't actually care about the current
pCPU associated with the vCPU.  Opportunistically add lockdep assertions
as being preempted in avic_vcpu_put() would lead to consuming stale data,
even though doing so _in the current code base_ would not be fatal.

Add a much needed comment explaining why svm_vcpu_blocking() needs to
unload the AVIC and update the IRTE _before_ the vCPU starts blocking.

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