Skip to contentSkip to conversation

KVM fixes for Linux 7.2-rc6

GIT PULL Merged Paolo Bonzini 3 participants 4 messages Jul 29 KVM

lore
Share & tools
lore

Paolo Bonzini

author maintainer
#0 lore raw

Linus,

The following changes since commit f5098b6bae761e346ebcd9da7f95622c04733cff:

Linux 7.2-rc5 (2026-07-26 14:45:48 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus

for you to fetch changes up to 7d3aae206663c4e006b25a1c7a20a4029e67da76:

KVM: SVM: Update x2APIC MSR intercepts if AVIC is inhibited while L2 is active (2026-07-29 23:39:36 +0200)

----------------------------------------------------------------
Arm:

- Fix a tiny buglet when propagating the deactivation of an interrupt from a nested guest, which happened to trigger a gold plated CPU bug on a particular implementation

- Fix a race between LPI unmapping and mapping, resulting in leaked LPIs

- Make LPI mapping more robust on memory allocation failure

- Fix the handling of the EL2 tracing clock being disabled

- A couple of Sashiko-driven fixes for corner cases in the EL2 tracing code

- Add missing sysreg tracepoint for the EL2 code

- Tidy-up the mutual exclusion of guest-memfd and MTE

- Update Fuad's email address to point to @linux.dev

s390:

- several fixes for PCI passthru in s390 kvm

- fix a 7.2-rc regression in the adapter interrupt mapping code

x86:

- Add memory clobber to asm for VMX instructions; without one, the compiler could reorder them in troublesome ways because "asm volatile" and "asm goto" only protect against removal of the asm.

- Cancel delayed I/O APIC EOI handling before destroying vCPUs

- Check all address spaces (normal and SMM) for write tracking and large pages, not just the current one.

- Always update x2APIC MSR intercepts for L1 when AVIC is deactivated, even if not running L1. If the deactivation is VM-wide rather than being caused by something in L2's vCPU state, after a nested vmexit L1 will be able to access the host's APIC state.

----------------------------------------------------------------
Alexandru Elisei (1):
KVM: arm64: Reject guest_memfd memslots when the VM has MTE

Carlos López (2):
KVM: arm64: vgic: Fix race between LPI release and re-registration
KVM: arm64: vgic: Mitigate potential LPI registration failure

D Scott Phillips (1):
KVM: arm64: vgic: Avoid double-deactivate of IRQs in the nested context

Farhan Ali (6):
KVM: s390: pci: Reject adapter interrupt forwarding if already enabled
KVM: s390: pci: Fix memory accounting for pinned/unpinned pages
KVM: s390: pci: Fix missing error codes and memory unaccounting
KVM: s390: pci: Fix NULL dereference on AIBV allocation failure
KVM: s390: pci: Fix resource leak on IRQ registration failure
KVM: s390: pci: Validate AIBV and AISB before pinning guest pages

Fuad Tabba (1):
KVM: arm64: Update Fuad Tabba's email address

Jaehoon Kim (1):
KVM: s390: Fall back to short-term pinning in MAP ioctl

Jinu Kim (2):
KVM: x86/mmu: Check write tracking in all address spaces
KVM: x86/mmu: Check all address spaces before skipping unsync

Paolo Bonzini (3):
Merge tag 'kvm-s390-master-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD Merge tag 'kvmarm-fixes-7.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM: VMX: add memory clobber to asm for VMX instructions

Sean Christopherson (1):
KVM: SVM: Update x2APIC MSR intercepts if AVIC is inhibited while L2 is active

Vincent Donnefort (4):
KVM: arm64: Fix hyp_trace clock disabling
KVM: arm64: Fix potential leak in hyp_trace_buffer_alloc_bpages_backing
KVM: arm64: Fix hyp_trace_desc allocation size in hyp_trace_load()
KVM: arm64: Add missing hyp_enter when trapping sysreg

Weiming Shi (1):
KVM: x86: Cancel delayed I/O APIC EOI handling before destroying vCPUs

 .mailmap                                     |   1 +
 Documentation/arch/arm64/silicon-errata.rst  |   4 +
 Documentation/virt/kvm/api.rst               |   6 ++
 Documentation/virt/kvm/devices/s390_flic.rst |  15 +++-
 MAINTAINERS                                  |   2 +-
 arch/arm64/include/asm/kvm_hypevents.h       |   1 +
 arch/arm64/kvm/arm.c                         |  25 +++++--
 arch/arm64/kvm/hyp/nvhe/hyp-main.c           |   1 +
 arch/arm64/kvm/hyp_trace.c                   |  36 ++++++---
 arch/arm64/kvm/mmu.c                         |   4 +
 arch/arm64/kvm/vgic/vgic-its.c               |  25 +++++--
 arch/arm64/kvm/vgic/vgic-v3.c                |   8 +-
 arch/arm64/kvm/vgic/vgic.c                   |  18 ++---
 arch/s390/include/asm/kvm_host.h             |   5 ++
 arch/s390/kvm/interrupt.c                    |  56 ++++++++++----
 arch/s390/kvm/pci.c                          | 107 +++++++++++++++++++++------
 arch/s390/kvm/pci.h                          |   2 +
 arch/x86/kvm/mmu/mmu.c                       |  22 +++++-
 arch/x86/kvm/mmu/page_track.c                |  32 ++++++--
 arch/x86/kvm/svm/avic.c                      |   8 --
 arch/x86/kvm/vmx/vmx_ops.h                   |   8 +-
 arch/x86/kvm/x86.c                           |   6 ++
 include/kvm/arm_vgic.h                       |   3 -
 23 files changed, 298 insertions(+), 97 deletions(-)
#1 lore raw
Quoted 4 lines · Paolo Bonzini

- Add memory clobber to asm for VMX instructions; without one, the compiler could reorder them in troublesome ways because "asm volatile" and "asm goto" only protect against removal of the asm.

This is simply not true.

"asm volatile" is not just a "don't remove". It is an ordering constraint too. It cannot move wrt other asm volatiles.

I've merged this, because that added clobber won't really hurt, but the bug is simply not what the description says it is.

You have to have a memory clobber if you modify memory, or read memory that you didn't tell about.

So asm volatile is very much a "you can't re-order this asm or move it around significantly".

But at the same time it does *not* necessarily protect against the compiler re-ordering *other* things - like regular non-volatile memory reads and writes.

So I think the commit message is misleading and actively wrong, and is stating things that simply aren't even remotely true.

In fact, I think the "none of this has been observed" probably means that the code wasn't actually even buggy, and clearly the people involved didn't really think things through.

If all accesses are to memory that gcc isn't aware of, and all of those are done with 'asm volatile', then the code is fine *without* a memory clobber. The asms won't be re-ordered wrt each other, because you have told the compiler that there are side effects.

But if you do *regular* memory accesses to some memory area, and then you use "asm volatile" without a memory clobber, then gcc may be moving those regular memory accesses around the asm.

See the difference?

Linus

author maintainer
#2 lore raw
Quoted 9 lines · Linus Torvalds
Quoted 4 lines · Paolo Bonzini

- Add memory clobber to asm for VMX instructions; without one, the compiler could reorder them in troublesome ways because "asm volatile" and "asm goto" only protect against removal of the asm.

This is simply not true.

Quoted 8 lines

"asm volatile" is not just a "don't remove". It is an ordering constraint too. It cannot move wrt other asm volatiles.
So asm volatile is very much a "you can't re-order this asm or move it around significantly". [...]

But at the same time it does *not* necessarily protect against the compiler re-ordering *other* things - like regular non-volatile memory reads and writes.

Then I was mistaken that reordering of asms could still happen without a memory clobber. I agree that the commit message overstates what the compiler can decide to do.

Thanks for the explanation,

Paolo

merge bot Merged
#3 lore raw
In reply to Paolo Bonzini
The pull request you sent on Wed, 29 Jul 2026 23:44:59 +0200:

The pull request you sent on Wed, 29 Jul 2026 23:44:59 +0200:

Quoted 1 line

https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/fc46aed51f6280801f43a2cf4b5060cc33b572f9

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html