Skip to content

Commit afe1a23

Browse files
authored
Merge pull request #1359 from 123abcpp/fix_pagetable_init
fix: page table initialization flags
2 parents 5bb916b + b16d4b4 commit afe1a23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qvisor/src/vmspace/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,11 +1802,13 @@ impl VMSpace {
18021802
flags: PageTableFlags,
18031803
hpage_size: pagetable::HugePageType
18041804
) -> Result<bool> {
1805+
// The kernel current shares the same first level page table entry with guest
1806+
// TODO: Set _kernel to true if the kernel moves to upper half
18051807
match hpage_size {
18061808
pagetable::HugePageType::GB1 => {
18071809
info!("KernelMap1G start is {:x}, end is {:x}", start.0, end.0);
18081810
return self.pageTables
1809-
.MapWith1G(start, end, physical, flags, &mut self.allocator, true);
1811+
.MapWith1G(start, end, physical, flags, &mut self.allocator, false);
18101812
},
18111813
pagetable::HugePageType::MB2 => {
18121814
info!("KernelMap2MB start is {:x}, end is {:x}", start.0, end.0);

0 commit comments

Comments
 (0)