summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/modules.py
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-06-11 15:45:14 -0700
committerSean Christopherson <seanjc@google.com>2025-06-20 13:52:58 -0700
commitd8527f133c0a810b2e803a03aa186cfef721fbf8 (patch)
tree106f5cd24d72a555e09782f093469bc47f0f2b48 /scripts/gdb/linux/modules.py
parent3338c639da15a87cf57edc79de8409c98b704d87 (diff)
KVM: SVM: Drop vcpu_svm's pointless avic_backing_page field
Drop vcpu_svm's avic_backing_page pointer and instead grab the physical address of KVM's vAPIC page directly from the source. Getting a physical address from a kernel virtual address is not an expensive operation, and getting the physical address from a struct page is *more* expensive for CONFIG_SPARSEMEM=y kernels. Regardless, none of the paths that consume the address are hot paths, i.e. shaving cycles is not a priority. Eliminating the "cache" means KVM doesn't have to worry about the cache being invalid, which will simplify a future fix when dealing with vCPU IDs that are too big. WARN if KVM attempts to allocate a vCPU's AVIC backing page without an in-kernel local APIC. avic_init_vcpu() bails early if the APIC is not in-kernel, and KVM disallows enabling an in-kernel APIC after vCPUs have been created, i.e. it should be impossible to reach avic_init_backing_page() without the vAPIC being allocated. Tested-by: Sairaj Kodilkar <sarunkod@amd.com> Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org> Link: https://lore.kernel.org/r/20250611224604.313496-13-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions