hv_vm: Fix bug when making L2 mappings

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-05-09 03:11:40 +09:00
parent 52823eaab6
commit 8d5596a1a1

View file

@ -281,7 +281,7 @@ int hv_map(u64 from, u64 to, u64 size, u64 incr)
}
// L2 mappings
chunk = ALIGN_DOWN(size, MASK(VADDR_L3_OFFSET_BITS));
chunk = ALIGN_DOWN(size, MASK(VADDR_L2_OFFSET_BITS));
if (chunk && (!hw || (to & VADDR_L2_ALIGN_MASK) == 0)) {
hv_pt_map_l2(from, to, chunk, incr);
from += chunk;