ia64/xen-unstable

changeset 2466:db0119e98043

bitkeeper revision 1.1159.1.144 (413fafcd5CFNlwHKLUYzorp_LsbEKA)

Fix writable-pagetable initialisation.
author kaf24@freefall.cl.cam.ac.uk
date Thu Sep 09 01:20:13 2004 +0000 (2004-09-09)
parents ed44deec5fb6
children 8d1bc9a571e0 456c595d4b07
files xen/arch/x86/memory.c
line diff
     1.1 --- a/xen/arch/x86/memory.c	Thu Sep 09 00:59:30 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Thu Sep 09 01:20:13 2004 +0000
     1.3 @@ -144,7 +144,6 @@ static struct domain *dom_xen, *dom_io;
     1.4  void arch_init_memory(void)
     1.5  {
     1.6      unsigned long mfn;
     1.7 -    int i;
     1.8  
     1.9      /*
    1.10       * We are rather picky about the layout of 'struct pfn_info'. The
    1.11 @@ -198,15 +197,6 @@ void arch_init_memory(void)
    1.12          frame_table[mfn].u.inuse.type_info  = PGT_gdt_page | 1; /* non-RW */
    1.13          frame_table[mfn].u.inuse.domain     = dom_xen;
    1.14      }
    1.15 -
    1.16 -    vm_assist_info[VMASST_TYPE_writable_pagetables].enable = NULL;
    1.17 -    vm_assist_info[VMASST_TYPE_writable_pagetables].disable = NULL;
    1.18 -
    1.19 -    for ( i = 0; i < smp_num_cpus; i++ )
    1.20 -    {
    1.21 -        ptwr_info[i].disconnected_page = (void *)alloc_xenheap_page();
    1.22 -        ptwr_info[i].writable_page = (void *)alloc_xenheap_page();
    1.23 -    }
    1.24  }
    1.25  
    1.26  static void __invalidate_shadow_ldt(struct domain *d)
    1.27 @@ -1876,6 +1866,20 @@ int ptwr_do_page_fault(unsigned long add
    1.28      return 0;
    1.29  }
    1.30  
    1.31 +static __init int ptwr_init(void)
    1.32 +{
    1.33 +    int i;
    1.34 +
    1.35 +    for ( i = 0; i < smp_num_cpus; i++ )
    1.36 +    {
    1.37 +        ptwr_info[i].disconnected_page = (void *)alloc_xenheap_page();
    1.38 +        ptwr_info[i].writable_page = (void *)alloc_xenheap_page();
    1.39 +    }
    1.40 +
    1.41 +    return 0;
    1.42 +}
    1.43 +__initcall(ptwr_init);
    1.44 +
    1.45  #ifndef NDEBUG
    1.46  void ptwr_status(void)
    1.47  {