From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeQ5W-0002NU-T0 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:07:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeQ5S-0002Jq-B6 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:07:10 -0400 Received: from [199.232.76.173] (port=60558 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeQ5R-0002Jg-Ug for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:07:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36281) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeQ5Q-0005ri-EP for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:07:05 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7L970TT000569 for ; Fri, 21 Aug 2009 05:07:00 -0400 From: Juan Quintela In-Reply-To: <4A8E5BAB.4070409@redhat.com> (Gerd Hoffmann's message of "Fri, 21 Aug 2009 10:32:43 +0200") References: <101b7fd66dd59c7655b257eb8dd438175f5232b6.1250788880.git.quintela@redhat.com> <4A8E5BAB.4070409@redhat.com> Date: Fri, 21 Aug 2009 11:04:46 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Gerd Hoffmann Cc: qemu-devel@nongnu.org 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 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). Having an initial size makes things go away. And then, I will create the VMSTATE_VARRAY() that handles the two fields in one go. Later, Juan. > cheers, > Gerd