From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v9 17/20] x86/VPMU: Add privileged PMU mode Date: Tue, 12 Aug 2014 12:14:04 -0400 Message-ID: <53EA3D4C.6080403@oracle.com> References: <1407516946-17833-1-git-send-email-boris.ostrovsky@oracle.com> <1407516946-17833-18-git-send-email-boris.ostrovsky@oracle.com> <53EA2D86020000780002BA0B@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53EA2D86020000780002BA0B@mail.emea.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: kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org On 08/12/2014 09:06 AM, Jan Beulich wrote: >>>> On 08.08.14 at 18:55, wrote: >> @@ -192,32 +199,65 @@ int vpmu_do_interrupt(struct cpu_user_regs *regs) >> vpmu->arch_vpmu_ops->arch_vpmu_save(sampling); >> vpmu_reset(vpmu, VPMU_CONTEXT_SAVE | VPMU_CONTEXT_LOADED); >> >> - /* Store appropriate registers in xenpmu_data */ >> - if ( is_pv_32bit_domain(sampled->domain) ) >> + if ( !is_hvm_domain(sampled->domain) ) > I agree with using "sampled" here. > >> { >> - /* >> - * 32-bit dom0 cannot process Xen's addresses (which are 64 bit) >> - * and therefore we treat it the same way as a non-priviledged >> - * PV 32-bit domain. >> - */ >> - struct compat_cpu_user_regs *cmp; >> - >> - gregs = guest_cpu_user_regs(); >> - >> - cmp = (void *)&vpmu->xenpmu_data->pmu.r.regs; >> - XLAT_cpu_user_regs(cmp, gregs); >> + /* Store appropriate registers in xenpmu_data */ >> + if ( is_pv_32bit_domain(sampled->domain) ) > But why is this not "sampling"? The layout of the data you present > should depend on the consumer of the data Right. -boris