From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Sun, 28 Apr 2013 12:05:11 +0000 Subject: Re: [PATCH v5 0/8] In-kernel XICS interrupt controller emulation Message-Id: <20130428120511.GE5743@iris.ozlabs.ibm.com> List-Id: References: <20130418062926.GA25033@drongo> <369C14EF-DE69-454C-A2A3-E1CC8FBD3258@suse.de> <20130427083621.GC5743@iris.ozlabs.ibm.com> <0D47D67A-D22C-4113-8A9E-BB2C34680FD1@suse.de> In-Reply-To: <0D47D67A-D22C-4113-8A9E-BB2C34680FD1@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Scott Wood On Sun, Apr 28, 2013 at 11:50:49AM +0200, Alexander Graf wrote: > > On 27.04.2013, at 10:36, Paul Mackerras wrote: > > > On Fri, Apr 26, 2013 at 04:30:37PM +0200, Alexander Graf wrote: > >> Very nice patch set. I've applie 1-7 of it to kvm-ppc-queue. So they will hopefully make it to 3.10. > >> > >> Please check for 8/8 whether > >> > >> a) You want to have a released kernel version without irq routing (irqfd) support. It makes user space's life harder, because you need to maintain backwards compatibility. > > > > If we do a version without irq routing and later add it, old userspace > > should still work, since KVM_IRQ_LINE still works, right? New > > userspace on an old kernel can test the KVM_CAP_IRQ_ROUTING capability > > to see if it can use irqfd. So on the whole, I would like to get it > > User space would have to know about 2 different ways of setting interrupts, one through IRQ_LINE and one through whatever XICS device specific ioctl you create :). Ummm, no, userspace uses KVM_IRQ_LINE either way. Since I don't define CONFIG_HAVE_KVM_IRQCHIP or CONFIG_HAVE_KVM_IRQ_ROUTING, we don't compile in virt/kvm/irqchip.c and thus we don't get a definition of kvm_set_irq() (note that in your tree as it stands, it's only by grace of gcc's optimizations that we don't get a link error when CONFIG_KVM_MPIC=n, since we have the code in arch/powerpc/kvm/powerpc.c that calls kvm_set_irq() unconditionally). So I added a definition of kvm_set_irq() to book3s_xics.c in the patch I posted recently, meaning that userspace can in fact use KVM_IRQ_LINE even though I don't yet support irqfd or irq routing. > > OK, I've done that, but I need to grab David Gibson to get a qemu that > > knows about the new API so I can test it. > > Yeah, please sync with him on this whole thing too. Someone will have to write the compat code ;). I have a version of qemu from him that uses KVM_CREATE_DEVICE to create the XICS and KVM_IRQ_LINE to control the interrupt inputs, and it all works just fine. Regards, Paul.