KVM: SVM: Add helper to deduplicate code for getting AVIC backing page
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:13 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:57 +0000 (13:52 -0700)
commit3338c639da15a87cf57edc79de8409c98b704d87
treed31c0d31a8c4db3cd19d08dbed9f83a2f22245aa
parent2e002ddc896684f668427113ec027f3025fe6c41
KVM: SVM: Add helper to deduplicate code for getting AVIC backing page

Add a helper to get the physical address of the AVIC backing page, both
to deduplicate code and to prepare for getting the address directly from
apic->regs, at which point it won't be all that obvious that the address
in question is what SVM calls the AVIC backing page.

No functional change intended.

Reviewed-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-12-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c