linux-stable/arch/arm64/kvm
Will Deacon d8de598caa KVM: arm64: Ensure target address is granule-aligned for range TLBI
commit 4c36a15673 upstream.

When zapping a table entry in stage2_try_break_pte(), we issue range
TLB invalidation for the region that was mapped by the table. However,
we neglect to align the base address down to the granule size and so
if we ended up reaching the table entry via a misaligned address then
we will accidentally skip invalidation for some prefix of the affected
address range.

Align 'ctx->addr' down to the granule size when performing TLB
invalidation for an unmapped table in stage2_try_break_pte().

Cc: Raghavendra Rao Ananta <rananta@google.com>
Cc: Gavin Shan <gshan@redhat.com>
Cc: Shaoqin Huang <shahuang@redhat.com>
Cc: Quentin Perret <qperret@google.com>
Fixes: defc8cc7ab ("KVM: arm64: Invalidate the table entries upon a range")
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240327124853.11206-5-will@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:38:04 +02:00
..
hyp KVM: arm64: Ensure target address is granule-aligned for range TLBI 2024-04-10 16:38:04 +02:00
vgic KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler 2024-02-21 10:06:41 +00:00
.gitignore
arch_timer.c KVM: arm64: nv: Hoist vcpu_has_nv() into is_hyp_ctxt() 2023-12-19 09:50:52 +00:00
arm.c Common KVM changes for 6.8: 2024-01-08 08:09:57 -05:00
debug.c arm64/sysreg: Rename TRBIDR_EL1 fields per auto-gen tools format 2023-06-14 14:37:33 +01:00
emulate-nested.c KVM: arm64: Handle HAFGRTR_EL2 trapping in nested virt 2023-12-18 11:25:50 +00:00
fpsimd.c KVM: arm64: Rework CPTR_EL2 programming for HVHE configuration 2023-06-12 23:17:24 +00:00
guest.c Merge branch 'for-next/cpus_have_const_cap' into for-next/core 2023-10-26 17:10:18 +01:00
handle_exit.c KVM: arm64: nv: Expand ERET trap forwarding to handle FGT 2023-08-17 10:00:27 +01:00
hypercalls.c Merge branch kvm-arm64/smccc-filter-cleanups into kvmarm/next 2023-10-30 20:18:37 +00:00
inject_fault.c KVM: arm64: Fix repeated words in comments 2023-04-21 13:46:04 +01:00
Kconfig KVM: arm64: Do not source virt/lib/Kconfig twice 2024-02-04 13:08:28 +00:00
Makefile KVM: arm64: nv: Filter out unsupported features from ID regs 2023-02-11 10:13:30 +00:00
mmio.c KVM: arm64: Add tracepoint for MMIO accesses where ISV==0 2023-10-30 20:17:22 +00:00
mmu.c KVM: arm64: Fix out-of-IPA space translation fault handling 2024-04-10 16:38:01 +02:00
nested.c KVM: arm64: nv: Compute NV view of idregs as a one-off 2023-12-19 09:51:00 +00:00
pkvm.c KVM: arm64: Fix circular locking dependency 2024-01-30 21:30:33 +00:00
pmu-emul.c arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N 2023-12-12 09:46:21 +00:00
pmu.c KVM: arm64: pmu: Drop redundant check for non-NULL kvm_pmu_events 2023-10-12 16:13:39 +01:00
psci.c Merge branch kvm-arm64/smccc-filtering into kvmarm-master/next 2023-04-21 09:44:32 +01:00
pvtime.c KVM: MMU: Make the definition of 'INVALID_GPA' common 2023-01-19 21:48:38 +00:00
reset.c KVM: arm64: Allow guests with >48-bit IPA size on FEAT_LPA2 systems 2023-11-27 15:03:50 +00:00
stacktrace.c arm64: stacktrace: track hyp stacks in unwinder's address space 2022-09-09 12:30:08 +01:00
sys_regs.c Generic: 2024-01-17 13:03:37 -08:00
sys_regs.h KVM: arm64: Save ID registers' sanitized value per guest 2023-06-15 12:55:08 +00:00
trace.h
trace_arm.h KVM: arm64: Add tracepoint for MMIO accesses where ISV==0 2023-10-30 20:17:22 +00:00
trace_handle_exit.h
trng.c
va_layout.c arm64: alternatives: kvm: prepare for cap changes 2022-09-16 17:15:02 +01:00
vgic-sys-reg-v3.c KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP 2022-07-17 11:55:33 +01:00
vmid.c KVM: arm64: Reload stage-2 for VMID change on VHE 2023-10-20 17:52:01 +00:00