[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH RFC 0/5] New VMState table based load/save infra
[Qemu-devel] Re: [PATCH RFC 0/5] New VMState table based load/save infrastructure
Wed, 19 Aug 2009 14:55:37 +0200
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2
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.
Re: [Qemu-devel] [PATCH RFC 0/5] New VMState table based load/save infrastructure, Gerd Hoffmann, 2009/08/19