[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] VMX/vPMU: reduce core2_vpmu_initialise() verbosity
commit 451a1eacc5690375b8f22c949a497b7a34e86c27 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Aug 22 14:32:07 2014 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Aug 22 14:32:07 2014 +0200 VMX/vPMU: reduce core2_vpmu_initialise() verbosity No need to print these messages for each vCPU, even more, no need to print them for each domain - they all depend on CPU features that are either there or not. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vpmu_core2.c | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vpmu_core2.c b/xen/arch/x86/hvm/vmx/vpmu_core2.c index e4b9d7b..56f5059 100644 --- a/xen/arch/x86/hvm/vmx/vpmu_core2.c +++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c @@ -764,19 +764,19 @@ static int core2_vpmu_initialise(struct vcpu *v, unsigned int vpmu_flags) { struct vpmu_struct *vpmu = vcpu_vpmu(v); u64 msr_content; - struct cpuinfo_x86 *c = ¤t_cpu_data; + static bool_t ds_warned; if ( !(vpmu_flags & VPMU_BOOT_BTS) ) goto func_out; /* Check the 'Debug Store' feature in the CPUID.EAX[1]:EDX[21] */ - if ( cpu_has(c, X86_FEATURE_DS) ) + while ( boot_cpu_has(X86_FEATURE_DS) ) { - if ( !cpu_has(c, X86_FEATURE_DTES64) ) + if ( !boot_cpu_has(X86_FEATURE_DTES64) ) { - printk(XENLOG_G_WARNING "CPU doesn't support 64-bit DS Area" - " - Debug Store disabled for %pv\n", - v); - goto func_out; + if ( !ds_warned ) + printk(XENLOG_G_WARNING "CPU doesn't support 64-bit DS Area" + " - Debug Store disabled for guests\n"); + break; } vpmu_set(vpmu, VPMU_CPU_HAS_DS); rdmsrl(MSR_IA32_MISC_ENABLE, msr_content); @@ -784,14 +784,16 @@ static int core2_vpmu_initialise(struct vcpu *v, unsigned int vpmu_flags) { /* If BTS_UNAVAIL is set reset the DS feature. */ vpmu_reset(vpmu, VPMU_CPU_HAS_DS); - printk(XENLOG_G_WARNING "CPU has set BTS_UNAVAIL" - " - Debug Store disabled for %pv\n", - v); + if ( !ds_warned ) + printk(XENLOG_G_WARNING "CPU has set BTS_UNAVAIL" + " - Debug Store disabled for guests\n"); + break; } - else + + vpmu_set(vpmu, VPMU_CPU_HAS_BTS); + if ( !ds_warned ) { - vpmu_set(vpmu, VPMU_CPU_HAS_BTS); - if ( !cpu_has(c, X86_FEATURE_DSCPL) ) + if ( !boot_cpu_has(X86_FEATURE_DSCPL) ) printk(XENLOG_G_INFO "vpmu: CPU doesn't support CPL-Qualified BTS\n"); printk("******************************************************\n"); @@ -803,8 +805,10 @@ static int core2_vpmu_initialise(struct vcpu *v, unsigned int vpmu_flags) printk("** It is NOT recommended for production use! **\n"); printk("******************************************************\n"); } + break; } -func_out: + ds_warned = 1; + func_out: check_pmc_quirk(); return 0; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |