ia64/xen-unstable

changeset 5677:b3a27d7ef999

Move xenstore page before page tables so that guest doesn't free it after boot

Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Wed Jul 06 15:36:57 2005 +0000 (2005-07-06)
parents 287583627544
children 1883ec07708b
files tools/libxc/xc_linux_build.c
line diff
     1.1 --- a/tools/libxc/xc_linux_build.c	Wed Jul 06 08:50:11 2005 +0000
     1.2 +++ b/tools/libxc/xc_linux_build.c	Wed Jul 06 15:36:57 2005 +0000
     1.3 @@ -129,16 +129,16 @@ static int setup_guest(int xc_handle,
     1.4      vinitrd_end      = vinitrd_start + initrd_len;
     1.5      vphysmap_start   = round_pgup(vinitrd_end);
     1.6      vphysmap_end     = vphysmap_start + (nr_pages * sizeof(unsigned long));
     1.7 -    vpt_start        = round_pgup(vphysmap_end);
     1.8 +    vstoreinfo_start = round_pgup(vphysmap_end);
     1.9 +    vstoreinfo_end   = vstoreinfo_start + PAGE_SIZE;
    1.10 +    vpt_start        = vstoreinfo_end; 
    1.11 +
    1.12      for ( nr_pt_pages = 2; ; nr_pt_pages++ )
    1.13      {
    1.14          vpt_end          = vpt_start + (nr_pt_pages * PAGE_SIZE);
    1.15          vstartinfo_start = vpt_end;
    1.16          vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
    1.17 -        /* Place store shared page after startinfo. */
    1.18 -        vstoreinfo_start = vstartinfo_end;
    1.19 -        vstoreinfo_end   = vstartinfo_end + PAGE_SIZE;
    1.20 -        vstack_start     = vstoreinfo_end;
    1.21 +        vstack_start     = vstartinfo_end;
    1.22          vstack_end       = vstack_start + PAGE_SIZE;
    1.23          v_end            = (vstack_end + (1UL<<22)-1) & ~((1UL<<22)-1);
    1.24          if ( (v_end - vstack_end) < (512UL << 10) )
    1.25 @@ -167,17 +167,17 @@ static int setup_guest(int xc_handle,
    1.26             " Loaded kernel: %p->%p\n"
    1.27             " Init. ramdisk: %p->%p\n"
    1.28             " Phys-Mach map: %p->%p\n"
    1.29 +           " Store page:    %p->%p\n"
    1.30             " Page tables:   %p->%p\n"
    1.31             " Start info:    %p->%p\n"
    1.32 -           " Store page:    %p->%p\n"
    1.33             " Boot stack:    %p->%p\n"
    1.34             " TOTAL:         %p->%p\n",
    1.35             _p(dsi.v_kernstart), _p(dsi.v_kernend), 
    1.36             _p(vinitrd_start), _p(vinitrd_end),
    1.37             _p(vphysmap_start), _p(vphysmap_end),
    1.38 +           _p(vstoreinfo_start), _p(vstoreinfo_end),
    1.39             _p(vpt_start), _p(vpt_end),
    1.40             _p(vstartinfo_start), _p(vstartinfo_end),
    1.41 -           _p(vstoreinfo_start), _p(vstoreinfo_end),
    1.42             _p(vstack_start), _p(vstack_end),
    1.43             _p(dsi.v_start), _p(v_end));
    1.44      printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));