ia64/xen-unstable

changeset 9211:fbeb0a5b7219

Change the location of the shared_info page for auto_translated_physmap guests.
Instead of putting the page outside of the guests pseudo-physical address
space, we put it next to the other pages filled by the domain builder,
such that the page is already mapped in the initial pagetables and/or a
lowmem-type memory mapping.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Mar 09 16:24:57 2006 +0000 (2006-03-09)
parents df0ad1c46f10
children 7e68bc2745af
files linux-2.6-xen-sparse/arch/i386/mm/init-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h tools/libxc/xc_linux_build.c xen/arch/x86/mm.c xen/common/memory.c xen/include/public/memory.h xen/include/xen/mm.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c	Thu Mar 09 16:03:23 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c	Thu Mar 09 16:24:57 2006 +0000
     1.3 @@ -556,10 +556,15 @@ void __init paging_init(void)
     1.4  
     1.5  	kmap_init();
     1.6  
     1.7 -	/* Switch to the real shared_info page, and clear the dummy page. */
     1.8 -	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
     1.9 -	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    1.10 -	memset(empty_zero_page, 0, sizeof(empty_zero_page));
    1.11 +	if (!xen_feature(XENFEAT_auto_translated_physmap) ||
    1.12 +	    xen_start_info->shared_info >= xen_start_info->nr_pages) {
    1.13 +		/* Switch to the real shared_info page, and clear the
    1.14 +		 * dummy page. */
    1.15 +		set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    1.16 +		HYPERVISOR_shared_info =
    1.17 +			(shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    1.18 +		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    1.19 +	}
    1.20  
    1.21  	/* Setup mapping of lower 1st MB */
    1.22  	for (i = 0; i < NR_FIX_ISAMAPS; i++)
     2.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Thu Mar 09 16:03:23 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Thu Mar 09 16:24:57 2006 +0000
     2.3 @@ -664,6 +664,13 @@ void __init setup_arch(char **cmdline_p)
     2.4  
     2.5  	setup_xen_features();
     2.6  
     2.7 +	if (xen_feature(XENFEAT_auto_translated_physmap) &&
     2.8 +	    xen_start_info->shared_info < xen_start_info->nr_pages) {
     2.9 +		HYPERVISOR_shared_info =
    2.10 +			(shared_info_t *)__va(xen_start_info->shared_info);
    2.11 +		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    2.12 +	}
    2.13 +
    2.14  	HYPERVISOR_vm_assist(VMASST_CMD_enable,
    2.15  			     VMASST_TYPE_writable_pagetables);
    2.16  
     3.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c	Thu Mar 09 16:03:23 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c	Thu Mar 09 16:24:57 2006 +0000
     3.3 @@ -757,10 +757,16 @@ void __init paging_init(void)
     3.4  	free_area_init_node(0, NODE_DATA(0), zones,
     3.5  			    __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes);
     3.6  
     3.7 -	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
     3.8 -	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
     3.9 +	if (!xen_feature(XENFEAT_auto_translated_physmap) ||
    3.10 +	    xen_start_info->shared_info >= xen_start_info->nr_pages) {
    3.11 +		/* Switch to the real shared_info page, and clear the
    3.12 +		 * dummy page. */
    3.13 +		set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    3.14 +		HYPERVISOR_shared_info =
    3.15 +			(shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    3.16 +		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    3.17 +	}
    3.18  
    3.19 -	memset(empty_zero_page, 0, sizeof(empty_zero_page));
    3.20  	init_mm.context.pinned = 1;
    3.21  
    3.22  	/* Setup mapping of lower 1st MB */
     4.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Thu Mar 09 16:03:23 2006 +0100
     4.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Thu Mar 09 16:24:57 2006 +0000
     4.3 @@ -37,6 +37,13 @@ static void __init machine_specific_arch
     4.4  	struct xen_platform_parameters pp;
     4.5  	struct xennmi_callback cb;
     4.6  
     4.7 +	if (xen_feature(XENFEAT_auto_translated_physmap) &&
     4.8 +	    xen_start_info->shared_info < xen_start_info->nr_pages) {
     4.9 +		HYPERVISOR_shared_info =
    4.10 +			(shared_info_t *)__va(xen_start_info->shared_info);
    4.11 +		memset(empty_zero_page, 0, sizeof(empty_zero_page));
    4.12 +	}
    4.13 +
    4.14  	HYPERVISOR_set_callbacks(
    4.15  	    __KERNEL_CS, (unsigned long)hypervisor_callback,
    4.16  	    __KERNEL_CS, (unsigned long)failsafe_callback);
     5.1 --- a/tools/libxc/xc_linux_build.c	Thu Mar 09 16:03:23 2006 +0100
     5.2 +++ b/tools/libxc/xc_linux_build.c	Thu Mar 09 16:24:57 2006 +0000
     5.3 @@ -606,15 +606,11 @@ static int setup_guest(int xc_handle,
     5.4      struct load_funcs load_funcs;
     5.5      struct domain_setup_info dsi;
     5.6      unsigned long vinitrd_start;
     5.7 -    unsigned long vinitrd_end;
     5.8      unsigned long vphysmap_start;
     5.9 -    unsigned long vphysmap_end;
    5.10      unsigned long vstartinfo_start;
    5.11 -    unsigned long vstartinfo_end;
    5.12      unsigned long vstoreinfo_start;
    5.13 -    unsigned long vstoreinfo_end;
    5.14      unsigned long vconsole_start;
    5.15 -    unsigned long vconsole_end;
    5.16 +    unsigned long vsharedinfo_start = 0; /* XXX gcc */
    5.17      unsigned long vstack_start;
    5.18      unsigned long vstack_end;
    5.19      unsigned long vpt_start;
    5.20 @@ -640,6 +636,34 @@ static int setup_guest(int xc_handle,
    5.21          goto error_out;
    5.22      }
    5.23  
    5.24 +    /* Parse and validate kernel features. */
    5.25 +    p = strstr(dsi.xen_guest_string, "FEATURES=");
    5.26 +    if ( p != NULL )
    5.27 +    {
    5.28 +        if ( !parse_features(p + strlen("FEATURES="),
    5.29 +                             supported_features,
    5.30 +                             required_features) )
    5.31 +        {
    5.32 +            ERROR("Failed to parse guest kernel features.\n");
    5.33 +            goto error_out;
    5.34 +        }
    5.35 +
    5.36 +        printf("Supported features  = { %08x }.\n", supported_features[0]);
    5.37 +        printf("Required features   = { %08x }.\n", required_features[0]);
    5.38 +    }
    5.39 +
    5.40 +    for ( i = 0; i < XENFEAT_NR_SUBMAPS; i++ )
    5.41 +    {
    5.42 +        if ( (supported_features[i]&required_features[i]) != required_features[i] )
    5.43 +        {
    5.44 +            ERROR("Guest kernel does not support a required feature.\n");
    5.45 +            goto error_out;
    5.46 +        }
    5.47 +    }
    5.48 +
    5.49 +    shadow_mode_enabled = test_feature_bit(XENFEAT_auto_translated_physmap,
    5.50 +                                           required_features);
    5.51 +
    5.52      /*
    5.53       * Why do we need this? The number of page-table frames depends on the 
    5.54       * size of the bootstrap address space. But the size of the address space 
    5.55 @@ -647,17 +671,22 @@ static int setup_guest(int xc_handle,
    5.56       * read-only). We have a pair of simultaneous equations in two unknowns, 
    5.57       * which we solve by exhaustive search.
    5.58       */
    5.59 -    vinitrd_start    = round_pgup(dsi.v_end);
    5.60 -    vinitrd_end      = vinitrd_start + initrd->len;
    5.61 -    vphysmap_start   = round_pgup(vinitrd_end);
    5.62 -    vphysmap_end     = vphysmap_start + (nr_pages * sizeof(unsigned long));
    5.63 -    vstartinfo_start = round_pgup(vphysmap_end);
    5.64 -    vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
    5.65 -    vstoreinfo_start = vstartinfo_end;
    5.66 -    vstoreinfo_end   = vstoreinfo_start + PAGE_SIZE;
    5.67 -    vconsole_start   = vstoreinfo_end;
    5.68 -    vconsole_end     = vconsole_start + PAGE_SIZE;
    5.69 -    vpt_start        = vconsole_end; 
    5.70 +    v_end = round_pgup(dsi.v_end);
    5.71 +    vinitrd_start = v_end;
    5.72 +    v_end += round_pgup(initrd->len);
    5.73 +    vphysmap_start = v_end;
    5.74 +    v_end += round_pgup(nr_pages * sizeof(unsigned long));
    5.75 +    vstartinfo_start = v_end;
    5.76 +    v_end += PAGE_SIZE;
    5.77 +    vstoreinfo_start = v_end;
    5.78 +    v_end += PAGE_SIZE;
    5.79 +    vconsole_start = v_end;
    5.80 +    v_end += PAGE_SIZE;
    5.81 +    if ( shadow_mode_enabled ) {
    5.82 +        vsharedinfo_start = v_end;
    5.83 +        v_end += PAGE_SIZE;
    5.84 +    }
    5.85 +    vpt_start = v_end;
    5.86  
    5.87      for ( nr_pt_pages = 2; ; nr_pt_pages++ )
    5.88      {
    5.89 @@ -697,26 +726,22 @@ static int setup_guest(int xc_handle,
    5.90  
    5.91  #define _p(a) ((void *) (a))
    5.92  
    5.93 -    printf("VIRTUAL MEMORY ARRANGEMENT:\n"
    5.94 -           " Loaded kernel: %p->%p\n"
    5.95 -           " Init. ramdisk: %p->%p\n"
    5.96 -           " Phys-Mach map: %p->%p\n"
    5.97 -           " Start info:    %p->%p\n"
    5.98 -           " Store page:    %p->%p\n"
    5.99 -           " Console page:  %p->%p\n"
   5.100 -           " Page tables:   %p->%p\n"
   5.101 -           " Boot stack:    %p->%p\n"
   5.102 -           " TOTAL:         %p->%p\n",
   5.103 -           _p(dsi.v_kernstart), _p(dsi.v_kernend), 
   5.104 -           _p(vinitrd_start), _p(vinitrd_end),
   5.105 -           _p(vphysmap_start), _p(vphysmap_end),
   5.106 -           _p(vstartinfo_start), _p(vstartinfo_end),
   5.107 -           _p(vstoreinfo_start), _p(vstoreinfo_end),
   5.108 -           _p(vconsole_start), _p(vconsole_end),
   5.109 -           _p(vpt_start), _p(vpt_end),
   5.110 -           _p(vstack_start), _p(vstack_end),
   5.111 -           _p(dsi.v_start), _p(v_end));
   5.112 -    printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));
   5.113 +    printf("VIRTUAL MEMORY ARRANGEMENT:\n");
   5.114 +    printf(" Loaded kernel:    %p->%p\n", _p(dsi.v_kernstart),
   5.115 +           _p(dsi.v_kernend));
   5.116 +    if ( initrd->len )
   5.117 +        printf(" Initial ramdisk:  %p->%p\n", _p(vinitrd_start),
   5.118 +               _p(vinitrd_start + initrd->len));
   5.119 +    printf(" Phys-Mach map:    %p\n", _p(vphysmap_start));
   5.120 +    printf(" Start info:       %p\n", _p(vstartinfo_start));
   5.121 +    printf(" Store page:       %p\n", _p(vstoreinfo_start));
   5.122 +    printf(" Console page:     %p\n", _p(vconsole_start));
   5.123 +    if ( shadow_mode_enabled )
   5.124 +        printf(" Shared Info page: %p\n", _p(vsharedinfo_start));
   5.125 +    printf(" Page tables:      %p\n", _p(vpt_start));
   5.126 +    printf(" Boot stack:       %p\n", _p(vstack_start));
   5.127 +    printf(" TOTAL:            %p->%p\n", _p(dsi.v_start), _p(v_end));
   5.128 +    printf(" ENTRY ADDRESS:    %p\n", _p(dsi.v_kernentry));
   5.129  
   5.130      if ( ((v_end - dsi.v_start)>>PAGE_SHIFT) > nr_pages )
   5.131      {
   5.132 @@ -742,36 +767,6 @@ static int setup_guest(int xc_handle,
   5.133                             xc_handle, dom, page_array,
   5.134                             &dsi);
   5.135  
   5.136 -    /* Parse and validate kernel features. */
   5.137 -    p = strstr(dsi.xen_guest_string, "FEATURES=");
   5.138 -    if ( p != NULL )
   5.139 -    {
   5.140 -        if ( !parse_features(p + strlen("FEATURES="),
   5.141 -                             supported_features,
   5.142 -                             required_features) )
   5.143 -        {
   5.144 -            ERROR("Failed to parse guest kernel features.\n");
   5.145 -            goto error_out;
   5.146 -        }
   5.147 -
   5.148 -        fprintf(stderr, "Supported features  = { %08x }.\n",
   5.149 -                supported_features[0]);
   5.150 -        fprintf(stderr, "Required features   = { %08x }.\n",
   5.151 -                required_features[0]);
   5.152 -    }
   5.153 -
   5.154 -    for ( i = 0; i < XENFEAT_NR_SUBMAPS; i++ )
   5.155 -    {
   5.156 -        if ( (supported_features[i]&required_features[i]) != required_features[i] )
   5.157 -        {
   5.158 -            ERROR("Guest kernel does not support a required feature.\n");
   5.159 -            goto error_out;
   5.160 -        }
   5.161 -    }
   5.162 -
   5.163 -    shadow_mode_enabled = test_feature_bit(
   5.164 -        XENFEAT_auto_translated_physmap, required_features);
   5.165 -
   5.166      if ( load_initrd(xc_handle, dom, initrd,
   5.167                       vinitrd_start - dsi.v_start, page_array) )
   5.168          goto error_out;
   5.169 @@ -869,6 +864,7 @@ static int setup_guest(int xc_handle,
   5.170      if ( shadow_mode_enabled )
   5.171      {
   5.172          struct xen_reserved_phys_area xrpa;
   5.173 +        struct xen_map_shared_info xmsi;
   5.174  
   5.175          /* Enable shadow translate mode */
   5.176          if ( xc_shadow_control(xc_handle, dom,
   5.177 @@ -889,7 +885,16 @@ static int setup_guest(int xc_handle,
   5.178              PERROR("Cannot find shared info pfn");
   5.179              goto error_out;
   5.180          }
   5.181 -        guest_shared_info_mfn = xrpa.first_gpfn;
   5.182 +
   5.183 +        guest_shared_info_mfn = (vsharedinfo_start-dsi.v_start) >> PAGE_SHIFT;
   5.184 +        xmsi.domid = dom;
   5.185 +        xmsi.pfn = guest_shared_info_mfn;
   5.186 +        rc = xc_memory_op(xc_handle, XENMEM_map_shared_info, &xmsi);
   5.187 +        if ( rc != 0 )
   5.188 +        {
   5.189 +            PERROR("Cannot map shared info pfn");
   5.190 +            goto error_out;
   5.191 +        }
   5.192      }
   5.193      else
   5.194      {
     6.1 --- a/xen/arch/x86/mm.c	Thu Mar 09 16:03:23 2006 +0100
     6.2 +++ b/xen/arch/x86/mm.c	Thu Mar 09 16:24:57 2006 +0000
     6.3 @@ -2817,14 +2817,15 @@ long do_update_descriptor(u64 pa, u64 de
     6.4  
     6.5  long arch_memory_op(int op, GUEST_HANDLE(void) arg)
     6.6  {
     6.7 -    struct xen_reserved_phys_area xrpa;
     6.8      unsigned long pfn;
     6.9      struct domain *d;
    6.10      unsigned int i;
    6.11  
    6.12      switch ( op )
    6.13      {
    6.14 -    case XENMEM_reserved_phys_area:
    6.15 +    case XENMEM_reserved_phys_area: {
    6.16 +        struct xen_reserved_phys_area xrpa;
    6.17 +
    6.18          if ( copy_from_guest(&xrpa, arg, 1) )
    6.19              return -EFAULT;
    6.20  
    6.21 @@ -2846,16 +2847,14 @@ long arch_memory_op(int op, GUEST_HANDLE
    6.22          if ( d->arch.first_reserved_pfn == 0 )
    6.23          {
    6.24              d->arch.first_reserved_pfn = pfn = d->max_pages;
    6.25 -            guest_physmap_add_page(
    6.26 -                d, pfn + 0, virt_to_maddr(d->shared_info) >> PAGE_SHIFT);
    6.27              for ( i = 0; i < NR_GRANT_FRAMES; i++ )
    6.28                  guest_physmap_add_page(
    6.29 -                    d, pfn + 1 + i, gnttab_shared_mfn(d, d->grant_table, i));
    6.30 +                    d, pfn + i, gnttab_shared_mfn(d, d->grant_table, i));
    6.31          }
    6.32          UNLOCK_BIGLOCK(d);
    6.33  
    6.34          xrpa.first_gpfn = d->arch.first_reserved_pfn;
    6.35 -        xrpa.nr_gpfns   = 32;
    6.36 +        xrpa.nr_gpfns   = NR_GRANT_FRAMES;
    6.37  
    6.38          put_domain(d);
    6.39  
    6.40 @@ -2863,6 +2862,42 @@ long arch_memory_op(int op, GUEST_HANDLE
    6.41              return -EFAULT;
    6.42  
    6.43          break;
    6.44 +    }
    6.45 +
    6.46 +    case XENMEM_map_shared_info: {
    6.47 +        struct xen_map_shared_info xmsi;
    6.48 +
    6.49 +        if ( copy_from_guest(&xmsi, arg, 1) )
    6.50 +            return -EFAULT;
    6.51 +
    6.52 +        if ( (d = find_domain_by_id(xmsi.domid)) == NULL )
    6.53 +            return -ESRCH;
    6.54 +
    6.55 +        /* Only initialised translated guests can set the shared_info
    6.56 +         * mapping. */
    6.57 +        if ( !shadow_mode_translate(d) || (d->max_pages == 0) )
    6.58 +        {
    6.59 +            put_domain(d);
    6.60 +            return -ESRCH;
    6.61 +        }
    6.62 +
    6.63 +        if ( xmsi.pfn > d->max_pages ) {
    6.64 +            put_domain(d);
    6.65 +            return -EINVAL;
    6.66 +        }
    6.67 +
    6.68 +        LOCK_BIGLOCK(d);
    6.69 +        /* Remove previously mapped page if it was present. */
    6.70 +        if ( mfn_valid(gmfn_to_mfn(d, xmsi.pfn)) )
    6.71 +            guest_remove_page(d, xmsi.pfn);
    6.72 +        guest_physmap_add_page(d, xmsi.pfn,
    6.73 +                               virt_to_maddr(d->shared_info) >> PAGE_SHIFT);
    6.74 +        UNLOCK_BIGLOCK(d);
    6.75 +
    6.76 +        put_domain(d);
    6.77 +
    6.78 +        break;
    6.79 +    }
    6.80  
    6.81      default:
    6.82          return subarch_memory_op(op, arg);
     7.1 --- a/xen/common/memory.c	Thu Mar 09 16:03:23 2006 +0100
     7.2 +++ b/xen/common/memory.c	Thu Mar 09 16:24:57 2006 +0000
     7.3 @@ -137,7 +137,43 @@ populate_physmap(
     7.4   out:
     7.5      return i;
     7.6  }
     7.7 -    
     7.8 +
     7.9 +int
    7.10 +guest_remove_page(
    7.11 +    struct domain *d,
    7.12 +    unsigned long gmfn)
    7.13 +{
    7.14 +    struct page_info *page;
    7.15 +    unsigned long mfn;
    7.16 +
    7.17 +    mfn = gmfn_to_mfn(d, gmfn);
    7.18 +    if ( unlikely(!mfn_valid(mfn)) )
    7.19 +    {
    7.20 +        DPRINTK("Domain %u page number %lx invalid\n",
    7.21 +                d->domain_id, mfn);
    7.22 +        return 0;
    7.23 +    }
    7.24 +            
    7.25 +    page = mfn_to_page(mfn);
    7.26 +    if ( unlikely(!get_page(page, d)) )
    7.27 +    {
    7.28 +        DPRINTK("Bad page free for domain %u\n", d->domain_id);
    7.29 +        return 0;
    7.30 +    }
    7.31 +
    7.32 +    if ( test_and_clear_bit(_PGT_pinned, &page->u.inuse.type_info) )
    7.33 +        put_page_and_type(page);
    7.34 +            
    7.35 +    if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
    7.36 +        put_page(page);
    7.37 +
    7.38 +    guest_physmap_remove_page(d, gmfn, mfn);
    7.39 +
    7.40 +    put_page(page);
    7.41 +
    7.42 +    return 1;
    7.43 +}
    7.44 +
    7.45  static long
    7.46  decrease_reservation(
    7.47      struct domain *d,
    7.48 @@ -147,8 +183,7 @@ decrease_reservation(
    7.49      unsigned int   flags,
    7.50      int           *preempted)
    7.51  {
    7.52 -    struct page_info *page;
    7.53 -    unsigned long    i, j, gmfn, mfn;
    7.54 +    unsigned long    i, j, gmfn;
    7.55  
    7.56      if ( !guest_handle_okay(extent_list, nr_extents) )
    7.57          return 0;
    7.58 @@ -166,30 +201,8 @@ decrease_reservation(
    7.59  
    7.60          for ( j = 0; j < (1 << extent_order); j++ )
    7.61          {
    7.62 -            mfn = gmfn_to_mfn(d, gmfn + j);
    7.63 -            if ( unlikely(!mfn_valid(mfn)) )
    7.64 -            {
    7.65 -                DPRINTK("Domain %u page number %lx invalid\n",
    7.66 -                        d->domain_id, mfn);
    7.67 +            if ( !guest_remove_page(d, gmfn + j) )
    7.68                  return i;
    7.69 -            }
    7.70 -            
    7.71 -            page = mfn_to_page(mfn);
    7.72 -            if ( unlikely(!get_page(page, d)) )
    7.73 -            {
    7.74 -                DPRINTK("Bad page free for domain %u\n", d->domain_id);
    7.75 -                return i;
    7.76 -            }
    7.77 -
    7.78 -            if ( test_and_clear_bit(_PGT_pinned, &page->u.inuse.type_info) )
    7.79 -                put_page_and_type(page);
    7.80 -            
    7.81 -            if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
    7.82 -                put_page(page);
    7.83 -
    7.84 -            guest_physmap_remove_page(d, gmfn + j, mfn);
    7.85 -
    7.86 -            put_page(page);
    7.87          }
    7.88      }
    7.89  
     8.1 --- a/xen/include/public/memory.h	Thu Mar 09 16:03:23 2006 +0100
     8.2 +++ b/xen/include/public/memory.h	Thu Mar 09 16:24:57 2006 +0000
     8.3 @@ -140,6 +140,21 @@ typedef struct xen_translate_gpfn_list {
     8.4  } xen_translate_gpfn_list_t;
     8.5  DEFINE_GUEST_HANDLE(xen_translate_gpfn_list_t);
     8.6  
     8.7 +/*
     8.8 + * Sets the GPFN at which the shared_info_page appears in the specified
     8.9 + * guest's pseudophysical address space.
    8.10 + * arg == addr of xen_map_shared_info_t.
    8.11 + */
    8.12 +#define XENMEM_map_shared_info      9
    8.13 +typedef struct xen_map_shared_info {
    8.14 +    /* Which domain to change the mapping for. */
    8.15 +    domid_t domid;
    8.16 +
    8.17 +    /* GPFN where the shared_info_page should appear. */
    8.18 +    unsigned long pfn;
    8.19 +} xen_map_shared_info_t;
    8.20 +DEFINE_GUEST_HANDLE(xen_map_shared_info_t);
    8.21 +
    8.22  #endif /* __XEN_PUBLIC_MEMORY_H__ */
    8.23  
    8.24  /*
     9.1 --- a/xen/include/xen/mm.h	Thu Mar 09 16:03:23 2006 +0100
     9.2 +++ b/xen/include/xen/mm.h	Thu Mar 09 16:24:57 2006 +0000
     9.3 @@ -82,4 +82,6 @@ extern struct list_head page_scrub_list;
     9.4  #define sync_pagetable_state(d) ((void)0)
     9.5  #endif
     9.6  
     9.7 +int guest_remove_page(struct domain *d, unsigned long gmfn);
     9.8 +
     9.9  #endif /* __XEN_MM_H__ */