ia64/xen-unstable

changeset 16837:7b1e7e8a5130

minios: fix case when _text is not 0

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 22 11:35:26 2008 +0000 (2008-01-22)
parents d5e22e766d1f
children 945820bfedb6
files extras/mini-os/arch/x86/mm.c
line diff
     1.1 --- a/extras/mini-os/arch/x86/mm.c	Tue Jan 22 11:19:40 2008 +0000
     1.2 +++ b/extras/mini-os/arch/x86/mm.c	Tue Jan 22 11:35:26 2008 +0000
     1.3 @@ -497,11 +497,11 @@ static void clear_bootstrap(void)
     1.4      int n = sizeof(mfns)/sizeof(*mfns);
     1.5      pte_t nullpte = { };
     1.6  
     1.7 -    /* Use page 0 as the CoW zero page */
     1.8 -    memset(NULL, 0, PAGE_SIZE);
     1.9 -    mfn_zero = pfn_to_mfn(0);
    1.10 -    if (HYPERVISOR_update_va_mapping(0, nullpte, UVMF_INVLPG))
    1.11 -	printk("Unable to unmap page 0\n");
    1.12 +    /* Use first page as the CoW zero page */
    1.13 +    memset(&_text, 0, PAGE_SIZE);
    1.14 +    mfn_zero = pfn_to_mfn((unsigned long) &_text);
    1.15 +    if (HYPERVISOR_update_va_mapping((unsigned long) &_text, nullpte, UVMF_INVLPG))
    1.16 +	printk("Unable to unmap first page\n");
    1.17  
    1.18      set_xen_guest_handle(reservation.extent_start, mfns);
    1.19      reservation.nr_extents = n;