From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v6 13/19] x86/VPMU: Handle PMU interrupts for PV guests Date: Fri, 23 May 2014 07:29:30 +0100 Message-ID: <537F06EA02000078000152E5@mail.emea.novell.com> References: <1399996413-1998-1-git-send-email-boris.ostrovsky@oracle.com> <1399996413-1998-14-git-send-email-boris.ostrovsky@oracle.com> <537E344B02000078000150B2@mail.emea.novell.com> <537E3306.2020009@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <537E3306.2020009@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: kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, donald.d.dugger@intel.com, xen-devel@lists.xen.org, dietmar.hahn@ts.fujitsu.com, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 22.05.14 at 19:25, wrote: > On 05/22/2014 11:30 AM, Jan Beulich wrote: >> >>> @@ -99,14 +120,87 @@ int vpmu_do_rdmsr(unsigned int msr, uint64_t > *msr_content) >>> return 0; >>> >>> if ( vpmu->arch_vpmu_ops && vpmu->arch_vpmu_ops->do_rdmsr ) >>> - return vpmu->arch_vpmu_ops->do_rdmsr(msr, msr_content); >>> + { >>> + int ret = vpmu->arch_vpmu_ops->do_rdmsr(msr, msr_content); >>> + >>> + if ( !is_hvm_domain(current->domain) && >>> + (current->arch.vpmu.xenpmu_data->pmu_flags & PMU_CACHED) ) >> Wouldn't the same comment as in WRMSR handling apply here too? >> If so, either replicate it or add a brief comment referring to the >> other one. > > > Yes, the comment is applicable here too and the next patch merges the > two routines. When I saw that the next patch merges the two, I realized that my request here was sort of pointless. Question in such cases of course is whether the merging wouldn't then better be done up front. Jan