diff options
author | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-03-10 14:35:37 +0000 |
---|---|---|
committer | iap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk> | 2005-03-10 14:35:37 +0000 |
commit | 15f6b230e351fa64b380ca1986724812c5b70a0f (patch) | |
tree | 84d68c9b11781b530acd2fa7abcde173db75dd67 | |
parent | c3918e84f7b7e04a512b45127312f8f59f0fe243 (diff) | |
download | xen-15f6b230e351fa64b380ca1986724812c5b70a0f.tar.gz xen-15f6b230e351fa64b380ca1986724812c5b70a0f.tar.bz2 xen-15f6b230e351fa64b380ca1986724812c5b70a0f.zip |
bitkeeper revision 1.1159.258.36 (42305b3948mU75urrgzQftpV3eNPbg)
Tidy up ugly warning in debug builds from xc_linux_restore.
Signed-off-by: ian@xensource.com
-rw-r--r-- | tools/libxc/xc_linux_restore.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 1db39317de..46373a2806 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -123,7 +123,7 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt) /* A temporary mapping of the guest's suspend record. */ suspend_record_t *p_srec; - char *region_base; + char *region_base, *p_gdt; mmu_t *mmu = NULL; @@ -565,6 +565,13 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt) ctxt.gdt_frames[i] = pfn_to_mfn_table[pfn]; } + /* Zero hypervisor GDT entries (supresses ugly warning) */ + p_gdt = xc_map_foreign_range( + xc_handle, dom, PAGE_SIZE, PROT_WRITE, ctxt.gdt_frames[0]); + memset( p_gdt + FIRST_RESERVED_GDT_ENTRY*8, 0, + NR_RESERVED_GDT_ENTRIES*8 ); + munmap( p_gdt, PAGE_SIZE ); + /* Uncanonicalise the page table base pointer. */ pfn = ctxt.pt_base >> PAGE_SHIFT; if ( (pfn >= nr_pfns) || ((pfn_type[pfn]<ABTYPE_MASK) != L2TAB) ) |