]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: nv: Enforce S2 alignment when contiguous bit is set
authorMarc Zyngier <maz@kernel.org>
Sat, 10 Aug 2024 17:42:41 +0000 (18:42 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 30 Aug 2024 11:04:20 +0000 (12:04 +0100)
commit4155539bc5baab514ac71285a1a13fcf148f9cf1
tree22426cce35e8e8193aa14ee23d423df363a09d1f
parent5fddf9abc31a57e2cc35287998994cf4a684fada
KVM: arm64: nv: Enforce S2 alignment when contiguous bit is set

Despite KVM not using the contiguous bit for anything related to
TLBs, the spec does require that the alignment defined by the
contiguous bit for the page size and the level is enforced.

Add the required checks to offset the point where PA and VA merge.

Fixes: 61e30b9eef7f ("KVM: arm64: nv: Implement nested Stage-2 page table walk logic")
Reported-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_nested.h
arch/arm64/kvm/nested.c