From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeQLM-0006P7-1w for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:23:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeQLH-0006Nn-AZ for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:23:31 -0400 Received: from [199.232.76.173] (port=41768 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeQLH-0006Nk-1X for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:23:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30697) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeQLG-0001rN-IL for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:23:26 -0400 Received: from int-mx07.intmail.prod.int.phx2.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7L9NPGg004265 for ; Fri, 21 Aug 2009 05:23:25 -0400 Message-ID: <4A8E6784.1040700@redhat.com> Date: Fri, 21 Aug 2009 11:23:16 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <101b7fd66dd59c7655b257eb8dd438175f5232b6.1250788880.git.quintela@redhat.com> <4A8E5BAB.4070409@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 16/23] Port PCI Bus to VMState design List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 08/21/09 11:04, Juan Quintela wrote: > Gerd Hoffmann wrote: >> On 08/20/09 19:42, Juan Quintela wrote: >>> This uses VARRAY and INT32_EQUAL values >> This is one place where I would change the code to reduce load/save >> complexity. >> >> Quick grep shows that the max value for bus->nirqs is >> 32. s/*irq_count/irq_count[32]/ for PCIBus, drop dynamic allocation >> and allways save/load 32 values. INT32_EQUAL + VARRAY isn't needed >> then. > > I agree to drop INT32_EQUAL, but maintain the VARRAY. > VARRAY is nice if there is another field in the stuct that tolds you how > many are used. If you save all of them anyway you don't need that. (but you still must save the bus->nirqs field obviously). > If you change the 32 number, you just need to upgrade the version. > Will do something like that. > > The reason that I don't want to send the whole thing is that there are > times when we are sending tables that are empty (devices not being > used). I still would save it. If you find a NULL pointer save a bunch of zeros instead. Device state isn't that big, and I think it is good to have fixed-size sections. cheers Gerd