[PATCH 03/11] KVM: arm64: Support unaligned fixmap in the nVHE hyp

Vincent Donnefort posted 11 patches 11 months, 2 weeks ago
There is a newer version of this series
[PATCH 03/11] KVM: arm64: Support unaligned fixmap in the nVHE hyp
Posted by Vincent Donnefort 11 months, 2 weeks ago
Return the fixmap VA with the page offset, instead of the page base
address.

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

diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c
index f41c7440b34b..720cc3b36596 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)
-- 
2.48.1.601.g30ceb7b040-goog