From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC PATCH 0/4] MSI affinity for assigned devices Date: Thu, 29 Nov 2012 07:57:41 +0100 Message-ID: <50B70765.1040908@web.de> References: <20121127215203.5751.6523.stgit@bling.home> <50B547F3.1080907@web.de> <1354058462.1809.182.camel@bling.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF66AC00C576B71D380DF0591" Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Alex Williamson Return-path: Received: from mout.web.de ([212.227.15.4]:50013 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039Ab2K2G5t (ORCPT ); Thu, 29 Nov 2012 01:57:49 -0500 In-Reply-To: <1354058462.1809.182.camel@bling.home> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF66AC00C576B71D380DF0591 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-11-28 00:21, Alex Williamson wrote: > On Wed, 2012-11-28 at 00:08 +0100, Jan Kiszka wrote: >> On 2012-11-27 23:00, Alex Williamson wrote: >>> This is post-1.3 material, so I'll just post it as an RFC for now. >>> >>> MSI routing updates aren't currently handled by pci-assign or >>> vfio-pci (when using KVM acceleration), which means that trying to >>> set interrupt SMP affinity in the guest has no effect unless MSI is >>> completely disabled and re-enabled. This series fixes this for both >>> device assignment backends using similar schemes. We store the last >>> MSIMessage programmed to KVM and do updates to the MSI route when it >>> changes. pci-assign takes a little bit of refactoring to make this >>> happen cleanly. Thanks, >> >> This should rather be done by implementing vector notifiers for MSI as= >> well. That way the device model no longer has to track reasons for >> vector changes in an open-coded fashion, just like we already do for M= SI-X. >> >> Was on my todo list for a long time, but I never reached this item. >=20 > MSI masking is optional and not many devices seem to support it. What = I > see with a linux guest is that it just overwrites the address/data whil= e > MSI is enabled. What were you thinking for notifiers? mask, unmask, > update? I'm not sure I'm interested enough in this to add MSI vector > notifiers. Thanks, We didn't merge "mask" notifiers but a more generic concept. Our notifiers a supposed to fire when the configuration changes effectively. So, for MSI, a "use" event has to trigger also on "change", i.e. when the configuration is overwritten while the vector is already active. Alternatively, you could also add such an "update" notifier, using the MSIVectorUseNotifier signature if it makes the user side simpler. Jan --------------enigF66AC00C576B71D380DF0591 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 undefined - http://www.enigmail.net/ iEYEARECAAYFAlC3B2gACgkQitSsb3rl5xRC1gCeJAntbXlWR0xQRMWFbcVIhT/p OicAnjhrSq6qguVcojxqq3OkCDHRSHgf =vK9C -----END PGP SIGNATURE----- --------------enigF66AC00C576B71D380DF0591-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdy4H-0001zq-7Q for qemu-devel@nongnu.org; Thu, 29 Nov 2012 01:57:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tdy4F-0000Qr-Q9 for qemu-devel@nongnu.org; Thu, 29 Nov 2012 01:57:53 -0500 Received: from mout.web.de ([212.227.15.4]:56958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdy4F-0000Qf-Fb for qemu-devel@nongnu.org; Thu, 29 Nov 2012 01:57:51 -0500 Message-ID: <50B70765.1040908@web.de> Date: Thu, 29 Nov 2012 07:57:41 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20121127215203.5751.6523.stgit@bling.home> <50B547F3.1080907@web.de> <1354058462.1809.182.camel@bling.home> In-Reply-To: <1354058462.1809.182.camel@bling.home> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF66AC00C576B71D380DF0591" Subject: Re: [Qemu-devel] [RFC PATCH 0/4] MSI affinity for assigned devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF66AC00C576B71D380DF0591 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2012-11-28 00:21, Alex Williamson wrote: > On Wed, 2012-11-28 at 00:08 +0100, Jan Kiszka wrote: >> On 2012-11-27 23:00, Alex Williamson wrote: >>> This is post-1.3 material, so I'll just post it as an RFC for now. >>> >>> MSI routing updates aren't currently handled by pci-assign or >>> vfio-pci (when using KVM acceleration), which means that trying to >>> set interrupt SMP affinity in the guest has no effect unless MSI is >>> completely disabled and re-enabled. This series fixes this for both >>> device assignment backends using similar schemes. We store the last >>> MSIMessage programmed to KVM and do updates to the MSI route when it >>> changes. pci-assign takes a little bit of refactoring to make this >>> happen cleanly. Thanks, >> >> This should rather be done by implementing vector notifiers for MSI as= >> well. That way the device model no longer has to track reasons for >> vector changes in an open-coded fashion, just like we already do for M= SI-X. >> >> Was on my todo list for a long time, but I never reached this item. >=20 > MSI masking is optional and not many devices seem to support it. What = I > see with a linux guest is that it just overwrites the address/data whil= e > MSI is enabled. What were you thinking for notifiers? mask, unmask, > update? I'm not sure I'm interested enough in this to add MSI vector > notifiers. Thanks, We didn't merge "mask" notifiers but a more generic concept. Our notifiers a supposed to fire when the configuration changes effectively. So, for MSI, a "use" event has to trigger also on "change", i.e. when the configuration is overwritten while the vector is already active. Alternatively, you could also add such an "update" notifier, using the MSIVectorUseNotifier signature if it makes the user side simpler. Jan --------------enigF66AC00C576B71D380DF0591 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 undefined - http://www.enigmail.net/ iEYEARECAAYFAlC3B2gACgkQitSsb3rl5xRC1gCeJAntbXlWR0xQRMWFbcVIhT/p OicAnjhrSq6qguVcojxqq3OkCDHRSHgf =vK9C -----END PGP SIGNATURE----- --------------enigF66AC00C576B71D380DF0591--