From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC][PATCH 00/45] qemu-kvm: MSI layer rework for in-kernel irqchip support Date: Mon, 17 Oct 2011 21:35:05 +0200 Message-ID: <4E9C8369.1030801@web.de> References: <20111017155734.GD7876@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig986157371E7EE57EAA3A7096" Cc: "kvm@vger.kernel.org" , Marcelo Tosatti , Alexander Graf , "qemu-devel@nongnu.org" , Isaku Yamahata , Alex Williamson , Avi Kivity , Gerd Hoffmann To: "Michael S. Tsirkin" Return-path: In-Reply-To: <20111017155734.GD7876@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig986157371E7EE57EAA3A7096 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-17 17:57, Michael S. Tsirkin wrote: > On Mon, Oct 17, 2011 at 11:27:34AM +0200, Jan Kiszka wrote: >> As previously indicated, I was working for quite a while on a major >> refactoring of the MSI "additions" we have in qemu-kvm to support >> in-kernel irqchip, vhost and device assignment. This is now the outcom= e. >> >> I'm quite happy with it, things are still working (apparently), and th= e >> invasiveness of KVM hooks into the MSI layer is significantly reduced.= >> Moreover, I was able to port the device assignment code over generic M= SI >> support, reducing the size of that file a bit further. >> >> Some further highlights: >> - fix for HPET MSI support with in-kernel irqchip >> - fully configurable MSI-X (allows 1:1 mapping for assigned devices) >> - refactored KVM core API for device assignment and IRQ routing >> >> I'm sending the whole series in one chunk so that you can see what the= >> result will be. It's RFC as I bet that there are regressions included >> and maybe still room left for improvements. Once all is fine (can be >> broken up into multiple chunks for the merge), I would suggest patchin= g >> qemu-kvm first and then start with porting things over to upstream. >> >> Comments & review welcome. >> >> CC: Alexander Graf >> CC: Gerd Hoffmann >> CC: Isaku Yamahata >=20 >=20 > So the scheme where we lazily update kvm gsi table > on interrupts is interesting. There seems to be > very little point in it for virtio, and it does > seem to make it impossible to detect lack or resources > (at the moment we let guest know if we run out of GSIs > and linux guests can fall back to regular interrupts). Are we really at that limit already? Then I think it's rather time to lift it at the kernel side. >=20 > I am guessing the idea is to use it for device assignment > where it does make sense as there is no standard way > to track which vectors are actually used? > But how does it work there? kvm does not > propage unmapped interrupts from an assigned device to qemu, does it? No, device assignment and irqfd (vhost, vfio, whatever-will-come) belong to the static group. They need to hand out a static gsi to the irq source, thus they cannot participate in lazy updating. But they can benefit from the generic config notifiers: whenever the guest changes some route (or disables it), they just need to inform the core about this. So there is no need to track used vectors separately anymore. Jan --------------enig986157371E7EE57EAA3A7096 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.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6cg2kACgkQitSsb3rl5xSBzwCeLO0s+hBBZM9fIO8HjjZmEafT PxYAoJUirL8g/8AwS8FXeip+hc7scCDq =QIQu -----END PGP SIGNATURE----- --------------enig986157371E7EE57EAA3A7096-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG6Ux-0004WA-OD for qemu-devel@nongnu.org; Tue, 18 Oct 2011 06:02:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG6Ur-0007a1-Kv for qemu-devel@nongnu.org; Tue, 18 Oct 2011 06:02:15 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:60545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG6Ur-0007Zr-74 for qemu-devel@nongnu.org; Tue, 18 Oct 2011 06:02:09 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate03.web.de (Postfix) with ESMTP id 33CFF1A44585B for ; Mon, 17 Oct 2011 21:59:39 +0200 (CEST) Message-ID: <4E9C8369.1030801@web.de> Date: Mon, 17 Oct 2011 21:35:05 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20111017155734.GD7876@redhat.com> In-Reply-To: <20111017155734.GD7876@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig986157371E7EE57EAA3A7096" Subject: Re: [Qemu-devel] [RFC][PATCH 00/45] qemu-kvm: MSI layer rework for in-kernel irqchip support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: "kvm@vger.kernel.org" , Marcelo Tosatti , Alexander Graf , "qemu-devel@nongnu.org" , Isaku Yamahata , Alex Williamson , Avi Kivity , Gerd Hoffmann This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig986157371E7EE57EAA3A7096 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-17 17:57, Michael S. Tsirkin wrote: > On Mon, Oct 17, 2011 at 11:27:34AM +0200, Jan Kiszka wrote: >> As previously indicated, I was working for quite a while on a major >> refactoring of the MSI "additions" we have in qemu-kvm to support >> in-kernel irqchip, vhost and device assignment. This is now the outcom= e. >> >> I'm quite happy with it, things are still working (apparently), and th= e >> invasiveness of KVM hooks into the MSI layer is significantly reduced.= >> Moreover, I was able to port the device assignment code over generic M= SI >> support, reducing the size of that file a bit further. >> >> Some further highlights: >> - fix for HPET MSI support with in-kernel irqchip >> - fully configurable MSI-X (allows 1:1 mapping for assigned devices) >> - refactored KVM core API for device assignment and IRQ routing >> >> I'm sending the whole series in one chunk so that you can see what the= >> result will be. It's RFC as I bet that there are regressions included >> and maybe still room left for improvements. Once all is fine (can be >> broken up into multiple chunks for the merge), I would suggest patchin= g >> qemu-kvm first and then start with porting things over to upstream. >> >> Comments & review welcome. >> >> CC: Alexander Graf >> CC: Gerd Hoffmann >> CC: Isaku Yamahata >=20 >=20 > So the scheme where we lazily update kvm gsi table > on interrupts is interesting. There seems to be > very little point in it for virtio, and it does > seem to make it impossible to detect lack or resources > (at the moment we let guest know if we run out of GSIs > and linux guests can fall back to regular interrupts). Are we really at that limit already? Then I think it's rather time to lift it at the kernel side. >=20 > I am guessing the idea is to use it for device assignment > where it does make sense as there is no standard way > to track which vectors are actually used? > But how does it work there? kvm does not > propage unmapped interrupts from an assigned device to qemu, does it? No, device assignment and irqfd (vhost, vfio, whatever-will-come) belong to the static group. They need to hand out a static gsi to the irq source, thus they cannot participate in lazy updating. But they can benefit from the generic config notifiers: whenever the guest changes some route (or disables it), they just need to inform the core about this. So there is no need to track used vectors separately anymore. Jan --------------enig986157371E7EE57EAA3A7096 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.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6cg2kACgkQitSsb3rl5xSBzwCeLO0s+hBBZM9fIO8HjjZmEafT PxYAoJUirL8g/8AwS8FXeip+hc7scCDq =QIQu -----END PGP SIGNATURE----- --------------enig986157371E7EE57EAA3A7096--