From: "Jan Beulich" Subject: Re: [PATCH v22 10/14] x86/VPMU: Use pre-computed masks when checking validity of MSRs Date: Tue, 26 May 2015 17:16:59 +0100 Message-ID: <5564B89B020000780007E00B@mail.emea.novell.com> References: <1432231048-24880-1-git-send-email-boris.ostrovsky@oracle.com> <1432231048-24880-11-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: <1432231048-24880-11-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: kevin.tian@intel.com, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, tim@xen.org, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org, Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org >>> On 21.05.15 at 19:57, wrote: > +/* Masks used for testing whether and MSR is valid */ > +#define ARCH_CTRL_MASK (~((1ull << 32) - 1) | (1ull << 21)) Considering this and ... > @@ -556,7 +558,7 @@ static int core2_vpmu_do_wrmsr(unsigned int msr, uint64_t msr_content, > struct xen_pmu_cntr_pair *xen_pmu_cntr_pair = > vpmu_reg_pointer(core2_vpmu_cxt, arch_counters); > > - if ( msr_content & (~((1ull << 32) - 1)) ) > + if ( msr_content & ARCH_CTRL_MASK ) ... this, the patch isn't a "no functional change" one, so perhaps its description needs to be extended to explain the behavioral change? Jan