KVM: x86: Add helpers to recalc physical vs. logical optimized APIC maps
authorSean Christopherson <seanjc@google.com>
Fri, 6 Jan 2023 01:13:06 +0000 (01:13 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Jan 2023 15:45:35 +0000 (10:45 -0500)
commit72c70ceeaf59330b1d63380add768bdbdeb24b7c
treed2d04a009b7f19201c3774148656f0092d0d817d
parentd471bd853d38117c90ec02ecc51b3ca731674745
KVM: x86: Add helpers to recalc physical vs. logical optimized APIC maps

Move the guts of kvm_recalculate_apic_map()'s main loop to two separate
helpers to handle recalculating the physical and logical pieces of the
optimized map.  Having 100+ lines of code in the for-loop makes it hard
to understand what is being calculated where.

No functional change intended.

Suggested-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-34-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c