WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86, hvm: Add a perf counter for CR0.WP=0

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86, hvm: Add a perf counter for CR0.WP=0 emulation.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Jan 2008 15:10:18 -0800
Delivery-date: Tue, 08 Jan 2008 15:11:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1199786279 0
# Node ID 25771a7c290703a232625892b147651f011703df
# Parent  40f9dda7c5f50795395a68d50b68f65b562732c7
x86, hvm: Add a perf counter for CR0.WP=0 emulation.
Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/arch/x86/mm/shadow/multi.c   |    3 +++
 xen/include/asm-x86/perfc_defn.h |    1 +
 2 files changed, 4 insertions(+)

diff -r 40f9dda7c5f5 -r 25771a7c2907 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Tue Jan 08 09:54:06 2008 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c    Tue Jan 08 09:57:59 2008 +0000
@@ -2899,7 +2899,10 @@ static int sh_page_fault(struct vcpu *v,
     if ( is_hvm_domain(d) 
          && unlikely(!hvm_wp_enabled(v)) 
          && regs->error_code == (PFEC_write_access|PFEC_page_present) )
+    {
+        perfc_incr(shadow_fault_emulate_wp);
         goto emulate;
+    }
 
     perfc_incr(shadow_fault_fixed);
     d->arch.paging.log_dirty.fault_count++;
diff -r 40f9dda7c5f5 -r 25771a7c2907 xen/include/asm-x86/perfc_defn.h
--- a/xen/include/asm-x86/perfc_defn.h  Tue Jan 08 09:54:06 2008 +0000
+++ b/xen/include/asm-x86/perfc_defn.h  Tue Jan 08 09:57:59 2008 +0000
@@ -56,6 +56,7 @@ PERFCOUNTER(shadow_fault_emulate_write, 
 PERFCOUNTER(shadow_fault_emulate_write, "shadow_fault emulates a write")
 PERFCOUNTER(shadow_fault_emulate_failed, "shadow_fault emulator fails")
 PERFCOUNTER(shadow_fault_emulate_stack, "shadow_fault emulate stack write")
+PERFCOUNTER(shadow_fault_emulate_wp, "shadow_fault emulate for CR0.WP=0")
 PERFCOUNTER(shadow_fault_mmio,     "shadow_fault handled as mmio")
 PERFCOUNTER(shadow_fault_fixed,    "shadow_fault fixed fault")
 PERFCOUNTER(shadow_ptwr_emulate,   "shadow causes ptwr to emulate")

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86, hvm: Add a perf counter for CR0.WP=0 emulation., Xen patchbot-unstable <=