From: "Jan Beulich" Subject: Re: [PATCH 1/2] x86/VPMU: Support only versions 2 and 3 of architectural performance monitoring Date: Tue, 01 Dec 2015 06:04:50 -0700 Message-ID: <565DA90202000078000BABE0@prv-mh.provo.novell.com> References: <1448908721-1777-1-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448908721-1777-1-git-send-email-boris.ostrovsky@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: andrew.cooper3@citrix.com, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 30.11.15 at 19:38, wrote: > --- > xen/arch/x86/cpu/vpmu_intel.c | 55 +++++++------------------------------------ > 1 file changed, 8 insertions(+), 47 deletions(-) Considering the history of the file, I think the VMX maintainers should be Cc-ed here. I think it was actually an oversight to change maintainership of the files with their movement to xen/arch/x86/cpu/. > --- a/xen/arch/x86/cpu/vpmu_intel.c > +++ b/xen/arch/x86/cpu/vpmu_intel.c > @@ -955,59 +955,20 @@ int vmx_vpmu_initialise(struct vcpu *v) > int __init core2_vpmu_init(void) > { > u64 caps; > + unsigned int version = 0; > > - if ( current_cpu_data.x86 != 6 ) > + if ( current_cpu_data.cpuid_level >= 0xa ) > + version = cpuid_eax(0xa) & 0xff; MASK_EXTR(cpuid_eax(0xa), PMU_VERSION_MASK) > + if ( (version != 2) && (version != 3) ) > { > - printk(XENLOG_WARNING "VPMU: only family 6 is supported\n"); > + printk(XENLOG_WARNING "VPMU: version %d is not supported\n", version); %u And I second Dietmar's request. Jan