linux-next/arch/x86/kvm
Sean Christopherson 8166d25579 KVM: x86: Drop superfluous kvm_lapic_set_base() call when setting APIC state
Now that kvm_lapic_set_base() does nothing if the "new" APIC base MSR is
the same as the current value, drop the kvm_lapic_set_base() call in the
KVM_SET_LAPIC flow that passes in the current value, as it too does
nothing.

Note, the purpose of invoking kvm_lapic_set_base() was purely to set
apic->base_address (see commit 5dbc8f3fed ("KVM: use kvm_lapic_set_base()
to change apic_base")).  And there is no evidence that explicitly setting
apic->base_address in KVM_SET_LAPIC ever had any functional impact; even
in the original commit 96ad2cc613 ("KVM: in-kernel LAPIC save and restore
support"), all flows that set apic_base also set apic->base_address to the
same address.  E.g. svm_create_vcpu() did open code a write to apic_base,

	svm->vcpu.apic_base = 0xfee00000 | MSR_IA32_APICBASE_ENABLE;

but it also called kvm_create_lapic() when irqchip_in_kernel() is true.

Reviewed-by: Kai Huang <kai.huang@intel.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20241009181742.1128779-3-seanjc@google.com
Link: https://lore.kernel.org/r/20241101183555.1794700-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-11-04 20:57:45 -08:00
..
mmu KVM: x86: model canonical checks more precisely 2024-11-01 09:22:26 -07:00
svm KVM: x86: Quirk initialization of feature MSRs to KVM's max configuration 2024-11-01 09:22:31 -07:00
vmx KVM: VMX: Remove restriction that PMU version > 0 for PERF_CAPABILITIES 2024-11-01 09:22:33 -07:00
.gitignore KVM: x86: use a separate asm-offsets.c file 2022-11-09 12:10:17 -05:00
cpuid.c KVM: x86: AMD's IBPB is not equivalent to Intel's IBPB 2024-11-01 09:22:20 -07:00
cpuid.h KVM: x86: drop x86.h include from cpuid.h 2024-11-01 09:22:23 -07:00
debugfs.c KVM: Get rid of return value from kvm_arch_create_vm_debugfs() 2024-02-23 21:44:58 +00:00
emulate.c KVM: x86: Add X86EMUL_F_MSR and X86EMUL_F_DT_LOAD to aid canonical checks 2024-11-01 09:22:25 -07:00
fpu.h KVM: x86: Move FPU register accessors into fpu.h 2021-06-17 13:09:24 -04:00
governed_features.h KVM: x86: Use KVM-governed feature framework to track "LAM enabled" 2023-11-28 17:54:09 -08:00
hyperv.c KVM: x86: Introduce kvm_x86_call() to simplify static calls of kvm_x86_ops 2024-07-16 12:14:12 -04:00
hyperv.h KVM: x86: hyper-v: Remove unused inline function kvm_hv_free_pa_page() 2024-08-13 09:28:48 -04:00
i8254.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00
i8254.h KVM: x86: PIT: Preserve state of speaker port data bit 2022-06-08 13:06:20 -04:00
i8259.c KVM: x86: Fix poll command 2023-06-01 13:44:13 -07:00
ioapic.c KVM: x86/ioapic: Resample the pending state of an IRQ when unmasking 2023-03-27 10:13:28 -04:00
ioapic.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
irq_comm.c KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP 2024-06-11 14:18:40 -07:00
irq.c KVM: x86: Fold kvm_get_apic_interrupt() into kvm_cpu_get_interrupt() 2024-09-09 20:15:01 -07:00
irq.h KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP 2024-06-11 14:18:40 -07:00
Kconfig KVM: x86: leave kvm.ko out of the build if no vendor module is requested 2024-10-06 03:53:41 -04:00
kvm_cache_regs.h KVM: x86: Add lockdep-guarded asserts on register cache usage 2024-11-01 09:22:22 -07:00
kvm_emulate.h KVM: x86: Add X86EMUL_F_MSR and X86EMUL_F_DT_LOAD to aid canonical checks 2024-11-01 09:22:25 -07:00
kvm_onhyperv.c KVM: x86/mmu: Move filling of Hyper-V's TLB range struct into Hyper-V code 2023-04-10 15:17:29 -07:00
kvm_onhyperv.h KVM: x86: Move Hyper-V partition assist page out of Hyper-V emulation context 2023-12-07 09:34:01 -08:00
kvm-asm-offsets.c KVM: SVM: move MSR_IA32_SPEC_CTRL save/restore to assembly 2022-11-09 12:25:53 -05:00
lapic.c KVM: x86: Drop superfluous kvm_lapic_set_base() call when setting APIC state 2024-11-04 20:57:45 -08:00
lapic.h Merge tag 'kvm-x86-vmx-6.12' of https://github.com/kvm-x86/linux into HEAD 2024-09-17 12:41:23 -04:00
Makefile KVM: x86: leave kvm.ko out of the build if no vendor module is requested 2024-10-06 03:53:41 -04:00
mmu.h KVM: x86: drop x86.h include from cpuid.h 2024-11-01 09:22:23 -07:00
mtrr.c KVM: x86: drop x86.h include from cpuid.h 2024-11-01 09:22:23 -07:00
pmu.c KVM: x86/pmu: Add kvm_pmu_call() to simplify static calls of kvm_pmu_ops 2024-07-16 12:14:12 -04:00
pmu.h KVM: x86/pmu: Introduce distinct macros for GP/fixed counter max number 2024-06-28 09:12:16 -07:00
reverse_cpuid.h KVM: x86: Advertise AVX10.1 CPUID to userspace 2024-08-22 11:25:25 -07:00
smm.c KVM: x86: Forcibly leave nested if RSM to L2 hits shutdown 2024-09-09 20:09:49 -07:00
smm.h KVM: x86: smm: preserve interrupt shadow in SMRAM 2022-11-09 12:31:26 -05:00
trace.h KVM: x86: Introduce kvm_x86_call() to simplify static calls of kvm_x86_ops 2024-07-16 12:14:12 -04:00
tss.h
x86.c KVM: x86: Remove ordering check b/w MSR_PLATFORM_INFO and MISC_FEATURES_ENABLES 2024-11-01 09:22:34 -07:00
x86.h KVM: x86: model canonical checks more precisely 2024-11-01 09:22:26 -07:00
xen.c KVM: x86: Introduce kvm_x86_call() to simplify static calls of kvm_x86_ops 2024-07-16 12:14:12 -04:00
xen.h KVM: x86/xen: inject vCPU upcall vector when local APIC is enabled 2024-03-04 16:22:36 -08:00