qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix VMSTATE_PCI_DEVICE version
@ 2009-09-09  7:46 Juan Quintela
  0 siblings, 0 replies; only message in thread
From: Juan Quintela @ 2009-09-09  7:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

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>
---
 hw/hw.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/hw/hw.h b/hw/hw.h
index 0ae4000..a0cb94e 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -408,7 +408,6 @@ extern const VMStateDescription vmstate_pci_device;

 #define VMSTATE_PCI_DEVICE(_field, _state) {                         \
     .name       = (stringify(_field)),                               \
-    .version_id = 2,                                                 \
     .size       = sizeof(PCIDevice),                                 \
     .vmsd       = &vmstate_pci_device,                               \
     .flags      = VMS_STRUCT,                                        \
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-09  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09  7:46 [Qemu-devel] [PATCH] Fix VMSTATE_PCI_DEVICE version Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).