diff mbox series

[RFC,05/11] KVM: arm64: Support unaligned fixmap in the nVHE hyp

Message ID 20240805173234.3542917-6-vdonnefort@google.com (mailing list archive)
State Superseded
Headers show
Series Tracefs support for pKVM | expand

Commit Message

Vincent Donnefort Aug. 5, 2024, 5:32 p.m. UTC
Return the fixmap VA with the page offset, instead of the page base
address.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
diff mbox series

Patch

diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c
index 8850b591d775..c5a9d8874eb2 100644
--- a/arch/arm64/kvm/hyp/nvhe/mm.c
+++ b/arch/arm64/kvm/hyp/nvhe/mm.c
@@ -240,7 +240,7 @@  void *hyp_fixmap_map(phys_addr_t phys)
 	WRITE_ONCE(*ptep, pte);
 	dsb(ishst);
 
-	return (void *)slot->addr;
+	return (void *)slot->addr + offset_in_page(phys);
 }
 
 static void fixmap_clear_slot(struct hyp_fixmap_slot *slot)