From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXBHm-00050o-St for qemu-devel@nongnu.org; Sun, 04 Dec 2011 07:35:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXBHl-00064v-3p for qemu-devel@nongnu.org; Sun, 04 Dec 2011 07:35:14 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:57384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXBHk-00064g-P4 for qemu-devel@nongnu.org; Sun, 04 Dec 2011 07:35:13 -0500 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate02.web.de (Postfix) with ESMTP id 77E6C1BB1EB3A for ; Sun, 4 Dec 2011 13:35:11 +0100 (CET) Message-ID: <4EDB68F7.90307@web.de> Date: Sun, 04 Dec 2011 13:35:03 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <27ef57671106d9214757df8a1d4cc28287dae07c.1321893802.git.mst@redhat.com> <20111204102036.GB15464@redhat.com> In-Reply-To: <20111204102036.GB15464@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFBF891E2D56DAD20B80F0C9C" Subject: Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , Anthony Liguori , Cam Macdonell , qemu-devel@nongnu.org, Alexander Graf This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFBF891E2D56DAD20B80F0C9C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-12-04 11:20, Michael S. Tsirkin wrote: > On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: >> Based on a git bisect, this patch breaks msi-x interrupt delivery in >> the ivshmem device. >=20 > I think the following should fix it. Compiled-only - > could you pls check? If yes let's apply to the stable branch. >=20 > --> >=20 > ivshmem: add missing msix calls >=20 > ivshmem used msix but didn't call it on either reset or > config write paths. This used to partically work since > guests don't use all of msi-x configuration fields, > and reset is rarely used, but the patch 'msix: track function masked > in pci device state' broke that. Fix by adding appropriate calls. >=20 > Signed-off-by: Michael S. Tsirkin >=20 > -- >=20 > diff --git a/hw/ivshmem.c b/hw/ivshmem.c > index 242fbea..3680c0f 100644 > --- a/hw/ivshmem.c > +++ b/hw/ivshmem.c > @@ -505,6 +505,7 @@ static void ivshmem_reset(DeviceState *d) > IVShmemState *s =3D DO_UPCAST(IVShmemState, dev.qdev, d); > =20 > s->intrstatus =3D 0; > + msix_reset(&s->dev); > return; > } > =20 > @@ -610,6 +611,13 @@ static int ivshmem_load(QEMUFile* f, void *opaque,= int version_id) > return 0; > } > =20 > +static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address,= > + uint32_t val, int len) > +{ > + pci_default_write_config(pci_dev, address, val, len); > + msix_write_config(pci_dev, address, val, len); > +} > + > static int pci_ivshmem_init(PCIDevice *dev) > { > IVShmemState *s =3D DO_UPCAST(IVShmemState, dev, dev); > @@ -734,6 +742,8 @@ static int pci_ivshmem_init(PCIDevice *dev) > =20 > } > =20 > + s->dev.config_write =3D ivshmem_write_config; > + > return 0; > } > =20 >=20 >=20 But please fix this for real and merge [1]&[2] (with depending patches) into master. The above is just boilerplate code from device POV. Jan [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/80240 [2] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/80244 --------------enigFBF891E2D56DAD20B80F0C9C 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/ iEYEARECAAYFAk7baPsACgkQitSsb3rl5xRJ1ACggV46Zw//FSFahuGuXYo6QFWC nckAnA58/ViPRB/lEJFA7xGu7AEdiZcj =+/EJ -----END PGP SIGNATURE----- --------------enigFBF891E2D56DAD20B80F0C9C--