ia64/xen-unstable

changeset 4067:2451944220aa

bitkeeper revision 1.1159.258.36 (42305b3948mU75urrgzQftpV3eNPbg)

Tidy up ugly warning in debug builds from xc_linux_restore.
Signed-off-by: ian@xensource.com
author iap10@freefall.cl.cam.ac.uk
date Thu Mar 10 14:35:37 2005 +0000 (2005-03-10)
parents 94b7d61e3dfe
children 78dff7880271 030bbae1c84f
files tools/libxc/xc_linux_restore.c
line diff
     1.1 --- a/tools/libxc/xc_linux_restore.c	Thu Mar 10 14:27:50 2005 +0000
     1.2 +++ b/tools/libxc/xc_linux_restore.c	Thu Mar 10 14:35:37 2005 +0000
     1.3 @@ -123,7 +123,7 @@ int xc_linux_restore(int xc_handle, XcIO
     1.4      /* A temporary mapping of the guest's suspend record. */
     1.5      suspend_record_t *p_srec;
     1.6  
     1.7 -    char *region_base;
     1.8 +    char *region_base, *p_gdt;
     1.9  
    1.10      mmu_t *mmu = NULL;
    1.11  
    1.12 @@ -565,6 +565,13 @@ int xc_linux_restore(int xc_handle, XcIO
    1.13          ctxt.gdt_frames[i] = pfn_to_mfn_table[pfn];
    1.14      }
    1.15  
    1.16 +    /* Zero hypervisor GDT entries (supresses ugly warning) */
    1.17 +    p_gdt = xc_map_foreign_range(
    1.18 +        xc_handle, dom, PAGE_SIZE, PROT_WRITE, ctxt.gdt_frames[0]);
    1.19 +    memset( p_gdt + FIRST_RESERVED_GDT_ENTRY*8, 0,
    1.20 +               NR_RESERVED_GDT_ENTRIES*8 );
    1.21 +    munmap( p_gdt, PAGE_SIZE );
    1.22 +
    1.23      /* Uncanonicalise the page table base pointer. */
    1.24      pfn = ctxt.pt_base >> PAGE_SHIFT;
    1.25      if ( (pfn >= nr_pfns) || ((pfn_type[pfn]&LTABTYPE_MASK) != L2TAB) )