linux/arch/arm64/kvm
Oliver Upton 17f073f78f KVM: arm64: Correctly identify executable PTEs at stage-2
KVM invalidates the I-cache before installing an executable PTE on
implementations without DIC. Unfortunately, support for FEAT_XNX
broke this check as KVM_PTE_LEAF_ATTR_HI_S2_XN was expanded to a
bitfield.

Fix it by reusing kvm_pgtable_stage2_pte_prot() and testing the abstract
permission bits instead.

Fixes: 2608563b46 ("KVM: arm64: Add support for FEAT_XNX stage-2 permissions")
Reported-by: Sashiko (gemini/gemini-3.1-pro-preview)
Signed-off-by: Oliver Upton <oupton@kernel.org>
Reviewed-by: Wei-Lin Chang <weilin.chang@arm.com>
Link: https://patch.msgid.link/20260602165901.52800-3-oupton@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
History 2026-06-05 14:07:57 +01:00
..
hyp KVM: arm64: Correctly identify executable PTEs at stage-2 2026-06-05 14:07:57 +01:00
vgic KVM: arm64: vgic-its: Drop the translation cache reference only for the erased entry 2026-06-05 10:38:52 +01:00
.gitignore KVM: arm64: Generate hyp_constants.h for the host 2021-12-06 08:37:03 +00:00
arch_timer.c KVM: arm64: Move GICv5 timer PPI validation into timer_irqs_are_valid() 2026-04-01 15:42:26 +01:00
arm.c KVM: arm64: vgic: Free private_irqs when init fails after allocation 2026-05-20 08:08:17 +01:00
at.c KVM: arm64: Take the SRCU lock for page table walks in fault injection and AT emulation 2026-06-05 10:39:25 +01:00
config.c KVM: arm64: Fix FEAT_SPE_FnE to use PMSIDR_EL1.FnE, not PMSVer 2026-04-24 12:03:57 +01:00
debug.c KVM: arm64: Read PMUVer as unsigned 2026-03-24 12:33:48 +00:00
emulate-nested.c KVM: arm64: gic-v5: Support GICv5 FGTs & FGUs 2026-03-19 18:21:27 +00:00
fpsimd.c KVM: arm64: Remove kvm_arch_vcpu_run_map_fp() 2025-07-03 10:39:24 +01:00
guest.c KVM: Remove subtle "struct kvm_stats_desc" pseudo-overlay 2026-01-08 10:40:48 -08:00
handle_exit.c KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC 2026-03-11 08:51:16 +00:00
hyp_trace.c KVM: arm64: Fix memory leak in hyp_trace_unload() 2026-05-27 14:07:24 +01:00
hyp_trace.h KVM: arm64: Add trace remote for the nVHE/pKVM hyp 2026-03-11 08:51:16 +00:00
hypercalls.c arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID 2025-05-23 16:30:55 +00:00
inject_fault.c Merge branch kvm-arm64/pkvm-features-6.20 into kvmarm-master/next 2026-01-23 10:04:47 +00:00
Kconfig KVM: arm64: tracing: add ftrace dependency 2026-03-12 15:19:30 +00:00
Makefile KVM: arm64: Add trace remote for the nVHE/pKVM hyp 2026-03-11 08:51:16 +00:00
mmio.c KVM: arm64: Add exit to userspace on {LD,ST}64B* outside of memslots 2026-01-22 13:24:49 +00:00
mmu.c KVM: arm64: Handle permission faults with guest_memfd 2026-05-06 17:08:39 +01:00
nested.c KVM: arm64: Reassign nested_mmus array behind mmu_lock 2026-06-05 11:48:41 +01:00
pauth.c KVM: arm64: nv: Work around lack of pauth support in old toolchains 2024-04-23 19:27:11 +01:00
pkvm.c KVM: arm64: Allow userspace to create protected VMs when pKVM is enabled 2026-03-30 16:58:09 +01:00
pmu-emul.c KVM: arm64: PMU: Preserve AArch32 counter low bits 2026-05-27 10:15:40 +01:00
pmu.c KVM: arm64: Use a cpucap to determine if system supports FEAT_PMUv3 2025-03-11 12:54:23 -07:00
psci.c KVM: arm64: Add support for PSCI v1.2 and v1.3 2024-10-24 16:38:07 -07:00
ptdump.c KVM: arm64: ptdump: Initialize parser_state before pgtable walk 2026-03-28 10:02:55 +00:00
pvtime.c KVM: MMU: Make the definition of 'INVALID_GPA' common 2023-01-19 21:48:38 +00:00
reset.c KVM: arm64: Discard PC update state on vcpu reset 2026-03-15 15:11:22 +00:00
stacktrace.c KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC 2026-03-11 08:51:16 +00:00
sys_regs.c KVM: arm64: Correctly cap ZCR_EL2 provided by a guest hypervisor 2026-05-29 10:04:00 +01:00
sys_regs.h KVM: arm64: Handle FEAT_IDST for sysregs without specific handlers 2026-01-15 11:58:57 +00:00
trace.h KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
trace_arm.h KVM: arm64: Replace ternary flags with str_on_off() helper 2025-05-06 09:38:37 +01:00
trace_handle_exit.h arm64: kvm: trace_handle_exit: use string choices helper 2025-07-23 23:36:55 -07:00
trng.c KVM: arm64: Implement the TRNG hypervisor call 2021-01-25 22:19:31 +00:00
va_layout.c KVM: arm64: Calculate hyp VA size only once 2026-01-14 10:40:11 +00:00
vgic-sys-reg-v3.c KVM: arm64: Enforce the sorting of the GICv3 system register table 2025-07-26 08:36:58 -07:00
vmid.c KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2 2025-02-20 16:29:28 +00:00