From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHA6a-0003vu-WC for qemu-devel@nongnu.org; Sun, 26 Jun 2016 09:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHA6X-0001KB-5j for qemu-devel@nongnu.org; Sun, 26 Jun 2016 09:28:08 -0400 Received: from mout.web.de ([212.227.15.4]:50459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHA6W-0001JI-S1 for qemu-devel@nongnu.org; Sun, 26 Jun 2016 09:28:05 -0400 References: <1466495274-5011-1-git-send-email-peterx@redhat.com> <1466495274-5011-17-git-send-email-peterx@redhat.com> <576E3BEA.5010400@web.de> <20160625131854.GA16629@pxdev.xzpeter.org> <576EA0D0.3070602@web.de> <20160626014847.GB16629@pxdev.xzpeter.org> From: Jan Kiszka Message-ID: <576FD856.1020806@web.de> Date: Sun, 26 Jun 2016 15:27:50 +0200 MIME-Version: 1.0 In-Reply-To: <20160626014847.GB16629@pxdev.xzpeter.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3opp3WsmTnglnDIEqmQn6IwqhlTHVg7aj" Subject: Re: [Qemu-devel] [PATCH v10 16/26] intel_iommu: add support for split irqchip List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: 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, rkrcmar@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, davidkiarie4@gmail.com, Valentine Sinitsyn This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3opp3WsmTnglnDIEqmQn6IwqhlTHVg7aj From: Jan Kiszka To: Peter Xu Cc: 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, rkrcmar@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, davidkiarie4@gmail.com, Valentine Sinitsyn Message-ID: <576FD856.1020806@web.de> Subject: Re: [PATCH v10 16/26] intel_iommu: add support for split irqchip References: <1466495274-5011-1-git-send-email-peterx@redhat.com> <1466495274-5011-17-git-send-email-peterx@redhat.com> <576E3BEA.5010400@web.de> <20160625131854.GA16629@pxdev.xzpeter.org> <576EA0D0.3070602@web.de> <20160626014847.GB16629@pxdev.xzpeter.org> In-Reply-To: <20160626014847.GB16629@pxdev.xzpeter.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-06-26 03:48, Peter Xu wrote: > On Sat, Jun 25, 2016 at 05:18:40PM +0200, Jan Kiszka wrote: >> On 2016-06-25 15:18, Peter Xu wrote: >>> On Sat, Jun 25, 2016 at 10:08:10AM +0200, Jan Kiszka wrote: >=20 > [...] >=20 >>> I have a thought on how to implement the "sink" you have mentioned: >>> >>> First of all, in KVM, we provide a new KVM_IRQ_ROUTING_* type, maybe >>> called: >>> >>> KVM_IRQ_ROUTING_EVENTFD >> >> Not really, because all sources are either using eventfds, which you c= an >> also terminate in user space (already done for vhost and vfio in certa= in >> scenarios - IIRC) or originate there anyway (IOAPIC). >=20 > But how should we handle the cases when the interrupt path are all in > kernel? There are none which we can't redirect (only full in-kernel irqchip would have, but that's unsupported anyway). >=20 > For vhost, data should be transfered all inside kernel when split > irqchip and irqfd are used: when vhost got data, it triggers irqfd to > deliver the interrupt to KVM. Along the way, we should all in kernel. >=20 > For vfio, we have vfio_msihandler() who handles the hardware IRQ and > then triggers irqfd as well to KVM. Again, it seems all in kernel > space, no chance to stop that as well. >=20 > Please correct me if I was wrong. Look at what vhost is doing e.g.: when a virtqueue is masked, it installs an event notifier that records incoming events in a pending state field. When it's unmasked, the corresponding KVM irqfd is installed= =2E Jan --3opp3WsmTnglnDIEqmQn6IwqhlTHVg7aj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldv2FYACgkQitSsb3rl5xTCAQCg3ULFz1bNeLkljgXVKZpVmA3q IpMAn2NacrxJwFRUG7DE+6uzQt8OTy4X =2hpB -----END PGP SIGNATURE----- --3opp3WsmTnglnDIEqmQn6IwqhlTHVg7aj--