From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boYln-0002c5-NB for qemu-devel@nongnu.org; Mon, 26 Sep 2016 12:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boYlj-0004uf-VK for qemu-devel@nongnu.org; Mon, 26 Sep 2016 12:28:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boYlj-0004uP-OS for qemu-devel@nongnu.org; Mon, 26 Sep 2016 12:28:39 -0400 Date: Mon, 26 Sep 2016 17:28:36 +0100 From: Stefan Hajnoczi Message-ID: <20160926162836.GF25705@stefanha-x1.localdomain> References: <147487882735.6679.8076815106195077844.stgit@bahia> <147487888859.6679.15124093403943569040.stgit@bahia> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H4SyuGOnfnj3aJqJ" Content-Disposition: inline In-Reply-To: <147487888859.6679.15124093403943569040.stgit@bahia> Subject: Re: [Qemu-devel] [PATCH v3 7/9] virtio-net: handle virtio_net_flush_tx() errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, Kevin Wolf , "Michael S. Tsirkin" , Jason Wang , Max Reitz , "Aneesh Kumar K.V" , Cornelia Huck , Paolo Bonzini --H4SyuGOnfnj3aJqJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 26, 2016 at 10:34:48AM +0200, Greg Kurz wrote: > All these errors are caused by a buggy guest: let's switch the device to > the broken state instead of terminating QEMU. Also we detach the element > from the virtqueue and free it. >=20 > If this happens, virtio_net_flush_tx() also returns -EINVAL, so that all > callers can stop processing the virtqueue immediatly. >=20 > Signed-off-by: Greg Kurz > --- > v3: - detach and free element > - updated changelog > --- > hw/net/virtio-net.c | 26 ++++++++++++++++++-------- > 1 file changed, 18 insertions(+), 8 deletions(-) Reviewed-by: Stefan Hajnoczi --H4SyuGOnfnj3aJqJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJX6Uy0AAoJEJykq7OBq3PIZlEH/jGNGOE+QYcLICL7JLB6vRlb gxCg+WJOcEfRBaKl36nam1FPEarAx2FISc8QvSYSOXXN4NBwCWcpvXphZGTdTVCJ SgKp62CeXSWSFmlFZ/+3ASg1sA+iBj+OMuLeH6jP0BQ2vBLb398GtNImGavqMNRe qVhR066eA5xY8MiYnYD2w85rGrR7cCEfzE1fKnNBcsKUXf6gXWtpDf0AeLsk4C5d tB9r/nQG3PXmgIFGnhbEMPXGLmMukzJgUksYoNR1pHSqHeodueQgRgS81px36uYl euQFhxLqWTnHSoTDmMjCAPT9rwJEl0+b6IJ91WoW1MzZpp1ty84m8pYtYrtAruc= =VUoA -----END PGP SIGNATURE----- --H4SyuGOnfnj3aJqJ--