Skip to contentSkip to conversation

KVM/arm64 fixes for 6.15, round #3

GIT PULL Oliver Upton 2 participants 2 messages May 7, 2025 – May 10, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Paolo,

This is probably the last batch of fixes I have for 6.15. The bug in user_mem_abort() getting fixed is likely to bite some folks. On top of that, Marc snuck in another erratum fix for AmpereOne with more to come on that front...

Please pull.

The following changes since commit b4432656b36e5cc1d50a1f2dc15357543add530e:

Linux 6.15-rc4 (2025-04-27 15:19:23 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ tags/kvmarm-fixes-6.15-3

for you to fetch changes up to 3949e28786cd0afcd96a46ce6629245203f629e5:

KVM: arm64: Fix memory check in host_stage2_set_owner_locked() (2025-05-07 00:17:05 -0700)

----------------------------------------------------------------
KVM/arm64 fixes for 6.15, round #3

- Avoid use of uninitialized memcache pointer in user_mem_abort()

- Always set HCR_EL2.xMO bits when running in VHE, allowing interrupts to be taken while TGE=0 and fixing an ugly bug on AmpereOne that occurs when taking an interrupt while clearing the xMO bits (AC03_CPU_36)

- Prevent VMMs from hiding support for AArch64 at any EL virtualized by KVM

- Save/restore the host value for HCRX_EL2 instead of restoring an incorrect fixed value

- Make host_stage2_set_owner_locked() check that the entire requested range is memory rather than just the first page

----------------------------------------------------------------
Marc Zyngier (5):
KVM: arm64: Force HCR_EL2.xMO to 1 at all times in VHE mode
KVM: arm64: Prevent userspace from disabling AArch64 support at any virtualisable EL
KVM: arm64: selftest: Don't try to disable AArch64 support
KVM: arm64: Properly save/restore HCRX_EL2
KVM: arm64: Kill HCRX_HOST_FLAGS

Mostafa Saleh (1):
KVM: arm64: Fix memory check in host_stage2_set_owner_locked()

Sebastian Ott (1):
KVM: arm64: Fix uninitialized memcache pointer in user_mem_abort()

 arch/arm64/include/asm/el2_setup.h              |  2 +-
 arch/arm64/include/asm/kvm_arm.h                |  3 +--
 arch/arm64/kvm/hyp/include/hyp/switch.h         | 13 +++++----
 arch/arm64/kvm/hyp/nvhe/mem_protect.c           |  2 +-
 arch/arm64/kvm/hyp/vgic-v3-sr.c                 | 36 ++++++++++++++-----------
 arch/arm64/kvm/mmu.c                            | 13 +++++----
 arch/arm64/kvm/sys_regs.c                       |  6 +++++
 tools/testing/selftests/kvm/arm64/set_id_regs.c |  8 +++---
 8 files changed, 48 insertions(+), 35 deletions(-)
maintainer
#1 lore raw
Quoted 8 lines · Oliver Upton

Hi Paolo,

This is probably the last batch of fixes I have for 6.15. The bug in user_mem_abort() getting fixed is likely to bite some folks. On top of that, Marc snuck in another erratum fix for AmpereOne with more to come on that front...

Quoted 5 lines

Please pull.

The following changes since commit b4432656b36e5cc1d50a1f2dc15357543add530e:

Linux 6.15-rc4 (2025-04-27 15:19:23 -0700)

Done, thanks.

Paolo

Quoted 51 lines

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ tags/kvmarm-fixes-6.15-3

for you to fetch changes up to 3949e28786cd0afcd96a46ce6629245203f629e5:

KVM: arm64: Fix memory check in host_stage2_set_owner_locked() (2025-05-07 00:17:05 -0700)

----------------------------------------------------------------
KVM/arm64 fixes for 6.15, round #3

- Avoid use of uninitialized memcache pointer in user_mem_abort()

- Always set HCR_EL2.xMO bits when running in VHE, allowing interrupts to be taken while TGE=0 and fixing an ugly bug on AmpereOne that occurs when taking an interrupt while clearing the xMO bits (AC03_CPU_36)

- Prevent VMMs from hiding support for AArch64 at any EL virtualized by KVM

- Save/restore the host value for HCRX_EL2 instead of restoring an incorrect fixed value

- Make host_stage2_set_owner_locked() check that the entire requested range is memory rather than just the first page

----------------------------------------------------------------
Marc Zyngier (5):
KVM: arm64: Force HCR_EL2.xMO to 1 at all times in VHE mode
KVM: arm64: Prevent userspace from disabling AArch64 support at any virtualisable EL
KVM: arm64: selftest: Don't try to disable AArch64 support
KVM: arm64: Properly save/restore HCRX_EL2
KVM: arm64: Kill HCRX_HOST_FLAGS

Mostafa Saleh (1):
KVM: arm64: Fix memory check in host_stage2_set_owner_locked()

Sebastian Ott (1):
KVM: arm64: Fix uninitialized memcache pointer in user_mem_abort()

 arch/arm64/include/asm/el2_setup.h              |  2 +-
 arch/arm64/include/asm/kvm_arm.h                |  3 +--
 arch/arm64/kvm/hyp/include/hyp/switch.h         | 13 +++++----
 arch/arm64/kvm/hyp/nvhe/mem_protect.c           |  2 +-
 arch/arm64/kvm/hyp/vgic-v3-sr.c                 | 36 ++++++++++++++-----------
 arch/arm64/kvm/mmu.c                            | 13 +++++----
 arch/arm64/kvm/sys_regs.c                       |  6 +++++
 tools/testing/selftests/kvm/arm64/set_id_regs.c |  8 +++---
 8 files changed, 48 insertions(+), 35 deletions(-)