From 9896e587b013221f4a6e8673fbfef2306fe7a233 Mon Sep 17 00:00:00 2001 From: Vincent Donnefort Date: Fri, 15 Jul 2022 16:50:38 +0100 Subject: [PATCH] ANDROID: KVM: arm64: Support unaligned fixmap in the nVHE hyp Return the fixmap VA with the page offset, instead of the page base address. Bug: 244543039 Bug: 229972309 Change-Id: I40c342f84e3cd395156ef846f0434c028d4e3fa3 Signed-off-by: Vincent Donnefort Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/nvhe/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c index 81e39e080ac5..d4472de5b284 100644 --- a/arch/arm64/kvm/hyp/nvhe/mm.c +++ b/arch/arm64/kvm/hyp/nvhe/mm.c @@ -266,7 +266,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)