ia64/xen-unstable

changeset 4468:602b1e28aba3

bitkeeper revision 1.1270 (4252512ac0wYfwuooQQQtJXNMsj5cQ)

Cleanup after merge

Signed-off-by: michael.fetterman@cl.cam.ac.uk
author mafetter@fleming.research
date Tue Apr 05 08:49:46 2005 +0000 (2005-04-05)
parents 7fc6eac6da3a
children 6bbac0aca316
files xen/arch/x86/mm.c xen/arch/x86/shadow.c xen/include/asm-x86/mm.h
line diff
     1.1 --- a/xen/arch/x86/mm.c	Tue Apr 05 07:53:54 2005 +0000
     1.2 +++ b/xen/arch/x86/mm.c	Tue Apr 05 08:49:46 2005 +0000
     1.3 @@ -2683,7 +2683,7 @@ int ptwr_do_page_fault(struct domain *d,
     1.4      int              which;
     1.5      u32              l2_idx;
     1.6  
     1.7 -    if ( unlikely(shadow_mode_enabled(ed->domain)) )
     1.8 +    if ( unlikely(shadow_mode_enabled(d)) )
     1.9          return 0;
    1.10  
    1.11      /*
     2.1 --- a/xen/arch/x86/shadow.c	Tue Apr 05 07:53:54 2005 +0000
     2.2 +++ b/xen/arch/x86/shadow.c	Tue Apr 05 08:49:46 2005 +0000
     2.3 @@ -583,6 +583,11 @@ void shadow_mode_init(void)
     2.4  {
     2.5  }
     2.6  
     2.7 +int _shadow_mode_enabled(struct domain *d)
     2.8 +{
     2.9 +    return shadow_mode_enabled(d);
    2.10 +}
    2.11 +
    2.12  static void alloc_monitor_pagetable(struct exec_domain *ed)
    2.13  {
    2.14      unsigned long mmfn;
    2.15 @@ -2623,21 +2628,7 @@ static int check_l1_table(
    2.16      // thus potentially out-of-sync) guest page.
    2.17      //
    2.18      if ( VM_ASSIST(d, VMASST_TYPE_writable_pagetables) )
    2.19 -    {
    2.20 -        int cpu = current->processor;
    2.21 -
    2.22 -        for ( i = 0; i < ARRAY_SIZE(ptwr_info->ptinfo); i++)
    2.23 -        {
    2.24 -            if ( ptwr_info[cpu].ptinfo[i].l1va &&
    2.25 -                 ((v2m(ptwr_info[cpu].ptinfo[i].pl1e) >> PAGE_SHIFT) == gmfn) )
    2.26 -            {
    2.27 -                unsigned long old = gmfn;
    2.28 -                gmfn = (v2m(ptwr_info[cpu].ptinfo[i].page) >> PAGE_SHIFT);
    2.29 -                printk("hit1 ptwr_info[%d].ptinfo[%d].l1va, mfn=0x%08x, snapshot=0x%08x\n",
    2.30 -                       cpu, i, old, gmfn);
    2.31 -            }
    2.32 -        }
    2.33 -    }
    2.34 +        BUG();
    2.35  
    2.36      if ( page_out_of_sync(pfn_to_page(gmfn)) )
    2.37      {
     3.1 --- a/xen/include/asm-x86/mm.h	Tue Apr 05 07:53:54 2005 +0000
     3.2 +++ b/xen/include/asm-x86/mm.h	Tue Apr 05 08:49:46 2005 +0000
     3.3 @@ -4,8 +4,8 @@
     3.4  
     3.5  #include <xen/config.h>
     3.6  #include <xen/list.h>
     3.7 -#include <xen/sched.h>
     3.8  #include <asm/io.h>
     3.9 +#include <asm/uaccess.h>
    3.10  
    3.11  /*
    3.12   * Per-page-frame information.
    3.13 @@ -150,6 +150,7 @@ extern void invalidate_shadow_ldt(struct
    3.14  extern int shadow_remove_all_write_access(
    3.15      struct domain *d, unsigned long gpfn, unsigned long gmfn);
    3.16  extern u32 shadow_remove_all_access( struct domain *d, unsigned long gmfn);
    3.17 +extern int _shadow_mode_enabled(struct domain *d);
    3.18  
    3.19  static inline void put_page(struct pfn_info *page)
    3.20  {
    3.21 @@ -181,12 +182,9 @@ static inline int get_page(struct pfn_in
    3.22               unlikely((nx & PGC_count_mask) == 0) || /* Count overflow? */
    3.23               unlikely(d != _domain) )                /* Wrong owner? */
    3.24          {
    3.25 -            if ( !domain->arch.shadow_mode )
    3.26 -                DPRINTK("Error pfn %p: rd=%p(%d), od=%p(%d), caf=%08x, "
    3.27 -                        "taf=%08x\n",
    3.28 -                        page_to_pfn(page), domain, (domain ? domain->id : -1),
    3.29 -                        page_get_owner(page),
    3.30 -                        (page_get_owner(page) ? page_get_owner(page)->id : -1),
    3.31 +            if ( !_shadow_mode_enabled(domain) )
    3.32 +                DPRINTK("Error pfn %p: rd=%p, od=%p, caf=%08x, taf=%08x\n",
    3.33 +                        page_to_pfn(page), domain, unpickle_domptr(d),
    3.34                          x, page->u.inuse.type_info);
    3.35              return 0;
    3.36          }