[GIT PULL] KVM: x86 (and a PPC) fixes for 7.0-rc3+

From: Sean Christopherson

Date: Thu Mar 05 2026 - 14:31:13 EST


Please pull a larger-than-normal set of fixes for 7.0. The PMU fix from
Namhyung is the only one that absolutely _needs_ to get into 7.0 (only because
no one cares about PPC e500). The rest are fairly urgent stable@ fixes (and
most of 'em _just_ missed the merge window).

The following changes since commit 11439c4635edd669ae435eec308f4ab8a0804808:

Linux 7.0-rc2 (2026-03-01 15:39:31 -0800)

are available in the Git repository at:

https://github.com/kvm-x86/linux.git tags/kvm-x86-fixes-7.0-rc3

for you to fetch changes up to 3271085a7f1030ba9897cab60452acd370423ff1:

KVM: PPC: e500: Rip out "struct tlbe_ref" (2026-03-03 12:29:07 -0800)

----------------------------------------------------------------
KVM x86 (and PPC e500) fixes for 7.0-rc3+

- Synthesize features into KVM's set of supported CPU caps if and only if the
feature is actually "enabled" by the kernel.

- Validate _all_ GVAs when processing a range of GVAs for a PV Hyper-V TLB
flush, not just the first GVA.

- Fix a brown paper bug add_atomic_switch_msr().

- Use hlist_for_each_entry_srcu() when traversing mask_notifier_list to fix a
lockdep warning (KVM doesn't hold RCU, just irq_srcu).

- Ensure AVIC VMCB fields are initialized if the VM has an in-kernel local
APIC (and AVIC is enabled at the module level).

- Update CR8 write interception when AVIC is (de)activated to fix a bug where
KVM can run with the CR8 intercept in perpetuity.

- Add a quirk to skip the consistency check on FREEZE_IN_SMM, i.e. to allow L1
hypervisors to set FREEZE_IN_SMM to provide some amount of backwards
compatibility with setups where L1 was freezing PMCs on VM-Entry to L2.

- Increase the maximum number of NUMA nodes in the guest_memfd selftest to
64 (from 8).

- Fix a PPC e500 build error due to a long-standing wart that was exposed by
the recent conversion to kmalloc_obj(), and rip out the underlying ugliness
that led to the wart.

----------------------------------------------------------------
Carlos López (1):
KVM: x86: synthesize CPUID bits only if CPU capability is set

Jim Mattson (1):
KVM: x86: Introduce KVM_X86_QUIRK_VMCS12_FREEZE_IN_SMM_CC

Kai Huang (1):
KVM: selftests: Increase 'maxnode' for guest_memfd tests

Li RongQing (1):
KVM: x86: Fix SRCU list traversal in kvm_fire_mask_notifiers()

Manuel Andreas (1):
KVM: x86: hyper-v: Validate all GVAs during PV TLB flush

Namhyung Kim (1):
KVM: VMX: Fix a wrong MSR update in add_atomic_switch_msr()

Sean Christopherson (4):
KVM: SVM: Initialize AVIC VMCB fields if AVIC is enabled with in-kernel APIC
KVM: SVM: Set/clear CR8 write interception when AVIC is (de)activated
KVM: PPC: e500: Fix build error due to using kmalloc_obj() with wrong type
KVM: PPC: e500: Rip out "struct tlbe_ref"

Documentation/virt/kvm/api.rst | 8 ++++++++
arch/powerpc/kvm/e500.h | 6 +-----
arch/powerpc/kvm/e500_mmu.c | 4 ++--
arch/powerpc/kvm/e500_mmu_host.c | 91 ++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------
arch/x86/include/asm/kvm_host.h | 3 ++-
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/cpuid.c | 5 ++++-
arch/x86/kvm/hyperv.c | 9 +++++----
arch/x86/kvm/ioapic.c | 3 ++-
arch/x86/kvm/svm/avic.c | 8 +++++---
arch/x86/kvm/svm/svm.c | 11 ++++++-----
arch/x86/kvm/vmx/nested.c | 22 ++++++++++++++++++----
arch/x86/kvm/vmx/vmx.c | 2 +-
tools/testing/selftests/kvm/guest_memfd_test.c | 2 +-
14 files changed, 100 insertions(+), 75 deletions(-)