From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH] xen: Support 64-bit PV guest receiving NMIs Date: Mon, 22 Jul 2013 16:26:47 +0100 Message-ID: <51ED4F37.7050904@citrix.com> References: <1374249091-11285-1-git-send-email-konrad.wilk@oracle.com> <51ED2255.3060507@citrix.com> <20130722144829.GB30300@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130722144829.GB30300@phenom.dumpdata.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: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xensource.com, Lisa Nguyen , Ian.Campbell@citrix.com, Zhenzhong Duan , Konrad Rzeszutek Wilk , Ben Guthro , boris.ostrovsky@oracle.com List-Id: xen-devel@lists.xenproject.org On 22/07/13 15:48, Konrad Rzeszutek Wilk wrote: > On Mon, Jul 22, 2013 at 01:15:17PM +0100, David Vrabel wrote: >> On 19/07/13 16:51, Konrad Rzeszutek Wilk wrote: [...] > What version of them would that be ? Anything prior to 3.4 cannot > boot with the Linux pvops. Ok. 3.4 has all the required functionality. >>> --- a/drivers/xen/events.c >>> +++ b/drivers/xen/events.c >>> @@ -1213,6 +1214,16 @@ EXPORT_SYMBOL_GPL(evtchn_put); >>> void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector) >>> { >>> int irq = per_cpu(ipi_to_irq, cpu)[vector]; >>> + >>> + /* >>> + * In which the IRQ will be -1. >>> + */ >>> + if (unlikely(vector == XEN_NMI_VECTOR)) { >>> + int rc = HYPERVISOR_vcpu_op(VCPUOP_send_nmi, cpu, NULL); >>> + if (rc < 0) >>> + printk(KERN_WARNING "Sending nmi to CPU%d failed (rc:%d)\n", cpu, rc); >>> + return; >>> + } >> >> Move the assignment of irq after this block, then you can drop the >> (unhelpful) comment. > > I guess? I was thinking it would be helpfull to know if it does not work. I meant the comment not the printk. e.g., { int irq; if (unlikely(vector == XEN_NMI_VECTOR)) { int rc = HYPERVISOR_vcpu_op(VCPUOP_send_nmi, cpu, NULL); if (rc < 0) printk(KERN_WARNING "Sending nmi to CPU%d failed (rc:%d)\n", cpu, rc); return; } irq = per_cpu(ipi_to_irq, cpu)[vector]; ... David