From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB5gI-0002nE-Mv for qemu-devel@nongnu.org; Tue, 04 Oct 2011 10:09:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB5gH-0004SX-OP for qemu-devel@nongnu.org; Tue, 04 Oct 2011 10:09:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB5gH-0004SN-Gi for qemu-devel@nongnu.org; Tue, 04 Oct 2011 10:09:13 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p94E9CdJ006830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 Oct 2011 10:09:12 -0400 Message-ID: <4E8B137F.6060707@redhat.com> Date: Tue, 04 Oct 2011 16:09:03 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1317729885-17534-1-git-send-email-pbonzini@redhat.com> <20111004104914.5ab8a3df@doriath> In-Reply-To: <20111004104914.5ab8a3df@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] runstate: do not discard runstate changes when paused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org On 10/04/2011 03:49 PM, Luiz Capitulino wrote: > There's a semantic change which I'm not completely sure it won't generate > unexpected side-effects: today vm_stop() will only carry any action if the > machine is running, otherwise it's no-op. This patch changes that. More or less, yes. I tried to limit the semantic change by not running notifiers, which again could be better or worse. I don't think adding a new transition is a good solution, because you'll have to add a transition from PAUSED to anything that uses runstate_set instead of vm_stop. However, you could change all vm_stop() to vm_stop(RSTATE_PAUSED) followed by runstate_set(), adjust the transition table consequently and possibly drop the argument to vm_stop. I tried to get the smallest patch, but I did need to follow-up with changes to the transition table. In any case, can I assume this to be in your hands now? :) Paolo