debuggers.hg

changeset 16979:087caea46be7

vmx: Clean up after Core2 perf-monitoring patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 30 11:17:14 2008 +0000 (2008-01-30)
parents 6ea3db7ae24d
children 87ab3222640c
files xen/arch/x86/hvm/vmx/vpmu.c xen/include/asm-x86/hvm/vmx/vpmu.h
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vpmu.c	Wed Jan 30 09:59:27 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vpmu.c	Wed Jan 30 11:17:14 2008 +0000
     1.3 @@ -31,7 +31,7 @@
     1.4  #include <public/hvm/save.h>
     1.5  #include <asm/hvm/vmx/vpmu.h>
     1.6  
     1.7 -int inline vpmu_do_wrmsr(struct cpu_user_regs *regs)
     1.8 +int vpmu_do_wrmsr(struct cpu_user_regs *regs)
     1.9  {
    1.10      struct vpmu_struct *vpmu = vcpu_vpmu(current);
    1.11  
    1.12 @@ -40,7 +40,7 @@ int inline vpmu_do_wrmsr(struct cpu_user
    1.13      return 0;
    1.14  }
    1.15  
    1.16 -int inline vpmu_do_rdmsr(struct cpu_user_regs *regs)
    1.17 +int vpmu_do_rdmsr(struct cpu_user_regs *regs)
    1.18  {
    1.19      struct vpmu_struct *vpmu = vcpu_vpmu(current);
    1.20  
    1.21 @@ -49,7 +49,7 @@ int inline vpmu_do_rdmsr(struct cpu_user
    1.22      return 0;
    1.23  }
    1.24  
    1.25 -int inline vpmu_do_interrupt(struct cpu_user_regs *regs)
    1.26 +int vpmu_do_interrupt(struct cpu_user_regs *regs)
    1.27  {
    1.28      struct vpmu_struct *vpmu = vcpu_vpmu(current);
    1.29  
    1.30 @@ -75,13 +75,10 @@ void vpmu_load(struct vcpu *v)
    1.31  }
    1.32  
    1.33  extern struct arch_vpmu_ops core2_vpmu_ops;
    1.34 -void inline vpmu_initialise(struct vcpu *v)
    1.35 +void vpmu_initialise(struct vcpu *v)
    1.36  {
    1.37      struct vpmu_struct *vpmu = vcpu_vpmu(v);
    1.38  
    1.39 -    /* If it is not a fresh initialization, release all resources
    1.40 -     * before initialise again.
    1.41 -     */
    1.42      if ( vpmu->flags & VPMU_CONTEXT_ALLOCATED )
    1.43          vpmu_destroy(v);
    1.44  
    1.45 @@ -98,18 +95,15 @@ void inline vpmu_initialise(struct vcpu 
    1.46          }
    1.47      }
    1.48  
    1.49 -    if ( !vpmu->arch_vpmu_ops )
    1.50 +    if ( vpmu->arch_vpmu_ops != NULL )
    1.51      {
    1.52 -        dprintk(XENLOG_WARNING, "Unsupport CPU model for guest PMU usage.\n");
    1.53 -        return;
    1.54 +        vpmu->flags = 0;
    1.55 +        vpmu->context = NULL;
    1.56 +        vpmu->arch_vpmu_ops->arch_vpmu_initialise(v);
    1.57      }
    1.58 -
    1.59 -    vpmu->flags = 0;
    1.60 -    vpmu->context = NULL;
    1.61 -    vpmu->arch_vpmu_ops->arch_vpmu_initialise(v);
    1.62  }
    1.63  
    1.64 -void inline vpmu_destroy(struct vcpu *v)
    1.65 +void vpmu_destroy(struct vcpu *v)
    1.66  {
    1.67      struct vpmu_struct *vpmu = vcpu_vpmu(v);
    1.68  
     2.1 --- a/xen/include/asm-x86/hvm/vmx/vpmu.h	Wed Jan 30 09:59:27 2008 +0000
     2.2 +++ b/xen/include/asm-x86/hvm/vmx/vpmu.h	Wed Jan 30 11:17:14 2008 +0000
     2.3 @@ -68,13 +68,13 @@ struct vpmu_struct {
     2.4  #define VPMU_CONTEXT_LOADED                 0x2
     2.5  #define VPMU_RUNNING                        0x4
     2.6  
     2.7 -int inline vpmu_do_wrmsr(struct cpu_user_regs *regs);
     2.8 -int inline vpmu_do_rdmsr(struct cpu_user_regs *regs);
     2.9 -int inline vpmu_do_interrupt(struct cpu_user_regs *regs);
    2.10 -void inline vpmu_initialise(struct vcpu *v);
    2.11 -void inline vpmu_destroy(struct vcpu *v);
    2.12 -void inline vpmu_save(struct vcpu *v);
    2.13 -void inline vpmu_load(struct vcpu *v);
    2.14 +int vpmu_do_wrmsr(struct cpu_user_regs *regs);
    2.15 +int vpmu_do_rdmsr(struct cpu_user_regs *regs);
    2.16 +int vpmu_do_interrupt(struct cpu_user_regs *regs);
    2.17 +void vpmu_initialise(struct vcpu *v);
    2.18 +void vpmu_destroy(struct vcpu *v);
    2.19 +void vpmu_save(struct vcpu *v);
    2.20 +void vpmu_load(struct vcpu *v);
    2.21  
    2.22  extern int acquire_pmu_ownership(int pmu_ownership);
    2.23  extern void release_pmu_ownership(int pmu_ownership);