From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbRkl-0002wd-G2 for qemu-devel@nongnu.org; Tue, 07 Oct 2014 06:12:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbRkb-0001fL-Km for qemu-devel@nongnu.org; Tue, 07 Oct 2014 06:12:23 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:40272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbRkb-0001fB-F5 for qemu-devel@nongnu.org; Tue, 07 Oct 2014 06:12:13 -0400 Received: by mail-wg0-f41.google.com with SMTP id b13so8954827wgh.24 for ; Tue, 07 Oct 2014 03:12:12 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5433BC75.5000703@redhat.com> Date: Tue, 07 Oct 2014 12:12:05 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-20-git-send-email-dgilbert@redhat.com> <5430247B.6080706@redhat.com> <20141007085841.GC2404@work-vm> In-Reply-To: <20141007085841.GC2404@work-vm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com, cristian.klein@cs.umu.se, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com Il 07/10/2014 10:58, Dr. David Alan Gilbert ha scritto: > >>> > > + if (exitcode & LOADVM_EXITCODE_QUITPARENT) { >>> > > + DPRINTF("loadvm_handlers_state_main: End of loop with QUITPARENT"); >>> > > + exitcode &= ~LOADVM_EXITCODE_QUITPARENT; >>> > > + exitcode &= LOADVM_EXITCODE_QUITLOOP; >> > >> > Either you want |=, or the first &= is useless. > Ooh nicely spotted; yes that should be |= - now I need to figure out why this > didn't break things. > > The idea is we have: > 1 outer loadvm_state loop > 2 receives packaged command > 3 inner_loadvm_state loop > 4 receives handle_listen > 5 < QUITPARENT > 6 < QUITLOOP > 7 < QUITLOOP > 8 exits > > so QUITPARENT causes it's parent to exit, and to do that > the inner loop transforms QUITPARENT into QUITLOOP as it's > exit. Yes, that was my understanding as well. We have only two nested loops, but if we had three, should it be QUIT_PARENT or QUIT_ALL? Paolo