From: "Jan Beulich" Subject: Re: [PATCH v13 for-xen-4.5 20/21] x86/VPMU: NMI-based VPMU support Date: Mon, 13 Oct 2014 16:43:21 +0100 Message-ID: <543C0F39020000780003E65E@mail.emea.novell.com> References: <1412372423-1182-1-git-send-email-boris.ostrovsky@oracle.com> <1412372423-1182-21-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: <1412372423-1182-21-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, keir@xen.org, 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 03.10.14 at 23:40, wrote: > +static void vpmu_send_interrupt(struct vcpu *v) > +{ > + struct vlapic *vlapic; > + u32 vlapic_lvtpc; > + > + ASSERT( is_hvm_vcpu(v) ); > + > + vlapic = vcpu_vlapic(v); > + if ( !is_vlapic_lvtpc_enabled(vlapic) ) > + return; > + > + vlapic_lvtpc = vlapic_get_reg(vlapic, APIC_LVTPC); > + if ( GET_APIC_DELIVERY_MODE(vlapic_lvtpc) == APIC_MODE_FIXED ) > + vlapic_set_irq(vcpu_vlapic(v), vlapic_lvtpc & APIC_VECTOR_MASK, 0); > + else > + v->nmi_pending = 1; At the time you sent this the code you copied this from had already changed (and I had pointed you to the cleanup patch in a reply to the previous version) - I would really have expected you to base your code on that. > @@ -242,8 +280,9 @@ int vpmu_do_interrupt(struct cpu_user_regs *regs) > else > *flags |= PMU_SAMPLE_USER; > } > - else > + else if ( (vpmu_interrupt_type != APIC_DM_NMI) ) Bogus double parentheses. Jan