From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVhL-0001at-1S for qemu-devel@nongnu.org; Fri, 14 Dec 2012 08:53:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjVhI-0001tm-32 for qemu-devel@nongnu.org; Fri, 14 Dec 2012 08:53:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVhH-0001tg-Rp for qemu-devel@nongnu.org; Fri, 14 Dec 2012 08:53:04 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBEDr2BI021065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Dec 2012 08:53:03 -0500 Message-ID: <50CB2F3D.7090204@redhat.com> Date: Fri, 14 Dec 2012 14:53:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1350545426-23172-1-git-send-email-quintela@redhat.com> <1350545426-23172-7-git-send-email-quintela@redhat.com> <50A0E123.4040406@redhat.com> <50A3B6E9.1020303@redhat.com> <87ehisg69s.fsf@elfo.mitica> In-Reply-To: <87ehisg69s.fsf@elfo.mitica> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/30] migration: stop all cpus correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: qemu-devel@nongnu.org Il 14/12/2012 13:36, Juan Quintela ha scritto: >>>> >>> - vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); >>>> >>> + if (old_vm_running) { >>>> >>> + vm_stop(RUN_STATE_FINISH_MIGRATE); >>>> >>> + } else { >>>> >>> + vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); >>>> >>> + } >>>> >>> >>>> >>> if (qemu_savevm_state_complete(s->file) < 0) { >>>> >>> migrate_fd_error(s); >> > >> > This hunk also seems to be useless nowadays. > it is needed for when we are migrating in suspended state. That was the case when the line read vm_stop(RUN_STATE_FINISH_MIGRATE); but it reads vm_stop_force_state. So you're being kind and not forcing the change if running, but that's not necessary. Just always using vm_stop_force_state works now, and would work with the migration thread too. Paolo