From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8sne-00012a-Hc for qemu-devel@nongnu.org; Mon, 12 Aug 2013 10:08:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8snV-00089r-5M for qemu-devel@nongnu.org; Mon, 12 Aug 2013 10:08:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8snU-00089m-U6 for qemu-devel@nongnu.org; Mon, 12 Aug 2013 10:08:37 -0400 Date: Mon, 12 Aug 2013 17:10:11 +0300 From: "Michael S. Tsirkin" Message-ID: <20130812141011.GA30712@redhat.com> References: <1376298489-13391-1-git-send-email-stefanha@redhat.com> <20130812091818.GA30401@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH for-1.6] virtio: clear signalled_used_valid when switching from dataplane List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , qemu-devel , Stefan Hajnoczi On Mon, Aug 12, 2013 at 03:39:23PM +0200, Stefan Hajnoczi wrote: > On Mon, Aug 12, 2013 at 11:18 AM, Michael S. Tsirkin wrote: > > On Mon, Aug 12, 2013 at 11:08:09AM +0200, Stefan Hajnoczi wrote: > >> When the dataplane thread stops, its vring.c implementation synchronizes > >> vring state back to virtio.c so we can continue emulating the virtio > >> device. > >> > >> This patch ensures that virtio.c's signalled_used_valid flag is reset so > >> that we do not suppress guest notifications due to stale signalled_used > >> values. > >> > >> Suggested-by: Kevin Wolf > >> Signed-off-by: Stefan Hajnoczi > > > > Good point > > > > Reviewed-by: Michael S. Tsirkin > > > > and we also need this for vhost.c right? > > I think vhost is not affected by this because virtio.c clears the > signalled_used_valid flag when the device is reset. Since vhost_net > does not transition back and forth between userspace virtio and vhost > (without a device reset), there is no need to reset the flag. > > Stefan Yes it does transition on vm stop/start.