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--