From e12c4c1ddb619af419e85242cba664f462befaca Mon Sep 17 00:00:00 2001 From: WangRunji Date: Thu, 12 Jul 2018 12:12:28 +0800 Subject: [PATCH] Set global bit for kernel region (x86_64) --- src/arch/x86_64/paging.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/x86_64/paging.rs b/src/arch/x86_64/paging.rs index bbf908a..cc9fb72 100644 --- a/src/arch/x86_64/paging.rs +++ b/src/arch/x86_64/paging.rs @@ -232,8 +232,8 @@ impl InactivePageTable0 { let e510 = table[510].clone(); let e509 = table[509].clone(); self.edit(|_| { - table[510] = e510; - table[509] = e509; + table[510].set_addr(e510.addr(), e510.flags() | EF::GLOBAL); + table[509].set_addr(e509.addr(), e509.flags() | EF::GLOBAL); }); } }