From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v3 10/16] x86/VPMU: Initialize PMU for PV guests Date: Mon, 13 Jan 2014 10:25:29 -0500 Message-ID: <52D40569.2020904@oracle.com> References: <1389036295-3877-1-git-send-email-boris.ostrovsky@oracle.com> <1389036295-3877-11-git-send-email-boris.ostrovsky@oracle.com> <52D4008A02000078001131CA@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W2jNy-00008F-IP for xen-devel@lists.xenproject.org; Mon, 13 Jan 2014 15:25:06 +0000 In-Reply-To: <52D4008A02000078001131CA@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, dietmar.hahn@ts.fujitsu.com, jun.nakajima@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org On 01/13/2014 09:04 AM, Jan Beulich wrote: >>>> On 06.01.14 at 20:24, Boris Ostrovsky wrote: >> --- a/xen/arch/x86/hvm/svm/vpmu.c >> +++ b/xen/arch/x86/hvm/svm/vpmu.c >> @@ -373,16 +373,21 @@ static int amd_vpmu_initialise(struct vcpu *v) >> } >> } >> >> - ctxt = xzalloc_bytes(sizeof(struct amd_vpmu_context) + >> - sizeof(uint64_t) * AMD_MAX_COUNTERS + >> - sizeof(uint64_t) * AMD_MAX_COUNTERS); >> - if ( !ctxt ) >> + if ( is_hvm_domain(v->domain) ) > Here and elsewhere - did you consider whether is_hvm_domain() is > still the correct thing here now that PVH code is in? > I actually know that this is broken --- I ran a PVH guest a couple of days ago and it exploded because of this check. -boris