[PATCH v1 0/8] KVM: arm64: Fixes for guest CPU feature trapping and enabling

Fuad Tabba tabba at google.com
Tue Nov 4 04:58:58 PST 2025


Hi,

This series contains several fixes for guest vCPU feature trapping and
enabling, correcting logic for both non-protected and protected guests.

It fixes inverted logic for MOPS exception routing and pKVM Trace Buffer
trapping, and add missing traps for features like FEAT_NMI. It also
ensures that supported features like FEAT_LS64 (LD/ST64B) are correctly
enabled for the guest and not trapped.

For pKVM, this series also ensures MTE is correctly detected and enabled
when it is on the allow-list.

Additionally, a simple refactoring of vcpu_set_hcrx() is included to
reduce indentation and improve readability.

Based on Linux 6.18-rc4.

Cheers,
/fuad

Fuad Tabba (8):
  KVM: arm64: Route MOPS exceptions to EL2 when guest lacks support
  KVM: arm64: Trap access to ALLINT if FEAT_NMI not supported by the
    guest
  KVM: arm64: Enable LS64 instructions when supported by guest
  KVM: arm64: Refactor vcpu_set_hcrx() to reduce indentation
  KVM: arm64: Fix Trace Buffer trap polarity for protected VMs
  KVM: arm64: Fix MTE flag initialization for protected VMs
  KVM: arm64: Prevent host from managing timer offsets for protected VMs
  KVM: arm64: Define FAR_MASK for faulting IPA offset

 arch/arm64/include/asm/kvm_arm.h         |  2 +
 arch/arm64/include/asm/kvm_emulate.h     | 48 +++++++++++++++---------
 arch/arm64/kvm/arch_timer.c              | 18 ++++++---
 arch/arm64/kvm/hyp/nvhe/pkvm.c           | 10 +++--
 arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c |  2 +-
 arch/arm64/kvm/inject_fault.c            |  2 +-
 arch/arm64/kvm/mmu.c                     |  4 +-
 arch/arm64/kvm/sys_regs.c                |  6 ++-
 8 files changed, 60 insertions(+), 32 deletions(-)


base-commit: 6146a0f1dfae5d37442a9ddcba012add260bceb0
-- 
2.51.2.997.g839fc31de9-goog




More information about the linux-arm-kernel mailing list