From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 2/2] Device assignment: Fix MSI IRQ affinity setting Date: Thu, 24 May 2012 23:37:19 -0300 Message-ID: <4FBEF05F.2030906@web.de> References: <1337878924-39069-1-git-send-email-richard@nod.at> <1337878924-39069-2-git-send-email-richard@nod.at> <1337883627.4714.32.camel@ul30vt> <4FBEADCB.2010900@siemens.com> <1337897506.4714.55.camel@ul30vt> <1337901828.4714.82.camel@ul30vt> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0CFFFE9884F3B89D46FCC460" Cc: Alex Williamson , Richard Weinberger , kvm@vger.kernel.org, avi@redhat.com, Marcelo Tosatti , Bjorn Helgaas , "Michael S. Tsirkin" To: Thomas Gleixner Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:35536 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960Ab2EYCh0 (ORCPT ); Thu, 24 May 2012 22:37:26 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate03.web.de (Postfix) with ESMTP id 836FF1B4EE39B for ; Fri, 25 May 2012 04:37:24 +0200 (CEST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0CFFFE9884F3B89D46FCC460 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-05-24 20:56, Thomas Gleixner wrote: > On Thu, 24 May 2012, Alex Williamson wrote: >=20 >> On Fri, 2012-05-25 at 01:01 +0200, Thomas Gleixner wrote: >>> So the proper fix is that qemu tells the guest that mask bit is >>> supported and catches the mask bit toggling before writing it out to >>> the hardware for those devices which do not support it. >> >> We can't necessarily do that, we have to work with the config space >> we're give. Using the smallest possible MSI capability always works. >> Adding mask bits may not fit in with the existing capabilities of the >> physical device. Thanks, >=20 > I see what you mean. A random device driver of a random guest OS might > rely on that information. Unlikely, but .... >=20 > So we need some logic to circumvent the masked/unmasked logic in case > that property is not set, right ? For MSI emulation in QEMU (including device assignment) it is quite simple: don't assume that the guest will always mask or even disable before fiddling with some MSI vector configuration. That is not required by the spec, so we can't rely on it. The patches I have in a semi-finished state will do precisely this. But there is still some use for a dev-assign fix based on the current code for qemu-kvm-1.1. BTW, along with the switch of device assignment to generic MSI support, we should also gain support for MSI vector masking - provided the underlying device comes with that feature as well. Jan --------------enig0CFFFE9884F3B89D46FCC460 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/ iEYEARECAAYFAk++8F8ACgkQitSsb3rl5xRY2QCgnFnjkItJMYrUi0PEQgc+okMv Z+kAn1OExhODHmv2+ESnn8Mm4BSrpMnZ =lT4i -----END PGP SIGNATURE----- --------------enig0CFFFE9884F3B89D46FCC460--