From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlOcY-0003Hh-MF for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:58:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlOcS-0003GT-VA for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:58:05 -0400 Received: from [199.232.76.173] (port=36783 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlOcS-0003GP-Or for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:58:00 -0400 Received: from mail-qy0-f198.google.com ([209.85.221.198]:41407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlOcS-0007Ad-CB for qemu-devel@nongnu.org; Wed, 09 Sep 2009 10:58:00 -0400 Received: by qyk35 with SMTP id 35so3623907qyk.14 for ; Wed, 09 Sep 2009 07:57:59 -0700 (PDT) Message-ID: <4AA7C272.3030807@codemonkey.ws> Date: Wed, 09 Sep 2009 09:57:54 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4AA7BEA7.6080906@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: The State of the SaveVM format List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" Juan Quintela wrote: >> if (version_id == 3) >> s->scancode_set=qemu_get_be32(f); >> else >> s->scancode_set=2; >> > > Problem here is this value, there is no way to set default values > different of zero. That is why there is still the old function. > We do this with qdev properties, certainly we could do it with savevm too? The advantage of doing this with savevm is that it potentially allows for the init and the reset functions to be simplified/eliminated. Even fields that are present in all versions should have the ability to have default values. In fact, semantically, a field should be zero unless a default value is specified. >> I think the discussion around optional features is orthogonal to how >> to support older savevm formats so let's keep it separate. I >> generally share your concern about test matrix explosion. >> > > Ok. I am trying to port all the pc.c stuff to new VMState without adding > more marshaling (we already have the old load functions). After I > finish with that, we can look at the remaining cases and look at a > course of action? > Sounds good to me. Regards, Anthony Liguori