From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mdkhi-0000Tg-QT for qemu-devel@nongnu.org; Wed, 19 Aug 2009 08:55:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mdkhc-0000TT-Sn for qemu-devel@nongnu.org; Wed, 19 Aug 2009 08:55:49 -0400 Received: from [199.232.76.173] (port=56788 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mdkhc-0000TQ-OA for qemu-devel@nongnu.org; Wed, 19 Aug 2009 08:55:44 -0400 Received: from [66.187.237.31] (port=45628 helo=mx2.redhat.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mdkha-0007M1-V9 for qemu-devel@nongnu.org; Wed, 19 Aug 2009 08:55:43 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7JCtf7g005002 for ; Wed, 19 Aug 2009 08:55:41 -0400 Message-ID: <4A8BF649.5020009@redhat.com> Date: Wed, 19 Aug 2009 14:55:37 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <4A8BACBA.9020107@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH RFC 0/5] New VMState table based load/save infrastructure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org > void msix_save(PCIDevice *dev, QEMUFile *f) > { > unsigned n = dev->msix_entries_nr; > > qemu_put_buffer(f, dev->msix_table_page, n * MSIX_ENTRY_SIZE); > qemu_put_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8); > } > > msix_table_page is not NULL only if QEMU_PCI_CAP_MSIX is present. > I think that optional fields are needed, or a better way of dealing with > things like this. This effectively is a array with the length being determined at runtime (dev->msix_entries_nr). Without msi-x length is zero ;) But, yes, I think we will have to change driver code here and there to make it more vmstate friendly. cheers, Gerd