linux/arch/x86/kvm
Greg Edwards d471bd853d KVM: x86: Allow APICv APIC ID inhibit to be cleared
Legacy kernels prior to commit 4399c03c67 ("x86/apic: Remove
verify_local_APIC()") write the APIC ID of the boot CPU twice to verify
a functioning local APIC.  This results in APIC acceleration inhibited
on these kernels for reason APICV_INHIBIT_REASON_APIC_ID_MODIFIED.

Allow the APICV_INHIBIT_REASON_APIC_ID_MODIFIED inhibit reason to be
cleared if/when all APICs in xAPIC mode set their APIC ID back to the
expected vcpu_id value.

Fold the functionality previously in kvm_lapic_xapic_id_updated() into
kvm_recalculate_apic_map(), as this allows examining all APICs in one
pass.

Fixes: 3743c2f025 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base")
Signed-off-by: Greg Edwards <gedwards@ddn.com>
Link: https://lore.kernel.org/r/20221117183247.94314-1-gedwards@ddn.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-33-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-01-13 10:45:35 -05:00
..
mmu KVM: x86/mmu: Pivot on "TDP MMU enabled" when handling direct page faults 2022-12-27 06:03:02 -05:00
svm KVM: x86: Track required APICv inhibits with variable, not callback 2023-01-13 10:45:34 -05:00
vmx KVM: x86: Track required APICv inhibits with variable, not callback 2023-01-13 10:45:34 -05:00
.gitignore KVM: x86: use a separate asm-offsets.c file 2022-11-09 12:10:17 -05:00
cpuid.c KVM: x86: Hyper-V invariant TSC control 2022-12-28 06:08:22 -05:00
cpuid.h KVM: x86: Add dedicated helper to get CPUID entry with significant index 2022-07-14 11:38:32 -04:00
debugfs.c KVM: x86: Reduce refcount if single_open() fails in kvm_mmu_rmaps_stat_open() 2022-10-27 04:41:54 -04:00
emulate.c KVM: x86: move SMM exit to a new file 2022-11-09 12:31:18 -05:00
fpu.h KVM: x86: Move FPU register accessors into fpu.h 2021-06-17 13:09:24 -04:00
hyperv.c KVM: x86: Hyper-V invariant TSC control 2022-12-28 06:08:22 -05:00
hyperv.h KVM: x86: Hyper-V invariant TSC control 2022-12-28 06:08:22 -05:00
i8254.c KVM: x86: PIT: Preserve state of speaker port data bit 2022-06-08 13:06:20 -04: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/i8259: Remove a dead store of irq in a conditional block 2022-04-02 05:41:19 -04:00
ioapic.c KVM: x86/ioapic: Remove unused "addr" and "length" of ioapic_read_indirect() 2022-02-10 13:47:13 -05:00
ioapic.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
irq_comm.c KVM: x86: ioapic: Fix level-triggered EOI and userspace I/OAPIC reconfigure race 2022-12-23 12:07:40 -05:00
irq.c KVM: x86: remove unnecessary exports 2022-12-02 13:36:44 -05:00
irq.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
Kconfig KVM: allow compiling out SMM support 2022-11-09 12:31:19 -05:00
kvm_cache_regs.h KVM: x86: start moving SMM-related functions to new files 2022-11-09 12:31:16 -05:00
kvm_emulate.h KVM: x86: do not define SMM-related constants if SMM disabled 2022-11-09 12:31:21 -05:00
kvm_onhyperv.c KVM: x86: Uninline and export hv_track_root_tdp() 2022-02-10 13:47:19 -05:00
kvm_onhyperv.h KVM: x86: Uninline and export hv_track_root_tdp() 2022-02-10 13:47:19 -05: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: Allow APICv APIC ID inhibit to be cleared 2023-01-13 10:45:35 -05:00
lapic.h KVM: x86: Inhibit APIC memslot if x2APIC and AVIC are enabled 2023-01-13 10:45:25 -05:00
Makefile KVM: x86: Introduce .hv_inject_synthetic_vmexit_post_tlb_flush() nested hook 2022-11-18 12:59:13 -05:00
mmu.h KVM: x86/mmu: Change tdp_mmu to a read-only parameter 2022-12-27 06:02:57 -05:00
mtrr.c
pmu.c KVM: x86/pmu: Prevent zero period event from being repeatedly released 2022-12-23 12:06:45 -05:00
pmu.h KVM: x86/pmu: Prevent zero period event from being repeatedly released 2022-12-23 12:06:45 -05:00
reverse_cpuid.h KVM: x86: Add a KVM-only leaf for CPUID_8000_0007_EDX 2022-12-28 06:08:19 -05:00
smm.c KVM: x86: smm: preserve interrupt shadow in SMRAM 2022-11-09 12:31:26 -05:00
smm.h KVM: x86: smm: preserve interrupt shadow in SMRAM 2022-11-09 12:31:26 -05:00
trace.h KVM: x86/xen: Add CPL to Xen hypercall tracepoint 2022-11-28 13:31:01 -05:00
tss.h
x86.c KVM: x86: Track required APICv inhibits with variable, not callback 2023-01-13 10:45:34 -05:00
x86.h KVM: x86: Track supported PERF_CAPABILITIES in kvm_caps 2022-11-09 12:31:11 -05:00
xen.c KVM: x86/xen: Add KVM_XEN_INVALID_GPA and KVM_XEN_INVALID_GFN to uapi 2022-12-27 06:01:49 -05:00
xen.h KVM: x86/xen: add support for 32-bit guests in SCHEDOP_poll 2022-11-30 19:24:56 +00:00