From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8cEO-0001BE-0W for qemu-devel@nongnu.org; Fri, 16 Mar 2012 14:50:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8cEM-0004Jb-DO for qemu-devel@nongnu.org; Fri, 16 Mar 2012 14:50:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8cEM-0004JK-58 for qemu-devel@nongnu.org; Fri, 16 Mar 2012 14:50:26 -0400 Message-ID: <4F636AFB.9090707@redhat.com> Date: Fri, 16 Mar 2012 17:31:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20120316085237.4947.53556.stgit@amd-6168-8-1.englab.nay.redhat.com> <20120316085453.4947.23068.stgit@amd-6168-8-1.englab.nay.redhat.com> <4F630B44.5000102@redhat.com> <4F63125A.1020005@redhat.com> <4F6319DE.1070407@redhat.com> <4F635B0E.7020300@redhat.com> In-Reply-To: <4F635B0E.7020300@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V5 PATCH 1/4] net: announce self after vm start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, mst@redhat.com, rusty@rustcorp.com.au, qemu-devel@nongnu.org, quintela@redhat.com Il 16/03/2012 16:23, Jason Wang ha scritto: >>> >> Or just a global need_announce instead of looking at the runstate. >> >> Paolo >> > Then I think it's better for us introduce a parameter for vm_start() > like what we've done in V4. But that didn't work because you ended up changing the "cont" semantics. There are two possibilities. 1) Changing those is okay, in which case you only need to check more runstates; 2) Changing those is not okay, in which case you need something like this in qemu_announce_self() void qemu_announce_self() { if (!runstate_is_running()) { need_announce = true; return; } need_announce = false; ... } and then you just check need_announce in vm_start. Nothing to change in all the invocations of vm_start, you just mark that you need to do work later. Paolo