ia64/xen-unstable

changeset 16687:25771a7c2907

x86, hvm: Add a perf counter for CR0.WP=0 emulation.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 08 09:57:59 2008 +0000 (2008-01-08)
parents 40f9dda7c5f5
children 4fcc8b64c2b5
files xen/arch/x86/mm/shadow/multi.c xen/include/asm-x86/perfc_defn.h
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Tue Jan 08 09:54:06 2008 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Tue Jan 08 09:57:59 2008 +0000
     1.3 @@ -2899,7 +2899,10 @@ static int sh_page_fault(struct vcpu *v,
     1.4      if ( is_hvm_domain(d) 
     1.5           && unlikely(!hvm_wp_enabled(v)) 
     1.6           && regs->error_code == (PFEC_write_access|PFEC_page_present) )
     1.7 +    {
     1.8 +        perfc_incr(shadow_fault_emulate_wp);
     1.9          goto emulate;
    1.10 +    }
    1.11  
    1.12      perfc_incr(shadow_fault_fixed);
    1.13      d->arch.paging.log_dirty.fault_count++;
     2.1 --- a/xen/include/asm-x86/perfc_defn.h	Tue Jan 08 09:54:06 2008 +0000
     2.2 +++ b/xen/include/asm-x86/perfc_defn.h	Tue Jan 08 09:57:59 2008 +0000
     2.3 @@ -56,6 +56,7 @@ PERFCOUNTER(shadow_fault_emulate_read, "
     2.4  PERFCOUNTER(shadow_fault_emulate_write, "shadow_fault emulates a write")
     2.5  PERFCOUNTER(shadow_fault_emulate_failed, "shadow_fault emulator fails")
     2.6  PERFCOUNTER(shadow_fault_emulate_stack, "shadow_fault emulate stack write")
     2.7 +PERFCOUNTER(shadow_fault_emulate_wp, "shadow_fault emulate for CR0.WP=0")
     2.8  PERFCOUNTER(shadow_fault_mmio,     "shadow_fault handled as mmio")
     2.9  PERFCOUNTER(shadow_fault_fixed,    "shadow_fault fixed fault")
    2.10  PERFCOUNTER(shadow_ptwr_emulate,   "shadow causes ptwr to emulate")