From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v7 13/19] x86/VPMU: Add support for PMU register handling on PV guests Date: Fri, 06 Jun 2014 16:53:30 -0400 Message-ID: <53922A4A.7090204@oracle.com> References: <1402076415-26475-1-git-send-email-boris.ostrovsky@oracle.com> <1402076415-26475-14-git-send-email-boris.ostrovsky@oracle.com> <53922407.7090708@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53922407.7090708@citrix.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: Andrew Cooper Cc: kevin.tian@intel.com, keir@xen.org, JBeulich@suse.com, jun.nakajima@intel.com, tim@xen.org, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org, suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org On 06/06/2014 04:26 PM, Andrew Cooper wrote: > > } > > +static void inject_trap(struct vcpu *v, unsigned int trapno) > +{ > + if ( has_hvm_container_domain(v->domain) ) > + hvm_inject_hw_exception(trapno, 0); > + else > + send_guest_trap(v->domain, v->vcpu_id, trapno); > +} > + > send_guest_trap() cant be used to send anything other than an nmi or > mce, but you appear to be using it to try and send #PFs ? Yes, this is wrong. I'll need to find right interface. > >> { >> case MSR_TYPE_ARCH_CTRL: /* MSR_P6_EVNTSEL[0,...] */ >> mask = ~((1ull << 32) - 1); >> - if (msr_content & mask) >> + if ( msr_content & mask ) > It would be helpful not to mix large functional changes and code > cleanup. While I appreciate the cleanup, could it be moved to a > different patch? The same comment applies to several other patches as well. I *think* this is the only instance of me doing this. I'll see if there are other places. -boris