linux/arch/arm64/kvm/hyp
Will Deacon 4c36a15673 KVM: arm64: Ensure target address is granule-aligned for range TLBI
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>
2024-04-01 01:30:45 -07:00
..
include KVM: arm64: Make FEAT_MOPS UNDEF if not advertised to the guest 2024-02-19 17:13:02 +00:00
nvhe KVM: arm64: Use TLBI_TTL_UNKNOWN in __kvm_tlb_flush_vmid_range() 2024-04-01 01:30:45 -07:00
vhe KVM: arm64: Use TLBI_TTL_UNKNOWN in __kvm_tlb_flush_vmid_range() 2024-04-01 01:30:45 -07:00
aarch32.c KVM: arm64: hyp/aarch32: fix kernel-doc warnings 2024-02-01 20:25:41 +00:00
entry.S KVM: arm64: Use symbolic definition for ISR_EL1.A 2023-01-12 16:31:33 +00:00
exception.c KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
fpsimd.S KVM: arm64: Remove unused __sve_save_state 2021-11-22 16:01:39 +00:00
hyp-constants.c KVM: arm64: Instantiate pKVM hypervisor VM and vCPU structures from EL1 2022-11-11 17:16:24 +00:00
hyp-entry.S KVM: arm64: Add missing BTI instructions 2023-07-12 22:15:36 +00:00
Makefile KVM: arm64: Enable stack protection and branch profiling for VHE 2022-10-09 03:15:55 +01:00
pgtable.c KVM: arm64: Ensure target address is granule-aligned for range TLBI 2024-04-01 01:30:45 -07:00
vgic-v2-cpuif-proxy.c KVM: arm64: Remove hyp_symbol_addr 2021-01-23 14:01:00 +00:00
vgic-v3-sr.c KVM: arm64: Treat ESR_EL2 as a 64-bit register 2022-04-29 19:26:27 +01:00