Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MntbI-0002y1-ST for qemu-devel@nongnu.org; Wed, 16 Sep 2009 08:27:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MntbD-0002s1-Lt for qemu-devel@nongnu.org; Wed, 16 Sep 2009 08:27:07 -0400 Received: from [199.232.76.173] (port=38500 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MntbD-0002rs-9j for qemu-devel@nongnu.org; Wed, 16 Sep 2009 08:27:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1749) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MntbC-0006DD-Nx for qemu-devel@nongnu.org; Wed, 16 Sep 2009 08:27:03 -0400 From: Juan Quintela In-Reply-To: <20090916121818.GA4710@redhat.com> (Michael S. Tsirkin's message of "Wed, 16 Sep 2009 15:18:18 +0300") References: <20090916104620.GA4456@redhat.com> <20090916111845.GJ23157@redhat.com> <20090916115224.GA4628@redhat.com> <20090916121818.GA4710@redhat.com> Date: Wed, 16 Sep 2009 14:26:58 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: optional feature List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Gleb Natapov "Michael S. Tsirkin" wrote: > On Wed, Sep 16, 2009 at 02:14:32PM +0200, Juan Quintela wrote: >> >> See below, we are changing the state to one table, and tables don't have >> >> neither if's or whiles (we have a limited for that just walks arrays). >> > >> > Let's just bite the bullet and add support for if's? It's not like it's >> > hard to invent 'struct vmstate_condition' or some such. >> >> I have to do it. The problem is not adding an optional field, is adding >> it conditionally on _what_, and that _what_ should also be ideally on vmstate. >> >> Later, Juan. > > pci config is on vmstate already, I don't see a problem here. vmstate don't understand pci config. I want to manipulate images with the informantion that you have given vmstate. Sending another byte meaning: msix_enabled and now depending on that value another field is ok with me. You can calculate msix_enable at pre_save time whenever way that you see fit. What vmstate needs is a only to now if msix_enable is 0 or 1, how you calculate it, VMState don't care. Later, Juan.