Skip to contentSkip to conversation

mini-os: fix do_map_frames() for pvh

PATCH Applied Juergen Gross 3 participants 3 messages Aug 15, 2020 – Aug 17, 2020 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mini-os: fix do_map_frames() for pvh

In case ov PVH dom_map_frames() is missing to increment the virtual address. This leads to writing only the first page table entry multiple times.

---
 arch/x86/mm.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/mm.c +1 -0
index ea58444..8ba14a5 100644
@@ -695,6 +695,7 @@ int do_map_frames(unsigned long va,
         pgt[l1_table_offset(va)] = (pgentry_t)
             (((mfns[done * stride] + done * incr) << PAGE_SHIFT) | prot);
         done++;
+        va += PAGE_SIZE;
 #endif
     }
 
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw

Juergen Gross, le sam. 15 août 2020 13:12:57 +0200, a ecrit:

Quoted 5 lines

In case ov PVH dom_map_frames() is missing to increment the virtual address. This leads to writing only the first page table entry multiple times.

Quoted 19 lines
---
 arch/x86/mm.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/mm.c +1 -0
index ea58444..8ba14a5 100644
@@ -695,6 +695,7 @@ int do_map_frames(unsigned long va,
         pgt[l1_table_offset(va)] = (pgentry_t)
             (((mfns[done * stride] + done * incr) << PAGE_SHIFT) | prot);
         done++;
+        va += PAGE_SIZE;
 #endif
     }
 
Signature · 1 line
2.26.2
Signature · 3 lines
Samuel
j'etais en train de nettoyer ma souris et le coup est parti...
 -+- s sur #ens-mim - et en plus c vrai... -+-