Re: [GIT PULL] KVM: Fixes for 7.3-rcN

From: Paolo Bonzini

Date: Sat Sep 26 2026 - 00:40:57 EST


On Sat, Sep 26, 2026 at 1:33 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> Please pull a variety of fixes. Nothing is super urgent, but all of these can
> be fatal to the host and/or guest (except for the selftest change, which fixes
> a regression that was introduced in 7.3).
>
> The following changes since commit d599822bdb66aeec5ec76297b0fc6efaaeefe07c:
>
> Merge tag 'kvm-s390-master-7.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD (2026-09-04 17:34:28 +0200)
>
> are available in the Git repository at:
>
> https://github.com/kvm-x86/linux.git tags/kvm-x86-fixes-7.3-rc5
>
> for you to fetch changes up to 119e9db233ad0f4cbd4cfb9f9385a7bca378b37d:
>
> KVM: Don't pre-reserve xarray entries when storing empty/NULL attributes (2026-09-22 08:36:16 -0700)

Pulled, thanks. I added on top the SEV cache writeback patches which
are not present here.

Paolo

> ----------------------------------------------------------------
> KVM fixes for 7.3-rcN
>
> - Fix a brown paper bag bug where KVM would incorrectly treat Intel PMU MSRs
> as valid on AMD.
>
> - Fix a regression in the hardware disable selftest where it checked the wrong
> macro when detecting glibc support (breaks at least musl).
>
> - Never clear KVM_REQ_VM_DEAD so that dead VMs stay dead, which is especially
> important for KVM_BUG_ON() flows, which often guard more dangerous bugs.
>
> - Re-pend GET_NESTED_STATE_PAGES if getting the pages fails, to fix a bug
> where KVM would let userspace run a broken setup with stale vmcs12 pages.
>
> - Fix a class of bugs where KVM would fail to fill kvm_run exit fields if
> getting nested pages failed.
>
> - Treat reserved entries in the memory attributes xarray as "no attributes",
> to fix false positives when checking for mixed attributes.
>
> - Fix memcg accounting for the memory attributes xarray (the xarray library
> subtly requires the xarray to be configured for accounting upfront; the gfp
> flags taken at runtime are used only rarely).
>
> - Don't pre-reserve xarray entries when storing empty attributes, as storing
> NULL must not require memory allocation (KVM and other subsystems heavily
> rely on this behavior).
>
> ----------------------------------------------------------------
> David Ballesteros (1):
> KVM: Ensure memory attributes xarray nodes are accounted to the caller's memcg
>
> Jim Mattson (1):
> KVM: x86/pmu: Move Intel PMU global MSRs to intel_is_valid_msr()
>
> Sean Christopherson (4):
> KVM: selftests: Use __GLIBC__, not _GNU_SOURCE, to detect actual glibc
> KVM: Never clear KVM_REQ_VM_DEAD from a vCPU's requests
> KVM: x86: Re-pend GET_NESTED_STATE_PAGES if getting said pages fails
> KVM: x86: Fill kvm_run exit fields in common get_nested_state_pages() error paths
>
> Zeng Chi (2):
> KVM: Don't treat reserved xarray entries as having memory attributes
> KVM: Don't pre-reserve xarray entries when storing empty/NULL attributes
>
> arch/arm64/kvm/arm.c | 2 +-
> arch/x86/kvm/mmu/mmu.c | 2 +-
> arch/x86/kvm/pmu.c | 8 -----
> arch/x86/kvm/svm/nested.c | 7 +----
> arch/x86/kvm/vmx/nested.c | 15 ++++------
> arch/x86/kvm/vmx/pmu_intel.c | 3 ++
> arch/x86/kvm/vmx/tdx.c | 2 +-
> arch/x86/kvm/x86.c | 6 +++-
> include/linux/kvm_host.h | 9 ++++--
> .../testing/selftests/kvm/hardware_disable_test.c | 6 ++--
> virt/kvm/kvm_main.c | 35 ++++++++++++++++++----
> 11 files changed, 56 insertions(+), 39 deletions(-)
>