]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: APICv: drop immediate APICv disablement on current vCPU
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 13 Jul 2021 14:20:19 +0000 (17:20 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:48 +0000 (11:01 -0400)
commit3f44476a5fd340721264fa94b0c3d4a321d1e6b8
tree842ee83ff8f9e4b5d06298ab7801246a2efb16c2
parent78d0aae2c34794f68a1ae5cafd388d8d94c251ad
KVM: x86: APICv: drop immediate APICv disablement on current vCPU

Special case of disabling the APICv on the current vCPU right away in
kvm_request_apicv_update doesn't bring much benefit vs raising
KVM_REQ_APICV_UPDATE on it instead, since this request will be processed
on the next entry to the guest.
(the comment about having another #VMEXIT is wrong).

It also hides various assumptions that APIVc enable state matches
the APICv inhibit state, as this special case only makes those states
match on the current vCPU.

Previous patches fixed few such assumptions so now it should be safe
to drop this special case.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210713142023.106183-5-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c