ia64/xen-unstable

changeset 6151:8864f0be80c6

merge
author iap10@freefall.cl.cam.ac.uk
date Sat Aug 13 20:49:29 2005 +0000 (2005-08-13)
parents cbde8271c236 424166f4f3cf
children 1de047fc56f5
files .hgignore linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h tools/libxc/Makefile tools/libxc/xc_core.c tools/libxc/xc_gnttab.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_load_elf.c tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/controller.py tools/xenstore/xenstored_core.c xen/Rules.mk xen/arch/ia64/grant_table.c xen/arch/x86/mm.c xen/arch/x86/setup.c xen/arch/x86/traps.c xen/common/grant_table.c xen/common/perfc.c xen/include/asm-x86/mm.h xen/include/public/grant_table.h xen/include/xen/grant_table.h
line diff
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c	Sat Aug 13 16:01:23 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c	Sat Aug 13 20:49:29 2005 +0000
     2.3 @@ -286,8 +286,8 @@ void xen_contig_memory(unsigned long vst
     2.4          pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
     2.5          pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
     2.6          mfn = pte_mfn(*pte);
     2.7 -        HYPERVISOR_update_va_mapping(
     2.8 -            vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
     2.9 +        BUG_ON(HYPERVISOR_update_va_mapping(
    2.10 +            vstart + (i*PAGE_SIZE), __pte_ma(0), 0));
    2.11          phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
    2.12              INVALID_P2M_ENTRY;
    2.13          BUG_ON(HYPERVISOR_dom_mem_op(
    2.14 @@ -300,9 +300,9 @@ void xen_contig_memory(unsigned long vst
    2.15  
    2.16      /* 3. Map the new extent in place of old pages. */
    2.17      for (i = 0; i < (1<<order); i++) {
    2.18 -        HYPERVISOR_update_va_mapping(
    2.19 +        BUG_ON(HYPERVISOR_update_va_mapping(
    2.20              vstart + (i*PAGE_SIZE),
    2.21 -            __pte_ma(((mfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0);
    2.22 +            __pte_ma(((mfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0));
    2.23          xen_machphys_update(mfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
    2.24          phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn+i;
    2.25      }
    2.26 @@ -345,7 +345,8 @@ unsigned long allocate_empty_lowmem_regi
    2.27  #ifdef CONFIG_X86_64
    2.28          xen_l1_entry_update(pte, __pte(0));
    2.29  #else
    2.30 -        HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
    2.31 +        BUG_ON(HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), 
    2.32 +					    __pte_ma(0), 0));
    2.33  #endif
    2.34          phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
    2.35              INVALID_P2M_ENTRY;
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c	Sat Aug 13 16:01:23 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c	Sat Aug 13 20:49:29 2005 +0000
     3.3 @@ -222,8 +222,8 @@ void pte_free(struct page *pte)
     3.4  	unsigned long va = (unsigned long)__va(page_to_pfn(pte)<<PAGE_SHIFT);
     3.5  
     3.6  	if (!pte_write(*virt_to_ptep(va)))
     3.7 -		HYPERVISOR_update_va_mapping(
     3.8 -			va, pfn_pte(page_to_pfn(pte), PAGE_KERNEL), 0);
     3.9 +		BUG_ON(HYPERVISOR_update_va_mapping(
    3.10 +			va, pfn_pte(page_to_pfn(pte), PAGE_KERNEL), 0));
    3.11  
    3.12  	ClearPageForeign(pte);
    3.13  	set_page_count(pte, 1);
    3.14 @@ -355,10 +355,10 @@ void pgd_free(pgd_t *pgd)
    3.15  
    3.16  	if (!pte_write(*ptep)) {
    3.17  		xen_pgd_unpin(__pa(pgd));
    3.18 -		HYPERVISOR_update_va_mapping(
    3.19 +		BUG_ON(HYPERVISOR_update_va_mapping(
    3.20  			(unsigned long)pgd,
    3.21  			pfn_pte(virt_to_phys(pgd)>>PAGE_SHIFT, PAGE_KERNEL),
    3.22 -			0);
    3.23 +			0));
    3.24  	}
    3.25  
    3.26  	/* in the PAE case user pgd entries are overwritten before usage */
    3.27 @@ -451,9 +451,9 @@ static inline void mm_walk_set_prot(void
    3.28  
    3.29  	if (PageHighMem(page))
    3.30  		return;
    3.31 -	HYPERVISOR_update_va_mapping(
    3.32 +	BUG_ON(HYPERVISOR_update_va_mapping(
    3.33  		(unsigned long)__va(pfn << PAGE_SHIFT),
    3.34 -		pfn_pte(pfn, flags), 0);
    3.35 +		pfn_pte(pfn, flags), 0));
    3.36  }
    3.37  
    3.38  static void mm_walk(struct mm_struct *mm, pgprot_t flags)
    3.39 @@ -492,10 +492,10 @@ void mm_pin(struct mm_struct *mm)
    3.40      spin_lock(&mm->page_table_lock);
    3.41  
    3.42      mm_walk(mm, PAGE_KERNEL_RO);
    3.43 -    HYPERVISOR_update_va_mapping(
    3.44 +    BUG_ON(HYPERVISOR_update_va_mapping(
    3.45          (unsigned long)mm->pgd,
    3.46          pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL_RO),
    3.47 -        UVMF_TLB_FLUSH);
    3.48 +        UVMF_TLB_FLUSH));
    3.49      xen_pgd_pin(__pa(mm->pgd));
    3.50      mm->context.pinned = 1;
    3.51      spin_lock(&mm_unpinned_lock);
    3.52 @@ -510,9 +510,9 @@ void mm_unpin(struct mm_struct *mm)
    3.53      spin_lock(&mm->page_table_lock);
    3.54  
    3.55      xen_pgd_unpin(__pa(mm->pgd));
    3.56 -    HYPERVISOR_update_va_mapping(
    3.57 +    BUG_ON(HYPERVISOR_update_va_mapping(
    3.58          (unsigned long)mm->pgd,
    3.59 -        pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL), 0);
    3.60 +        pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL), 0));
    3.61      mm_walk(mm, PAGE_KERNEL);
    3.62      xen_tlb_flush();
    3.63      mm->context.pinned = 0;
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Sat Aug 13 16:01:23 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Sat Aug 13 20:49:29 2005 +0000
     4.3 @@ -211,11 +211,11 @@ static void balloon_process(void *unused
     4.4              /* Link back into the page tables if it's not a highmem page. */
     4.5              if ( pfn < max_low_pfn )
     4.6              {
     4.7 -                HYPERVISOR_update_va_mapping(
     4.8 +                BUG_ON(HYPERVISOR_update_va_mapping(
     4.9                      (unsigned long)__va(pfn << PAGE_SHIFT),
    4.10                      __pte_ma((mfn_list[i] << PAGE_SHIFT) |
    4.11                               pgprot_val(PAGE_KERNEL)),
    4.12 -                    0);
    4.13 +                    0));
    4.14              }
    4.15  
    4.16              /* Finally, relinquish the memory back to the system allocator. */
    4.17 @@ -249,8 +249,8 @@ static void balloon_process(void *unused
    4.18              {
    4.19                  v = phys_to_virt(pfn << PAGE_SHIFT);
    4.20                  scrub_pages(v, 1);
    4.21 -                HYPERVISOR_update_va_mapping(
    4.22 -                    (unsigned long)v, __pte_ma(0), 0);
    4.23 +                BUG_ON(HYPERVISOR_update_va_mapping(
    4.24 +                    (unsigned long)v, __pte_ma(0), 0));
    4.25              }
    4.26  #ifdef CONFIG_XEN_SCRUB_PAGES
    4.27              else
     8.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h	Sat Aug 13 16:01:23 2005 +0000
     8.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h	Sat Aug 13 20:49:29 2005 +0000
     8.3 @@ -386,13 +386,6 @@ HYPERVISOR_update_va_mapping(
     8.4  	  "4" (flags)
     8.5  	: "memory" );
     8.6  
     8.7 -    if ( unlikely(ret < 0) )
     8.8 -    {
     8.9 -        printk(KERN_ALERT "Failed update VA mapping: %08lx, %08lx, %08lx\n",
    8.10 -               va, (new_val).pte_low, flags);
    8.11 -        BUG();
    8.12 -    }
    8.13 -
    8.14      return ret;
    8.15  }
    8.16  
     9.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h	Sat Aug 13 16:01:23 2005 +0000
     9.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h	Sat Aug 13 20:49:29 2005 +0000
     9.3 @@ -497,7 +497,7 @@ extern inline pte_t pte_modify(pte_t pte
     9.4  	do {								  \
     9.5  		if (__dirty) {						  \
     9.6  		        if ( likely((__vma)->vm_mm == current->mm) ) {    \
     9.7 -			    HYPERVISOR_update_va_mapping((__address), (__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned long)((__vma)->vm_mm->cpu_vm_mask.bits)); \
     9.8 +			    BUG_ON(HYPERVISOR_update_va_mapping((__address), (__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned long)((__vma)->vm_mm->cpu_vm_mask.bits))); \
     9.9  			} else {                                          \
    9.10                              xen_l1_entry_update((__ptep), (__entry)); \
    9.11  			    flush_tlb_page((__vma), (__address));         \
    22.1 --- a/xen/Rules.mk	Sat Aug 13 16:01:23 2005 +0000
    22.2 +++ b/xen/Rules.mk	Sat Aug 13 20:49:29 2005 +0000
    22.3 @@ -2,7 +2,7 @@
    22.4  # If you change any of these configuration options then you must
    22.5  # 'make clean' before rebuilding.
    22.6  #
    22.7 -verbose     ?= n
    22.8 +verbose     ?= y
    22.9  debug       ?= n
   22.10  perfc       ?= n
   22.11  perfc_arrays?= n
    24.1 --- a/xen/arch/x86/mm.c	Sat Aug 13 16:01:23 2005 +0000
    24.2 +++ b/xen/arch/x86/mm.c	Sat Aug 13 20:49:29 2005 +0000
    24.3 @@ -2850,6 +2850,129 @@ int ptwr_debug = 0x0;
    24.4  #define PTWR_PRINTK(_f, _a...) ((void)0)
    24.5  #endif
    24.6  
    24.7 +
    24.8 +#ifdef PERF_ARRAYS
    24.9 +
   24.10 +/**************** writeable pagetables profiling functions *****************/
   24.11 +
   24.12 +#define ptwr_eip_buckets        256
   24.13 +
   24.14 +int ptwr_eip_stat_threshold[] = {1, 10, 50, 100, L1_PAGETABLE_ENTRIES};
   24.15 +
   24.16 +#define ptwr_eip_stat_thresholdN (sizeof(ptwr_eip_stat_threshold)/sizeof(int))
   24.17 +
   24.18 +struct {
   24.19 +    unsigned long eip;
   24.20 +    domid_t       id;
   24.21 +    u32           val[ptwr_eip_stat_thresholdN];
   24.22 +} typedef ptwr_eip_stat_t;
   24.23 +
   24.24 +ptwr_eip_stat_t ptwr_eip_stats[ptwr_eip_buckets];
   24.25 +
   24.26 +static inline unsigned int ptwr_eip_stat_hash( unsigned long eip, domid_t id )
   24.27 +{
   24.28 +    return (((unsigned long) id) ^ eip ^ (eip>>8) ^ (eip>>16) ^ (eip>24)) % 
   24.29 +	ptwr_eip_buckets;
   24.30 +}
   24.31 +
   24.32 +static void ptwr_eip_stat_inc(u32 *n)
   24.33 +{
   24.34 +    (*n)++;
   24.35 +    if(*n == 0)
   24.36 +    {
   24.37 +	(*n)=~0;
   24.38 +	/* rescale all buckets */
   24.39 +	int i;
   24.40 +	for(i=0;i<ptwr_eip_buckets;i++)
   24.41 +	{
   24.42 +	    int j;
   24.43 +	    for(j=0;j<ptwr_eip_stat_thresholdN;j++)
   24.44 +		ptwr_eip_stats[i].val[j] = 
   24.45 +		    (((u64)ptwr_eip_stats[i].val[j])+1)>>1;
   24.46 +	}
   24.47 +    }
   24.48 +}
   24.49 +
   24.50 +static void ptwr_eip_stat_update( unsigned long eip, domid_t id, int modified )
   24.51 +{
   24.52 +    int i, b;
   24.53 +
   24.54 +    i = b = ptwr_eip_stat_hash( eip, id );
   24.55 +
   24.56 +    do
   24.57 +    {
   24.58 +	if (!ptwr_eip_stats[i].eip)
   24.59 +	{ /* doesn't exist */
   24.60 +	    ptwr_eip_stats[i].eip = eip;
   24.61 +	    ptwr_eip_stats[i].id = id;
   24.62 +	    memset(ptwr_eip_stats[i].val,0, sizeof(ptwr_eip_stats[i].val));
   24.63 +	}
   24.64 +
   24.65 +	if (ptwr_eip_stats[i].eip == eip)
   24.66 +	{
   24.67 +	    int j;
   24.68 +	    for(j=0;j<ptwr_eip_stat_thresholdN;j++)
   24.69 +	    {
   24.70 +		if(modified <= ptwr_eip_stat_threshold[j])
   24.71 +		{
   24.72 +		    break;
   24.73 +		}
   24.74 +	    }
   24.75 +	    BUG_ON(j>=ptwr_eip_stat_thresholdN);
   24.76 +	    ptwr_eip_stat_inc(&(ptwr_eip_stats[i].val[j]));    
   24.77 +	    return;
   24.78 +	}
   24.79 +	i = (i+1) % ptwr_eip_buckets;
   24.80 +    }
   24.81 +    while(i!=b);
   24.82 +   
   24.83 +    printk("ptwr_eip_stat: too many EIPs in use!\n");
   24.84 +    
   24.85 +    ptwr_eip_stat_print();
   24.86 +    ptwr_eip_stat_reset();
   24.87 +}
   24.88 +
   24.89 +void ptwr_eip_stat_reset()
   24.90 +{
   24.91 +    memset( ptwr_eip_stats, 0, sizeof(ptwr_eip_stats));
   24.92 +}
   24.93 +
   24.94 +void ptwr_eip_stat_print()
   24.95 +{
   24.96 +    struct domain *e;
   24.97 +    domid_t d;
   24.98 +
   24.99 +    for_each_domain(e)
  24.100 +    {
  24.101 +	int i;
  24.102 +	d = e->domain_id;
  24.103 +
  24.104 +	for(i=0;i<ptwr_eip_buckets;i++)
  24.105 +	{
  24.106 +	    if ( ptwr_eip_stats[i].eip && ptwr_eip_stats[i].id == d )
  24.107 +	    {
  24.108 +		int j;
  24.109 +		printk("D %d  eip %08lx ",
  24.110 +		       ptwr_eip_stats[i].id, ptwr_eip_stats[i].eip );
  24.111 +
  24.112 +		for(j=0;j<ptwr_eip_stat_thresholdN;j++)
  24.113 +		    printk("<=%u %4u \t",
  24.114 +			   ptwr_eip_stat_threshold[j],
  24.115 +			   ptwr_eip_stats[i].val[j] );
  24.116 +		printk("\n");
  24.117 +	    }	
  24.118 +	}
  24.119 +    }
  24.120 +}
  24.121 +
  24.122 +#else /* PERF_ARRAYS */
  24.123 +
  24.124 +#define ptwr_eip_stat_update( eip, id, modified ) ((void)0)
  24.125 +
  24.126 +#endif
  24.127 +
  24.128 +/*******************************************************************/
  24.129 +
  24.130  /* Re-validate a given p.t. page, given its prior snapshot */
  24.131  int revalidate_l1(
  24.132      struct domain *d, l1_pgentry_t *l1page, l1_pgentry_t *snapshot)
  24.133 @@ -2967,6 +3090,7 @@ void ptwr_flush(struct domain *d, const 
  24.134      modified = revalidate_l1(d, pl1e, d->arch.ptwr[which].page);
  24.135      unmap_domain_page(pl1e);
  24.136      perfc_incr_histo(wpt_updates, modified, PT_UPDATES);
  24.137 +    ptwr_eip_stat_update(  d->arch.ptwr[which].eip, d->domain_id, modified);
  24.138      d->arch.ptwr[which].prev_nr_updates  = modified;
  24.139  
  24.140      /*
  24.141 @@ -3122,7 +3246,8 @@ static struct x86_mem_emulator ptwr_mem_
  24.142  };
  24.143  
  24.144  /* Write page fault handler: check if guest is trying to modify a PTE. */
  24.145 -int ptwr_do_page_fault(struct domain *d, unsigned long addr)
  24.146 +int ptwr_do_page_fault(struct domain *d, unsigned long addr, 
  24.147 +		       struct cpu_user_regs *regs)
  24.148  {
  24.149      unsigned long    pfn;
  24.150      struct pfn_info *page;
  24.151 @@ -3158,6 +3283,10 @@ int ptwr_do_page_fault(struct domain *d,
  24.152          return 0;
  24.153      }
  24.154  
  24.155 +#if 0 /* Leave this in as useful for debugging */ 
  24.156 +    goto emulate; 
  24.157 +#endif
  24.158 +
  24.159      /* Get the L2 index at which this L1 p.t. is always mapped. */
  24.160      l2_idx = page->u.inuse.type_info & PGT_va_mask;
  24.161      if ( unlikely(l2_idx >= PGT_va_unknown) )
  24.162 @@ -3227,7 +3356,11 @@ int ptwr_do_page_fault(struct domain *d,
  24.163      d->arch.ptwr[which].l1va   = addr | 1;
  24.164      d->arch.ptwr[which].l2_idx = l2_idx;
  24.165      d->arch.ptwr[which].vcpu   = current;
  24.166 -    
  24.167 +
  24.168 +#ifdef PERF_ARRAYS
  24.169 +    d->arch.ptwr[which].eip    = regs->eip;
  24.170 +#endif
  24.171 +
  24.172      /* For safety, disconnect the L1 p.t. page from current space. */
  24.173      if ( which == PTWR_PT_ACTIVE )
  24.174      {
    26.1 --- a/xen/arch/x86/traps.c	Sat Aug 13 16:01:23 2005 +0000
    26.2 +++ b/xen/arch/x86/traps.c	Sat Aug 13 20:49:29 2005 +0000
    26.3 @@ -438,7 +438,7 @@ asmlinkage int do_page_fault(struct cpu_
    26.4               &&
    26.5               KERNEL_MODE(v, regs) &&
    26.6               ((regs->error_code & 3) == 3) && /* write-protection fault */
    26.7 -             ptwr_do_page_fault(d, addr) )
    26.8 +             ptwr_do_page_fault(d, addr, regs) )
    26.9          {
   26.10              UNLOCK_BIGLOCK(d);
   26.11              return EXCRET_fault_fixed;
    28.1 --- a/xen/common/perfc.c	Sat Aug 13 16:01:23 2005 +0000
    28.2 +++ b/xen/common/perfc.c	Sat Aug 13 20:49:29 2005 +0000
    28.3 @@ -7,6 +7,7 @@
    28.4  #include <xen/spinlock.h>
    28.5  #include <public/dom0_ops.h>
    28.6  #include <asm/uaccess.h>
    28.7 +#include <xen/mm.h>
    28.8  
    28.9  #undef  PERFCOUNTER
   28.10  #undef  PERFCOUNTER_CPU
   28.11 @@ -81,6 +82,10 @@ void perfc_printall(unsigned char key)
   28.12          }
   28.13          printk("\n");
   28.14      }
   28.15 +
   28.16 +#ifdef PERF_ARRAYS
   28.17 +    ptwr_eip_stat_print();
   28.18 +#endif
   28.19  }
   28.20  
   28.21  void perfc_reset(unsigned char key)
   28.22 @@ -118,6 +123,10 @@ void perfc_reset(unsigned char key)
   28.23              break;
   28.24          }
   28.25      }
   28.26 +
   28.27 +#ifdef PERF_ARRAYS
   28.28 +    ptwr_eip_stat_reset();
   28.29 +#endif
   28.30  }
   28.31  
   28.32  static dom0_perfc_desc_t perfc_d[NR_PERFCTRS];
    29.1 --- a/xen/include/asm-x86/mm.h	Sat Aug 13 16:01:23 2005 +0000
    29.2 +++ b/xen/include/asm-x86/mm.h	Sat Aug 13 20:49:29 2005 +0000
    29.3 @@ -316,6 +316,9 @@ struct ptwr_info {
    29.4      unsigned int prev_nr_updates;
    29.5      /* Exec domain which created writable mapping. */
    29.6      struct vcpu *vcpu;
    29.7 +    /* EIP of the address which took the original write fault
    29.8 +       used for stats collection only */
    29.9 +    unsigned long eip;
   29.10  };
   29.11  
   29.12  #define PTWR_PT_ACTIVE 0
   29.13 @@ -327,7 +330,8 @@ struct ptwr_info {
   29.14  int  ptwr_init(struct domain *);
   29.15  void ptwr_destroy(struct domain *);
   29.16  void ptwr_flush(struct domain *, const int);
   29.17 -int  ptwr_do_page_fault(struct domain *, unsigned long);
   29.18 +int  ptwr_do_page_fault(struct domain *, unsigned long, 
   29.19 +			struct cpu_user_regs *);
   29.20  int  revalidate_l1(struct domain *, l1_pgentry_t *, l1_pgentry_t *);
   29.21  
   29.22  void cleanup_writable_pagetable(struct domain *d);
   29.23 @@ -353,6 +357,18 @@ void audit_domains(void);
   29.24  
   29.25  #endif
   29.26  
   29.27 +#ifdef PERF_ARRAYS
   29.28 +
   29.29 +void ptwr_eip_stat_reset();
   29.30 +void ptwr_eip_stat_print();
   29.31 +
   29.32 +#else
   29.33 +
   29.34 +#define ptwr_eip_stat_reset() ((void)0)
   29.35 +#define ptwr_eip_stat_print() ((void)0)
   29.36 +
   29.37 +#endif
   29.38 +
   29.39  int new_guest_cr3(unsigned long pfn);
   29.40  
   29.41  void propagate_page_fault(unsigned long addr, u16 error_code);