From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awET6-0006UG-VG for qemu-devel@nongnu.org; Fri, 29 Apr 2016 15:52:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awESm-00005c-3Y for qemu-devel@nongnu.org; Fri, 29 Apr 2016 15:52:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awESl-0008Pu-Ty for qemu-devel@nongnu.org; Fri, 29 Apr 2016 15:52:32 -0400 Date: Fri, 29 Apr 2016 21:52:14 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20160429195214.GG15747@potion> References: <1461827144-6937-1-git-send-email-peterx@redhat.com> <5721B980.4050903@web.de> <20160428091802.GH20143@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160428091802.GH20143@pxdev.xzpeter.org> Subject: Re: [Qemu-devel] [PATCH v5 00/18] IOMMU: Enable interrupt remapping for Intel IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: Jan Kiszka , qemu-devel@nongnu.org, imammedo@redhat.com, rth@twiddle.net, ehabkost@redhat.com, jasowang@redhat.com, marcel@redhat.com, mst@redhat.com, pbonzini@redhat.com, alex.williamson@redhat.com, wexu@redhat.com 2016-04-28 17:18+0800, Peter Xu: > On Thu, Apr 28, 2016 at 09:19:28AM +0200, Jan Kiszka wrote: >> Instead of fiddling with irq routes for the IOAPIC - where we don't need >> it -, I would suggest to do the following: Send IOAPIC events via >> kvm_irqchip_send_msi to the kernel. Only irqfd users (vhost, vfio) >> should use the pattern you are now applying to the IOAPIC: establish >> static routes as an irqfd is set up, and that route should be translated >> by the iommu first, register an IEC notifier to update any affected >> route when the iommu translation changes. > > Yes, maybe that's the right thing to do. Or say, when split irqchip, > IOAPIC can avoid using GSI routes any more. If with that, I should > also remove lots of things, like: IEC notifiers for IOAPIC, and all > things related to msi route sync-up in IOAPIC codes with KVM (so I > suppose we will save 24 gsi route entries for KVM, which sounds > good). Sadly, we can't get rid of those GSI routes. KVM uses them to decide whether it should forward EOI to userspace. And QEMU also has to remap them, because KVM uses dest_id for that decision.