Skip to contentSkip to conversation

KVM/arm64 fixes for 6.19

DISCUSSION Oliver Upton 3 participants 3 messages Jan 15 – Jan 24

Subsystems (2)
lore
Share & tools
lore

Oliver Upton

author maintainer
#0 lore raw

Hi Paolo,

Here is the first (and likely only) set of fixes for 6.19. Small batch of changes fixing issues in non-standard configurations like pKVM, hVHE, and nested.

Details are in the tag, please pull.

Thanks,
Oliver

The following changes since commit f8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da:

Linux 6.19-rc3 (2025-12-28 13:24:26 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ tags/kvmarm-fixes-6.19-1

for you to fetch changes up to 19cffd16ed6489770272ba383ff3aaec077e01ed:

KVM: arm64: Invert KVM_PGTABLE_WALK_HANDLE_FAULT to fix pKVM walkers (2026-01-10 02:19:52 -0800)

----------------------------------------------------------------
KVM/arm64 fixes for 6.19

- Ensure early return semantics are preserved for pKVM fault handlers

- Fix case where the kernel runs with the guest's PAN value when CONFIG_ARM64_PAN is not set

- Make stage-1 walks to set the access flag respect the access permission of the underlying stage-2, when enabled

- Propagate computed FGT values to the pKVM view of the vCPU at vcpu_load()

- Correctly program PXN and UXN privilege bits for hVHE's stage-1 page tables

- Check that the VM is actually using VGICv3 before accessing the GICv3 CPU interface

- Delete some unused code

----------------------------------------------------------------
Alexandru Elisei (4):
KVM: arm64: Copy FGT traps to unprotected pKVM VCPU on VCPU load
KVM: arm64: Inject UNDEF for a register trap without accessor
KVM: arm64: Remove extra argument for __pvkm_host_{share,unshare}_hyp()
KVM: arm64: Remove unused parameter in synchronize_vcpu_pstate()

Dongxu Sun (1):
KVM: arm64: Remove unused vcpu_{clear,set}_wfx_traps()

Marc Zyngier (2):
KVM: arm64: Fix EL2 S1 XN handling for hVHE setups
KVM: arm64: Don't blindly set set PSTATE.PAN on guest exit

Oliver Upton (1):
KVM: arm64: nv: Respect stage-2 write permssion when setting stage-1 AF

Sascha Bischoff (1):
KVM: arm64: gic: Check for vGICv3 when clearing TWI

Will Deacon (1):
KVM: arm64: Invert KVM_PGTABLE_WALK_HANDLE_FAULT to fix pKVM walkers

 arch/arm64/include/asm/kvm_asm.h        |  2 ++
 arch/arm64/include/asm/kvm_emulate.h    | 16 ----------------
 arch/arm64/include/asm/kvm_pgtable.h    | 16 ++++++++++++----
 arch/arm64/include/asm/sysreg.h         |  3 ++-
 arch/arm64/kernel/image-vars.h          |  1 +
 arch/arm64/kvm/arm.c                    |  1 +
 arch/arm64/kvm/at.c                     |  8 ++++++--
 arch/arm64/kvm/hyp/entry.S              |  4 +++-
 arch/arm64/kvm/hyp/include/hyp/switch.h |  2 +-
 arch/arm64/kvm/hyp/nvhe/hyp-main.c      |  3 +++
 arch/arm64/kvm/hyp/nvhe/pkvm.c          |  1 -
 arch/arm64/kvm/hyp/nvhe/switch.c        |  2 +-
 arch/arm64/kvm/hyp/pgtable.c            |  5 +++--
 arch/arm64/kvm/hyp/vhe/switch.c         |  2 +-
 arch/arm64/kvm/mmu.c                    | 12 +++++-------
 arch/arm64/kvm/sys_regs.c               |  5 ++++-
 arch/arm64/kvm/va_layout.c              | 28 ++++++++++++++++++++++++++++
 17 files changed, 73 insertions(+), 38 deletions(-)
maintainer
#1 lore raw
Quoted 16 lines · Oliver Upton

Hi Paolo,

Here is the first (and likely only) set of fixes for 6.19. Small batch of changes fixing issues in non-standard configurations like pKVM, hVHE, and nested.

Details are in the tag, please pull.

Thanks,
Oliver

The following changes since commit f8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da:

Linux 6.19-rc3 (2025-12-28 13:24:26 -0800)

Quoted 7 lines

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ tags/kvmarm-fixes-6.19-1

for you to fetch changes up to 19cffd16ed6489770272ba383ff3aaec077e01ed:

KVM: arm64: Invert KVM_PGTABLE_WALK_HANDLE_FAULT to fix pKVM walkers (2026-01-10 02:19:52 -0800)

FWIW, I'll take this as an initial merge in kvmarm/next, as I have a couple of things that depend on it [1].

Thanks,

	M.

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

Signature · 1 line
Without deviation from the norm, progress is not possible.
maintainer
#2 lore raw
In reply to Oliver Upton
Quoted 8 lines · Oliver Upton

Hi Paolo,

Here is the first (and likely only) set of fixes for 6.19. Small batch of changes fixing issues in non-standard configurations like pKVM, hVHE, and nested.

Details are in the tag, please pull.

Pulled, thanks - I waited to see if anything else came around from other architectures, but it seems like things are calm.

Paolo

Quoted 79 lines

Thanks,
Oliver

The following changes since commit f8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da:

Linux 6.19-rc3 (2025-12-28 13:24:26 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ tags/kvmarm-fixes-6.19-1

for you to fetch changes up to 19cffd16ed6489770272ba383ff3aaec077e01ed:

KVM: arm64: Invert KVM_PGTABLE_WALK_HANDLE_FAULT to fix pKVM walkers (2026-01-10 02:19:52 -0800)

----------------------------------------------------------------
KVM/arm64 fixes for 6.19

- Ensure early return semantics are preserved for pKVM fault handlers

- Fix case where the kernel runs with the guest's PAN value when CONFIG_ARM64_PAN is not set

- Make stage-1 walks to set the access flag respect the access permission of the underlying stage-2, when enabled

- Propagate computed FGT values to the pKVM view of the vCPU at vcpu_load()

- Correctly program PXN and UXN privilege bits for hVHE's stage-1 page tables

- Check that the VM is actually using VGICv3 before accessing the GICv3 CPU interface

- Delete some unused code

----------------------------------------------------------------
Alexandru Elisei (4):
KVM: arm64: Copy FGT traps to unprotected pKVM VCPU on VCPU load
KVM: arm64: Inject UNDEF for a register trap without accessor
KVM: arm64: Remove extra argument for __pvkm_host_{share,unshare}_hyp()
KVM: arm64: Remove unused parameter in synchronize_vcpu_pstate()

Dongxu Sun (1):
KVM: arm64: Remove unused vcpu_{clear,set}_wfx_traps()

Marc Zyngier (2):
KVM: arm64: Fix EL2 S1 XN handling for hVHE setups
KVM: arm64: Don't blindly set set PSTATE.PAN on guest exit

Oliver Upton (1):
KVM: arm64: nv: Respect stage-2 write permssion when setting stage-1 AF

Sascha Bischoff (1):
KVM: arm64: gic: Check for vGICv3 when clearing TWI

Will Deacon (1):
KVM: arm64: Invert KVM_PGTABLE_WALK_HANDLE_FAULT to fix pKVM walkers

 arch/arm64/include/asm/kvm_asm.h        |  2 ++
 arch/arm64/include/asm/kvm_emulate.h    | 16 ----------------
 arch/arm64/include/asm/kvm_pgtable.h    | 16 ++++++++++++----
 arch/arm64/include/asm/sysreg.h         |  3 ++-
 arch/arm64/kernel/image-vars.h          |  1 +
 arch/arm64/kvm/arm.c                    |  1 +
 arch/arm64/kvm/at.c                     |  8 ++++++--
 arch/arm64/kvm/hyp/entry.S              |  4 +++-
 arch/arm64/kvm/hyp/include/hyp/switch.h |  2 +-
 arch/arm64/kvm/hyp/nvhe/hyp-main.c      |  3 +++
 arch/arm64/kvm/hyp/nvhe/pkvm.c          |  1 -
 arch/arm64/kvm/hyp/nvhe/switch.c        |  2 +-
 arch/arm64/kvm/hyp/pgtable.c            |  5 +++--
 arch/arm64/kvm/hyp/vhe/switch.c         |  2 +-
 arch/arm64/kvm/mmu.c                    | 12 +++++-------
 arch/arm64/kvm/sys_regs.c               |  5 ++++-
 arch/arm64/kvm/va_layout.c              | 28 ++++++++++++++++++++++++++++
 17 files changed, 73 insertions(+), 38 deletions(-)