[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vmx: Clean up after Core2 perf-monitoring patch.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201691834 0
# Node ID 087caea46be763cab3b28ed1b614cd29cf15fce2
# Parent  6ea3db7ae24df1afd8e13e13c8c55ada95dd8d13
vmx: Clean up after Core2 perf-monitoring patch.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vpmu.c        |   24 +++++++++---------------
 xen/include/asm-x86/hvm/vmx/vpmu.h |   14 +++++++-------
 2 files changed, 16 insertions(+), 22 deletions(-)

diff -r 6ea3db7ae24d -r 087caea46be7 xen/arch/x86/hvm/vmx/vpmu.c
--- a/xen/arch/x86/hvm/vmx/vpmu.c       Wed Jan 30 09:59:27 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/vpmu.c       Wed Jan 30 11:17:14 2008 +0000
@@ -31,7 +31,7 @@
 #include <public/hvm/save.h>
 #include <asm/hvm/vmx/vpmu.h>
 
-int inline vpmu_do_wrmsr(struct cpu_user_regs *regs)
+int vpmu_do_wrmsr(struct cpu_user_regs *regs)
 {
     struct vpmu_struct *vpmu = vcpu_vpmu(current);
 
@@ -40,7 +40,7 @@ int inline vpmu_do_wrmsr(struct cpu_user
     return 0;
 }
 
-int inline vpmu_do_rdmsr(struct cpu_user_regs *regs)
+int vpmu_do_rdmsr(struct cpu_user_regs *regs)
 {
     struct vpmu_struct *vpmu = vcpu_vpmu(current);
 
@@ -49,7 +49,7 @@ int inline vpmu_do_rdmsr(struct cpu_user
     return 0;
 }
 
-int inline vpmu_do_interrupt(struct cpu_user_regs *regs)
+int vpmu_do_interrupt(struct cpu_user_regs *regs)
 {
     struct vpmu_struct *vpmu = vcpu_vpmu(current);
 
@@ -75,13 +75,10 @@ void vpmu_load(struct vcpu *v)
 }
 
 extern struct arch_vpmu_ops core2_vpmu_ops;
-void inline vpmu_initialise(struct vcpu *v)
+void vpmu_initialise(struct vcpu *v)
 {
     struct vpmu_struct *vpmu = vcpu_vpmu(v);
 
-    /* If it is not a fresh initialization, release all resources
-     * before initialise again.
-     */
     if ( vpmu->flags & VPMU_CONTEXT_ALLOCATED )
         vpmu_destroy(v);
 
@@ -98,18 +95,15 @@ void inline vpmu_initialise(struct vcpu 
         }
     }
 
-    if ( !vpmu->arch_vpmu_ops )
+    if ( vpmu->arch_vpmu_ops != NULL )
     {
-        dprintk(XENLOG_WARNING, "Unsupport CPU model for guest PMU usage.\n");
-        return;
+        vpmu->flags = 0;
+        vpmu->context = NULL;
+        vpmu->arch_vpmu_ops->arch_vpmu_initialise(v);
     }
-
-    vpmu->flags = 0;
-    vpmu->context = NULL;
-    vpmu->arch_vpmu_ops->arch_vpmu_initialise(v);
 }
 
-void inline vpmu_destroy(struct vcpu *v)
+void vpmu_destroy(struct vcpu *v)
 {
     struct vpmu_struct *vpmu = vcpu_vpmu(v);
 
diff -r 6ea3db7ae24d -r 087caea46be7 xen/include/asm-x86/hvm/vmx/vpmu.h
--- a/xen/include/asm-x86/hvm/vmx/vpmu.h        Wed Jan 30 09:59:27 2008 +0000
+++ b/xen/include/asm-x86/hvm/vmx/vpmu.h        Wed Jan 30 11:17:14 2008 +0000
@@ -68,13 +68,13 @@ struct vpmu_struct {
 #define VPMU_CONTEXT_LOADED                 0x2
 #define VPMU_RUNNING                        0x4
 
-int inline vpmu_do_wrmsr(struct cpu_user_regs *regs);
-int inline vpmu_do_rdmsr(struct cpu_user_regs *regs);
-int inline vpmu_do_interrupt(struct cpu_user_regs *regs);
-void inline vpmu_initialise(struct vcpu *v);
-void inline vpmu_destroy(struct vcpu *v);
-void inline vpmu_save(struct vcpu *v);
-void inline vpmu_load(struct vcpu *v);
+int vpmu_do_wrmsr(struct cpu_user_regs *regs);
+int vpmu_do_rdmsr(struct cpu_user_regs *regs);
+int vpmu_do_interrupt(struct cpu_user_regs *regs);
+void vpmu_initialise(struct vcpu *v);
+void vpmu_destroy(struct vcpu *v);
+void vpmu_save(struct vcpu *v);
+void vpmu_load(struct vcpu *v);
 
 extern int acquire_pmu_ownership(int pmu_ownership);
 extern void release_pmu_ownership(int pmu_ownership);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.