From: Alex Williamson Subject: Re: Device assignment, shared IRQs, uio_pci_generic Date: Sat, 30 Oct 2010 11:06:04 -0600 Message-ID: <1288458364.2893.16.camel@x201> References: <4CCC40A6.7080008@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9825 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755084Ab0J3RGH (ORCPT ); Sat, 30 Oct 2010 13:06:07 -0400 In-Reply-To: <4CCC40A6.7080008@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, 2010-10-30 at 17:58 +0200, Jan Kiszka wrote: > Hi all, > > trying to pass some host device to a KVM guest (for driver hacking), I > ran into massive IRQ sharing issues on the host. Classic device > assignment refuses to work in this case. I remembered uio_pci_generic, > which I thought was once designed to resolve this conflict. But it isn't > used by KVM or qemu, is it? Nope, VFIO started out being based on it, but has since branched off. KVM has never made use of it. > So I crossed fingers and hacked IRQF_SHARED into > assigned_device_enable_host_intx. Effect as expected: assignment work, > host gets massive hick-ups (the graphic adapter is another user of this > line...). > > Are there already VFIO patches ready for testing that work with shared > IRQs as well? And/or would it make sense to integrate IRQ sharing via > PCI-level IRQ masking to the KVM core until VFIO becomes standard? There's a very old qemu VFIO patch floating around, but I plan to send out a new one this week, thus all the pre-patches I've been sending out. Adding PCI 2.3 interrupt disable support to KVM should be very possible, and I suspect fairly easy. Oddly, I've just been adding support for non-PCI 2.3 devices to VFIO so it can support all the old devices that KVM does already. Alex