KVM: SVM: Drop superfluous "cache" of AVIC Physical ID entry pointer
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:18 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:53:01 +0000 (13:53 -0700)
commitd29433336a7b4783546cdca3096c3aee36610e70
tree360336b771d6f0f84b72cc8d88a540d084b29a8f
parent26baab4eea4c135c2a2d2b5529a7a0467fba5bef
KVM: SVM: Drop superfluous "cache" of AVIC Physical ID entry pointer

Drop the vCPU's pointer to its AVIC Physical ID entry, and simply index
the table directly.  Caching a pointer address is completely unnecessary
for performance, and while the field technically caches the result of the
pointer calculation, it's all too easy to misinterpret the name and think
that the field somehow caches the _data_ in the table.

No functional change intended.

Suggested-by: Maxim Levitsky <mlevitsk@redhat.com>
Tested-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>
Link: https://lore.kernel.org/r/20250611224604.313496-17-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.h