From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alF5f-0003ni-Ji for qemu-devel@nongnu.org; Wed, 30 Mar 2016 08:19:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alF5Z-0008Va-VE for qemu-devel@nongnu.org; Wed, 30 Mar 2016 08:19:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alF5Z-0008Uu-PY for qemu-devel@nongnu.org; Wed, 30 Mar 2016 08:19:09 -0400 Date: Wed, 30 Mar 2016 13:19:06 +0100 From: Stefan Hajnoczi Message-ID: <20160330121906.GA6764@stefanha-x1.localdomain> References: <1459267981-23408-1-git-send-email-stefanha@redhat.com> <1459267981-23408-4-git-send-email-stefanha@redhat.com> <20160329185803.09dfd07d.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <20160329185803.09dfd07d.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [RFC v2 3/9] virtio: stop virtqueue processing if device is broken List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: Fam Zheng , qemu-devel@nongnu.org, "Michael S. Tsirkin" --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 29, 2016 at 06:58:03PM +0200, Cornelia Huck wrote: > On Tue, 29 Mar 2016 17:12:55 +0100 > Stefan Hajnoczi wrote: > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > > index 2b5b248..1565e53 100644 > > --- a/include/hw/virtio/virtio.h > > +++ b/include/hw/virtio/virtio.h > > @@ -87,6 +87,7 @@ struct VirtIODevice > > VirtQueue *vq; > > uint16_t device_id; > > bool vm_running; > > + bool broken; /* device in invalid state, needs reset */ >=20 > I'm wondering whether there's a sane way to track the broken state via > the NEEDS_RESET status bit instead. We'd probably want to filter out > this bit and not expose it to legacy drivers; but as the status field > is migrated anyway, we might be able to avoid a subsection for > migration. If we set the non-VIRTIO 1.0 bit and migrate to an old QEMU that doesn't filter the bit then the guest will see it. Therefore I'm in favor of keeping vdev->broken separate from the status bit. The subsection only needs to be sent when the bit is set. Only migration of a broken device to an old QEMU will fail. All other cases continue to work so the subsection doesn't impose much incompatibility. Stefan --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJW+8Q6AAoJEJykq7OBq3PInWQIAMFz/e2Gf2PNIqRRvZ90FDVF 4Ek+O5Fg2QvvesTuOYrEx43PTidf1tWOIXQ5PrLU69yA719Xv50YV+/KLWDEnyLE BnJGba839XPfeNat4kydJxj7EyiX30Iaj9ItnkPJkoQsN08yNKPP/gPBCteYqFQk I9W+mECplH9rRwCEE1wt1y8UvwgGtB5c6f7BONwuoJhJbdo4PAXJ4c0UtpjR82Tu oVPgpXihL+APAgsO7z7X7gcqy0G1WDRHasztLh4qCRPJswNf6AM4W4wV6r9hRfQU 0KjjRk7luqr7yr6Wj2fO2Ig0m4N71Rn4B6JTE3zeChJB5FD2YBRhDDGMRlamWh4= =daK0 -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--