Skip to contentSkip to conversation

KVM: x86: Fix for 7.1-rcN

GIT PULL Sean Christopherson 2 participants 2 messages May 29 KVM

lore
Share & tools
lore

Sean Christopherson

author reviewer
#0 lore raw

Except for the execinfo.h non-glibc selftest change, all of these are fixes for bugs that were introduced in recent kernels (treating enabling x2AVIC by default as the "introduction" of the TLB bug).

The following changes since commit 2d5d3fc593c9b7e41bee86175d7b9e11f470072e:

KVM: VMX: introduce module parameter to disable CET (2026-05-13 15:38:22 +0200)

are available in the Git repository at:

https://github.com/kvm-x86/linux.git tags/kvm-x86-fixes-7.1-rc6

for you to fetch changes up to a9e18aa3263f356edae305e29830e5fe63d8597a:

KVM: SVM: Flush the current TLB when transitioning from xAVIC => x2AVIC (2026-05-21 14:24:57 -0700)

----------------------------------------------------------------
KVM x86 fixes for 7.1-rcN

- Include the kernel's linux/mman.h in KVM selftests to ensure MADV_COLLAPSE is defined, as older libc versions may not provide it.

- Include execinfo.h if and only if KVM selftests are building against glibc, and provide a test_dump_stack() for non-glibc builds.

- Fudge around an RCU splat in the emegerncy reboot code that is technically a legitimate flaw, but in practice is a non-issue and fixing the flaw, e.g. by adding locking, would incur meaningful risk, i.e. do more harm than good.

- Rate-limit global clock updates once again (but without delayed work), as KVM was subtly relying on the old rate-limiting for NPT correction to guard against "update storms" when running without a master clock on systems with overcommitted CPUs.

- Fix a brown paper bag goof where KVM checked if ERAPS is "dirty" instead of marking it dirty when emulating INVPCID.

- Flush the TLB when transitioning from xAVIC => x2AVIC to ensure the CPU TLB doesn't contain AVIC-tagged entries for the APIC base GPA.

----------------------------------------------------------------
Emily Ehlert (1):
KVM: x86: Fix ERAPS RAP clear on INVPCID single-context invalidation

Hisam Mehboob (1):
KVM: selftests: Guard execinfo.h inclusion for non-glibc builds

Lei Chen (1):
KVM: x86: Rate-limit global clock updates on vCPU load

Mikhail Gavrilov (1):
x86/virt: Silence RCU lockdep splat in emergency virt callback path

Sean Christopherson (2):
KVM: selftests: Include sys/mman.h *and* linux/mman.h, via kvm_syscalls.h
KVM: SVM: Flush the current TLB when transitioning from xAVIC => x2AVIC

 arch/x86/include/asm/kvm_host.h                    |  1 +
 arch/x86/kvm/svm/avic.c                            | 35 ++++++++++++++++++----
 arch/x86/kvm/x86.c                                 | 13 ++++++--
 arch/x86/virt/hw.c                                 | 15 +++++++++-
 .../selftests/kvm/access_tracking_perf_test.c      |  2 +-
 tools/testing/selftests/kvm/guest_memfd_test.c     |  2 +-
 tools/testing/selftests/kvm/include/kvm_syscalls.h | 10 +++++++
 tools/testing/selftests/kvm/include/test_util.h    |  2 +-
 tools/testing/selftests/kvm/lib/assert.c           |  8 ++++-
 tools/testing/selftests/kvm/lib/kvm_util.c         |  2 +-
 tools/testing/selftests/kvm/memslot_perf_test.c    |  2 +-
 .../selftests/kvm/s390/shared_zeropage_test.c      |  3 +-
 tools/testing/selftests/kvm/s390/tprot.c           |  2 +-
 .../testing/selftests/kvm/set_memory_region_test.c |  2 +-
 14 files changed, 79 insertions(+), 20 deletions(-)
maintainer
#1 lore raw
Quoted 3 lines · Sean Christopherson

- Fudge around an RCU splat in the emegerncy reboot code that is technically a legitimate flaw, but in practice is a non-issue and fixing the flaw, e.g. by adding locking, would incur meaningful risk, i.e. do more harm than good.

Pulled, I'll add a note that this was left to be picked up by x86 maintainers but they didn't.

Paolo