KVM: arm64: Handle huge mappings for np-guest CMOs
authorVincent Donnefort <vdonnefort@google.com>
Wed, 21 May 2025 12:48:25 +0000 (13:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 21 May 2025 13:33:51 +0000 (14:33 +0100)
commit944a1ed8cc3ea6c5b16b6aca11475ced0daf68a9
treed7fb84926781cbda63524bd6e6f9e07814a406e0
parentd5702dd22427789bc2178e942d92a2245e87b31a
KVM: arm64: Handle huge mappings for np-guest CMOs

clean_dcache_guest_page() and invalidate_icache_guest_page() accept a
size as an argument. But they also rely on fixmap, which can only map a
single PAGE_SIZE page.

With the upcoming stage-2 huge mappings for pKVM np-guests, those
callbacks will get size > PAGE_SIZE. Loop the CMOs on a PAGE_SIZE basis
until the whole range is done.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Link: https://lore.kernel.org/r/20250521124834.1070650-2-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/nvhe/mem_protect.c