Thread (14 messages) 14 messages, 2 authors, 2025-01-09
STALE519d
Revisions (15)
  1. rfc [diff vs current]
  2. v1 [diff vs current]
  3. v2 current
  4. v1 [diff vs current]
  5. v4 [diff vs current]
  6. v5 [diff vs current]
  7. v6 [diff vs current]
  8. v7 [diff vs current]
  9. v8 [diff vs current]
  10. v9 [diff vs current]
  11. v10 [diff vs current]
  12. v11 [diff vs current]
  13. v12 [diff vs current]
  14. v13 [diff vs current]
  15. v14 [diff vs current]

[PATCH v2 04/12] KVM: arm64: Support unaligned fixmap in the nVHE hyp

From: Vincent Donnefort <hidden>
Date: 2025-01-08 11:46:10
Also in: kvmarm, linux-arm-kernel, lkml
Subsystem: arm64 port (aarch64 architecture), kernel virtual machine for arm64 (kvm/arm64), the rest · Maintainers: Catalin Marinas, Will Deacon, Marc Zyngier, Oliver Upton, Linus Torvalds

Return the fixmap VA with the page offset, instead of the page base
address.

Signed-off-by: Vincent Donnefort <redacted>
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)
-- 
2.47.1.613.gc27f4b7a9f-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help