From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WotSq-000208-48 for qemu-devel@nongnu.org; Mon, 26 May 2014 07:53:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WotSj-0002Uf-VH for qemu-devel@nongnu.org; Mon, 26 May 2014 07:53:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WotSj-0002Ub-MV for qemu-devel@nongnu.org; Mon, 26 May 2014 07:53:05 -0400 Date: Mon, 26 May 2014 14:51:48 +0300 From: "Michael S. Tsirkin" Message-ID: <20140526115148.GA8471@redhat.com> References: <1398507552-50168-1-git-send-email-zhang.zhanghailiang@huawei.com> <20140426104415.GB2389@amosk.info> <20140506125550.GK15810@stefanha-thinkpad.redhat.com> <20140514123026.GA16683@stefanha-thinkpad.redhat.com> <20140514124648.GB9289@redhat.com> <20140526114813.GA10187@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140526114813.GA10187@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH] e1000/rtl8139: forbid dealing with packets when VM is paused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Zhouxiangjiu , Peter Maydell , Peter Crosthwaite , Zhanghailiang , Juan Quintela , Stefan Hajnoczi , Peter Lieven , QEMU Developers , "Huangpeng (Peter)" , Alex Williamson , Amos Kong , Dave Gilbert On Mon, May 26, 2014 at 01:48:13PM +0200, Stefan Hajnoczi wrote: > On Wed, May 14, 2014 at 03:46:48PM +0300, Michael S. Tsirkin wrote: > > On Wed, May 14, 2014 at 02:30:26PM +0200, Stefan Hajnoczi wrote: > > > On Thu, May 08, 2014 at 12:51:05PM +0000, Zhanghailiang wrote: > > > > > If you implement this in the net layer then that problem is easy to resolve since > > > > > we can flush all queues when the guest resumes to get packets flowing again. > > > > > > > > > Do you mean we should also listen for VM runstate changes in net layer, and when detect runstate changes back to running , we flush all queues actively? Am I misunderstanding? > > > > Or we can do it *before* qemu (exactly when it check if it can send packets) send packets to guest again, this way will be simple, but it also need know the change of runstate. Any idea? > > > > > > When the runstate changes back to running, we definitely need to flush > > > queues to get packets flowing again. I think the simplest way of doing > > > that is in the net layer so individual NICs and netdevs don't have to > > > duplicate this code. > > > > > > Stefan > > > > That will help with networking but not other devices. > > The issue isn't limited to networking at all. > > How about we stop all io threads with the vm? > > > > That will address the issue in a generic way. > > I'm not sure if it works in all cases, for example iSCSI where we send > nop keepalives. > > Stefan I am guessing that runs from the realtime clock? We definitely want to keep realtime clock going when VM is stopped, that's the definition. -- MST