mirror of https://github.com/xqemu/xqemu.git
Fix VMSTATE_PCI_DEVICE version
PCI device entries have to have a default version, not 2, because they are used in the midle of other structures that can have _any_ version number. We can't use proper versioning here until we have SubSections support. Why we didn't noticed before? Because in a PC, the only device ported with a version less that 2 is piix_pm, and for that one, default pci values are right. If you use a virtio-console, you will see that its state it is not loaded back. Thanks to Amit Shah for reporting the problem and help debug the fix. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
733318ea9c
commit
13f5545daa
1
hw/hw.h
1
hw/hw.h
|
@ -408,7 +408,6 @@ extern const VMStateDescription vmstate_pci_device;
|
||||||
|
|
||||||
#define VMSTATE_PCI_DEVICE(_field, _state) { \
|
#define VMSTATE_PCI_DEVICE(_field, _state) { \
|
||||||
.name = (stringify(_field)), \
|
.name = (stringify(_field)), \
|
||||||
.version_id = 2, \
|
|
||||||
.size = sizeof(PCIDevice), \
|
.size = sizeof(PCIDevice), \
|
||||||
.vmsd = &vmstate_pci_device, \
|
.vmsd = &vmstate_pci_device, \
|
||||||
.flags = VMS_STRUCT, \
|
.flags = VMS_STRUCT, \
|
||||||
|
|
Loading…
Reference in New Issue