Re: [PATCH v3 15/62] KVM: SVM: Drop superfluous "cache" of AVIC Physical ID entry pointer

From: Naveen N Rao
Date: Thu Jun 19 2025 - 07:16:32 EST


On Wed, Jun 11, 2025 at 03:45:18PM -0700, Sean Christopherson wrote:
> 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@xxxxxxxxxx>
> Tested-by: Sairaj Kodilkar <sarunkod@xxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
> arch/x86/kvm/svm/avic.c | 27 +++++++++++++++------------
> arch/x86/kvm/svm/svm.h | 1 -
> 2 files changed, 15 insertions(+), 13 deletions(-)

Reviewed-by: Naveen N Rao (AMD) <naveen@xxxxxxxxxx>

- Naveen