From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3Tm7-0001Cz-Nz for qemu-devel@nongnu.org; Wed, 06 Oct 2010 09:11:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3TXC-0003gx-JI for qemu-devel@nongnu.org; Wed, 06 Oct 2010 08:55:51 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:38327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3TXC-0003gn-BH for qemu-devel@nongnu.org; Wed, 06 Oct 2010 08:55:50 -0400 Received: by pwj4 with SMTP id 4so2304270pwj.4 for ; Wed, 06 Oct 2010 05:55:49 -0700 (PDT) Message-ID: <4CAC71D3.9090801@codemonkey.ws> Date: Wed, 06 Oct 2010 07:55:47 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20101005202556.12739.14080.stgit@s20.home> <4CAB8D81.50109@codemonkey.ws> <1286311569.3136.39.camel@x201> <4CAB8F48.1050702@codemonkey.ws> <1286312317.3136.45.camel@x201> <1286332177.3136.51.camel@x201> In-Reply-To: <1286332177.3136.51.camel@x201> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC PATCH 0/5] Save state error handling (kill off no_migrate) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: cam@cs.ualberta.ca, qemu-devel@nongnu.org, quintela@redhat.com On 10/05/2010 09:29 PM, Alex Williamson wrote: > On Tue, 2010-10-05 at 14:58 -0600, Alex Williamson wrote: > >> On Tue, 2010-10-05 at 15:49 -0500, Anthony Liguori wrote: >> >>> On 10/05/2010 03:46 PM, Alex Williamson wrote: >>> >>>> On Tue, 2010-10-05 at 15:41 -0500, Anthony Liguori wrote: >>>> >>>> >>>>> On 10/05/2010 03:35 PM, Alex Williamson wrote: >>>>> >>>>> >>>>>> I was thinking of making KVM VMs with assigned PCI devices >>>>>> unsavable/unmigratable, but I wasn't thrilled with the >>>>>> no_migrate solutions. The more generic solutions seems to be >>>>>> simply letting save handlers return an error if the device can't >>>>>> be migrated. This is also much more generic than a one-way >>>>>> bit flip of the no_migrate flag. For a vmsd based registration, >>>>>> the pre_save() routine seems to be the right place to allow >>>>>> devices to abort. The series also carries the error back through >>>>>> all the vmstate callers. If this looks good, I'll give it some >>>>>> more testing and submit as non-RFC. Thanks, >>>>>> >>>>>> >>>>>> >>>>> Doesn't this mean that we don't fail the migration until after >>>>> transferring all of the memory contents? >>>>> >>>>> >>>> That's the case with the current no_migrate implementation too, it >>>> doesn't get called until qemu_savevm_state_complete(). Thanks, >>>> >>>> >>> Ouch, that's unfortunate but also should be easily fixable. >>> >>> But making a save handler fail seems would make it impossible to get >>> instant failure semantics. >>> >> True. Ok, so maybe we do still need a separate no migrate registration. >> In any case, I think it's a good idea to allow the save routines to have >> a failure path, but I'll work on a way to disable migration that's not >> quite so coupled with the savevm entry (it seems silly for device >> assignment to register a savevm only for the purpose of then registering >> as non-migratable). Thanks, >> > On second thought, I think we should take the same approach with the > live handlers. We just need to make SaveSetParamsHandler return an int > and check it and the SaveLiveStateHandler return for< 0. Then we have > a full spectrum of points at which a savevm handler can abort a > migration. If that sounds reasonable, I'll send a new series tomorrow. > Yes, makes sense to me. Regards, Anthony Liguori > Thanks, > > Alex > >