From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK1mR-0005XK-Sm for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:02:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK1mG-0008OR-3E for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:02:07 -0400 Received: from mail4.gandi.net ([217.70.183.210]:43016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK1mF-0008Nm-M2 for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:01:56 -0400 Date: Wed, 20 Aug 2014 11:02:09 +0200 From: William Dauchy Message-ID: <20140820090209.GA26555@gandi.net> References: <1408424189-10510-1-git-send-email-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <1408424189-10510-1-git-send-email-jasowang@redhat.com> Subject: Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: zhangjie14@huawei.com, qemu-devel@nongnu.org, William Dauchy , mst@redhat.com --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug19 12:56, Jason Wang wrote: > commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue > support changed the order of stopping the device. Previously > vhost_dev_stop would disable backend and only afterwards, unset guest > notifiers. We now unset guest notifiers while vhost is still > active. This can lose interrupts causing guest networking to fail. In > particular, this has been observed during migration. >=20 > To adapt this, several other changes are needed: > - remove the hdev->started assertion in vhost.c since we may want to > start the guest notifiers before vhost starts and stop the guest > notifiers after vhost is stopped. > - introduce the vhost_net_set_vq_index() and call it before setting > guest notifiers. This is used to guarantee vhost_net has the correct > virtqueue index when setting guest notifiers. >=20 > Reported-by: "Zhangjie (HZ)" > Cc: William Dauchy > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Jason Wang >=20 > -- > Changes from Michael's patch: > - Remove the assertion > Changes from V1: > - Rebase to latest > Changes from V2: > - Introduce vhost_net_set_vq_index() to unbreak multiqueue indeed I had with v2: qemu-system-x86_64: hw/virtio/vhost.c:990: vhost_virtqueue_mask: Assertion = `n >=3D hdev->vq_index && n < hdev->vq_index + hdev->nvqs' failed. v3 seems ok to me --=20 William --UugvWAfsgieZRqgk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlP0ZBEACgkQ1I6eqOUidQHhhACgjYnE1gWdaBwOZXAwTcQ2qCeH HYsAoLBK59tpwBAwTz17zh9UvOozcqt/ =Z2mc -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--