diff options
author | Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> | 2013-04-08 17:55:49 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-04-08 17:55:49 +0200 |
commit | 7ad0f74356cb45d5904cc3726fb552cecc9fe16f (patch) | |
tree | 5aed132d4db9578d3157b6383e677392e994a3bf /xen/include/asm-x86/hvm | |
parent | 5753fe1c92efb3cc0142dadf8c82d5fb9ea80418 (diff) | |
download | xen-7ad0f74356cb45d5904cc3726fb552cecc9fe16f.tar.gz xen-7ad0f74356cb45d5904cc3726fb552cecc9fe16f.tar.bz2 xen-7ad0f74356cb45d5904cc3726fb552cecc9fe16f.zip |
vpmu intel: Better names and replacing numerals with defines
This patch renames core2_counters to core2_fix_counters for better
understanding the code and subtitutes 2 numerals with defines in fixed counter
handling.
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Jun Nakajima <jun.nakajima@intel.com>
Diffstat (limited to 'xen/include/asm-x86/hvm')
-rw-r--r-- | xen/include/asm-x86/hvm/vmx/vpmu_core2.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/xen/include/asm-x86/hvm/vmx/vpmu_core2.h b/xen/include/asm-x86/hvm/vmx/vpmu_core2.h index 2a9f346a15..4128f2ac24 100644 --- a/xen/include/asm-x86/hvm/vmx/vpmu_core2.h +++ b/xen/include/asm-x86/hvm/vmx/vpmu_core2.h @@ -23,6 +23,11 @@ #ifndef __ASM_X86_HVM_VPMU_CORE_H_ #define __ASM_X86_HVM_VPMU_CORE_H_ +/* Currently only 3 fixed counters are supported. */ +#define VPMU_CORE2_NUM_FIXED 3 +/* Currently only 3 Non-architectual Performance Control MSRs */ +#define VPMU_CORE2_NUM_CTRLS 3 + struct arch_msr_pair { u64 counter; u64 control; @@ -30,14 +35,14 @@ struct arch_msr_pair { struct core2_pmu_enable { char ds_area_enable; - char fixed_ctr_enable[3]; + char fixed_ctr_enable[VPMU_CORE2_NUM_FIXED]; char arch_pmc_enable[1]; }; struct core2_vpmu_context { struct core2_pmu_enable *pmu_enable; - u64 counters[3]; - u64 ctrls[3]; + u64 fix_counters[VPMU_CORE2_NUM_FIXED]; + u64 ctrls[VPMU_CORE2_NUM_CTRLS]; u64 global_ovf_status; u32 hw_lapic_lvtpc; struct arch_msr_pair arch_msr_pair[1]; |