]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor, again
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 22:56:15 +0000 (22:56 +0000)
committerSean Christopherson <seanjc@google.com>
Tue, 12 Jul 2022 22:31:13 +0000 (22:31 +0000)
commit9d13b0d1ae93c36bf4c0edd513d10d99f7c963ac
tree1fe69c2d066b9213bc1b4fa7a9d3d50b5aa06495
parente189c32bc859dbd699d19396ff0aca47df1f95aa
KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor, again

Read vcpu->vcpu_idx directly instead of bouncing through the one-line
wrapper, kvm_vcpu_get_idx(), and drop the wrapper.  The wrapper is a
remnant of the original implementation and serves no purpose; remove it
(again) before it gains more users.

kvm_vcpu_get_idx() was removed in the not-too-distant past by commit
03bff44683ac ("KVM: x86: Query vcpu->vcpu_idx directly and drop its
accessor"), but was unintentionally re-introduced by commit 3a6bf41aabf9
("KVM: Keep memslots in tree-based structures instead of array-based ones"),
likely due to a rebase goof.  The wrapper then managed to gain users in
KVM's Xen code.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Link: https://lore.kernel.org/r/20220614225615.3843835-1-seanjc@google.com
arch/x86/kvm/xen.c
include/linux/kvm_host.h