]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: fix case when _text is not 0
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 22 Jan 2008 11:35:26 +0000 (11:35 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 22 Jan 2008 11:35:26 +0000 (11:35 +0000)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
arch/x86/mm.c

index b8f55b7c58ac4bf683ea02eb26dacfea3e0c001a..5e6f180efd5ff76f284e5d4359876f2fa8579984 100644 (file)
@@ -497,11 +497,11 @@ static void clear_bootstrap(void)
     int n = sizeof(mfns)/sizeof(*mfns);
     pte_t nullpte = { };
 
-    /* Use page 0 as the CoW zero page */
-    memset(NULL, 0, PAGE_SIZE);
-    mfn_zero = pfn_to_mfn(0);
-    if (HYPERVISOR_update_va_mapping(0, nullpte, UVMF_INVLPG))
-       printk("Unable to unmap page 0\n");
+    /* Use first page as the CoW zero page */
+    memset(&_text, 0, PAGE_SIZE);
+    mfn_zero = pfn_to_mfn((unsigned long) &_text);
+    if (HYPERVISOR_update_va_mapping((unsigned long) &_text, nullpte, UVMF_INVLPG))
+       printk("Unable to unmap first page\n");
 
     set_xen_guest_handle(reservation.extent_start, mfns);
     reservation.nr_extents = n;