Skip to contentSkip to conversation

KVM/arm64 fixes for 7.2, take #2

GIT PULL Marc Zyngier 2 participants 2 messages Jul 8 – Jul 15

Subsystems (2)
lore
Share & tools
lore

Marc Zyngier

author maintainer
#0 lore raw

Paolo,

Here's the second drop of KVM/arm64 fixes for 7.2. This time around, we have a locking issue in kvm_io_bus_get_dev(), which is only used by arm64, a few S2 page table fixes, a set of FFA proxy fixes for pKVM, and finally a very esoteric fix for emulation of sign-extended loads from MMIO. Not only this is rather niche, it dates back to day one of KVM support for 32bit ARM...

Note that this is on top of the kvmarm-fixes-7.2-1 tag pull request posted at [1] about 12 days ago.

Please pull,

	M.

[1] https://lore.kernel.org/all/[email protected]

The following changes since commit d098bb75d14fde2f12155f1a95ec0168160867ce:

KVM: arm64: account pKVM reclaim against the VM mm (2026-06-22 10:48:08 +0100)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-7.2-2

for you to fetch changes up to 8d187d4b33c262c0f3e44842553521151d8629e8:

KVM: arm64: Fix propagation of TLBI level in kvm_pgtable_stage2_relax_perms() (2026-07-07 17:43:39 +0100)

----------------------------------------------------------------
KVM/arm64 fixes for 7.2, take #2

- Move locking for kvm_io_bus_get_dev() into the caller, ensuring race-free checks that the returned object is of the correct type

- Fix initialisation of the page-table walk level when relaxing permissions

- Correctly update the XN attribute when relaxing permissions

- Fix the sign extension of loads from emulated MMIO regions

- Assorted collection of fixes for pKVM's FFA proxy, together with a couple of FFA driver adjustments

----------------------------------------------------------------
Fuad Tabba (2):
KVM: arm64: Fix sign-extension of MMIO loads
KVM: arm64: selftests: Add MMIO sign-extending load test

Marc Zyngier (2):
KVM: Move kvm_io_bus_get_dev() locking responsibilities to callers
KVM: arm64: Fix propagation of TLBI level in kvm_pgtable_stage2_relax_perms()

Mostafa Saleh (3):
KVM: arm64: Fix bounds checking in do_ffa_mem_reclaim()
KVM: arm64: Ensure FFA ranges are page aligned
firmware: arm_ffa: Fix out-of-bound writes in ffa_setup_and_transmit()

Oliver Upton (2):
KVM: arm64: Ensure level is always initialized when relaxing perms
KVM: arm64: Only update XN attr when requested during S2 relaxation

Sebastian Ene (3):
KVM: arm64: Validate the offset to the mem access descriptor
KVM: arm64: Zero out the stack initialized data in the FFA handler
firmware: arm_ffa: Fix Endpoint Memory Access Descriptor offset calculation

 arch/arm64/kvm/hyp/nvhe/ffa.c                     |  44 ++--
 arch/arm64/kvm/hyp/pgtable.c                      |  15 +-
 arch/arm64/kvm/mmio.c                             |   7 +-
 arch/arm64/kvm/vgic/vgic-its.c                    |   2 +
 drivers/firmware/arm_ffa/driver.c                 |  25 ++-
 include/linux/arm_ffa.h                           |   9 +-
 tools/testing/selftests/kvm/Makefile.kvm          |   1 +
 tools/testing/selftests/kvm/arm64/mmio_sign_ext.c | 255 ++++++++++++++++++++++
 virt/kvm/kvm_main.c                               |  16 +-
 9 files changed, 331 insertions(+), 43 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/arm64/mmio_sign_ext.c
maintainer
#1 lore raw
Quoted 10 lines · Marc Zyngier

Paolo,

Here's the second drop of KVM/arm64 fixes for 7.2. This time around, we have a locking issue in kvm_io_bus_get_dev(), which is only used by arm64, a few S2 page table fixes, a set of FFA proxy fixes for pKVM, and finally a very esoteric fix for emulation of sign-extended loads from MMIO. Not only this is rather niche, it dates back to day one of KVM support for 32bit ARM...

Quoted 2 lines

Note that this is on top of the kvmarm-fixes-7.2-1 tag pull request posted at [1] about 12 days ago.

Yes, pulled that first and then this one.

Paolo

Quoted 69 lines

Please pull,

        M.

[1] https://lore.kernel.org/all/[email protected]

The following changes since commit d098bb75d14fde2f12155f1a95ec0168160867ce:

KVM: arm64: account pKVM reclaim against the VM mm (2026-06-22 10:48:08 +0100)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-7.2-2

for you to fetch changes up to 8d187d4b33c262c0f3e44842553521151d8629e8:

KVM: arm64: Fix propagation of TLBI level in kvm_pgtable_stage2_relax_perms() (2026-07-07 17:43:39 +0100)

----------------------------------------------------------------
KVM/arm64 fixes for 7.2, take #2

- Move locking for kvm_io_bus_get_dev() into the caller, ensuring race-free checks that the returned object is of the correct type

- Fix initialisation of the page-table walk level when relaxing permissions

- Correctly update the XN attribute when relaxing permissions

- Fix the sign extension of loads from emulated MMIO regions

- Assorted collection of fixes for pKVM's FFA proxy, together with a couple of FFA driver adjustments

----------------------------------------------------------------
Fuad Tabba (2):
KVM: arm64: Fix sign-extension of MMIO loads
KVM: arm64: selftests: Add MMIO sign-extending load test

Marc Zyngier (2):
KVM: Move kvm_io_bus_get_dev() locking responsibilities to callers
KVM: arm64: Fix propagation of TLBI level in kvm_pgtable_stage2_relax_perms()

Mostafa Saleh (3):
KVM: arm64: Fix bounds checking in do_ffa_mem_reclaim()
KVM: arm64: Ensure FFA ranges are page aligned
firmware: arm_ffa: Fix out-of-bound writes in ffa_setup_and_transmit()

Oliver Upton (2):
KVM: arm64: Ensure level is always initialized when relaxing perms
KVM: arm64: Only update XN attr when requested during S2 relaxation

Sebastian Ene (3):
KVM: arm64: Validate the offset to the mem access descriptor
KVM: arm64: Zero out the stack initialized data in the FFA handler
firmware: arm_ffa: Fix Endpoint Memory Access Descriptor offset calculation

 arch/arm64/kvm/hyp/nvhe/ffa.c                     |  44 ++--
 arch/arm64/kvm/hyp/pgtable.c                      |  15 +-
 arch/arm64/kvm/mmio.c                             |   7 +-
 arch/arm64/kvm/vgic/vgic-its.c                    |   2 +
 drivers/firmware/arm_ffa/driver.c                 |  25 ++-
 include/linux/arm_ffa.h                           |   9 +-
 tools/testing/selftests/kvm/Makefile.kvm          |   1 +
 tools/testing/selftests/kvm/arm64/mmio_sign_ext.c | 255 ++++++++++++++++++++++
 virt/kvm/kvm_main.c                               |  16 +-
 9 files changed, 331 insertions(+), 43 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/arm64/mmio_sign_ext.c