linux-yocto/arch/arm64/kvm
Alexandru Elisei 85592114ff KVM: arm64: VHE: Compute fgt traps before activating them
On VHE, the Fine Grain Traps registers are written to hardware in
kvm_arch_vcpu_load()->..->__activate_traps_hfgxtr(), but the fgt array is
computed later, in kvm_vcpu_load_fgt(). This can lead to zero being written
to the FGT registers the first time a VCPU is loaded. Also, any changes to
the fgt array will be visible only after the VCPU is scheduled out, and
then back in, which is not the intended behaviour.

Fix it by computing the fgt array just before the fgt traps are written
to hardware.

Fixes: fb10ddf35c ("KVM: arm64: Compute per-vCPU FGTs at vcpu_load()")
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/20251112102853.47759-1-alexandru.elisei@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
2025-11-12 10:52:58 +00:00
..
hyp KVM: arm64: Check the untrusted offset in FF-A memory share 2025-10-30 16:14:58 +00:00
vgic KVM: arm64: vgic-v3: Release reserved slot outside of lpi_xa's lock 2025-11-08 11:19:32 +00:00
.gitignore
arch_timer.c KVM: arm64: Kill leftovers of ad-hoc timer userspace access 2025-10-13 14:42:41 +01:00
arm.c KVM: arm64: VHE: Compute fgt traps before activating them 2025-11-12 10:52:58 +00:00
at.c KVM: arm64: Remove unreachable break after return 2025-10-13 14:17:03 +01:00
config.c KVM: arm64: nv: Use FGT write trap of MDSCR_EL1 when available 2025-10-13 14:44:37 +01:00
debug.c KVM: arm64: Guard PMSCR_EL1 initialization with SPE presence check 2025-10-13 14:26:36 +01:00
emulate-nested.c Merge branch kvm-arm64/misc-6.18 into kvmarm-master/next 2025-09-20 12:26:29 +01:00
fpsimd.c KVM: arm64: Remove kvm_arch_vcpu_run_map_fp() 2025-07-03 10:39:24 +01:00
guest.c KVM: arm64: Kill leftovers of ad-hoc timer userspace access 2025-10-13 14:42:41 +01:00
handle_exit.c KVM: arm64: Fix WFxT handling of nested virt 2025-10-13 14:42:41 +01: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 KVM: arm64: Populate level on S1PTW SEA injection 2025-09-20 11:05:14 +01:00
Kconfig hyperv-next for v6.18 2025-10-07 08:40:15 -07:00
Makefile KVM: arm64: gic-v5: Probe for GICv5 2025-07-08 14:41:06 -07:00
mmio.c KVM: arm64: Don't retire MMIO instruction w/ pending (emulated) SError 2025-07-08 11:36:36 -07:00
mmu.c KVM/arm64 updates for 6.18 2025-09-30 13:23:28 -04:00
nested.c KVM: arm64: nv: Use FGT write trap of MDSCR_EL1 when available 2025-10-13 14:44:37 +01:00
pauth.c
pkvm.c KVM/arm64 updates for 6.18 2025-09-30 13:23:28 -04:00
pmu-emul.c KVM: arm64: Add RMW specific sysreg accessor 2025-06-05 14:18:01 +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: Don't test PTE_VALID alongside other attributes 2025-09-08 20:01:21 +01:00
pvtime.c
reset.c KVM: arm64: nv: Add pseudo-TLB backing VNCR_EL2 2025-05-19 07:59:46 +01:00
stacktrace.c arm64: kvm: Introduce nvhe stack size constants 2025-01-08 11:25:28 +00:00
sys_regs.c KVM: arm64: Finalize ID registers only once per VM 2025-11-11 12:24:22 +00:00
sys_regs.h KVM: arm64: Add timer UAPI workaround to sysreg infrastructure 2025-10-13 14:42:40 +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
trace.h
trng.c
va_layout.c
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