All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-traditional: Bump piix4acpi save-record version_id
@ 2013-12-16 14:00 Andrew Cooper
  2013-12-16 14:47 ` Ian Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cooper @ 2013-12-16 14:00 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell

Sadly, because of a buggy attempt to revert c/s
ce3b7ce68426ea6249bb411f26b376d459c45450 (piix4acpi, xen: change in ACPI to
match the change in the BIOS) "for debugging purposes" which has remained
present in XenServer for several releases, an incompatibility in the Qemu save
record went unnoticed until now when I tried to clean up the patch queue.

The result is that save-records for XenServer 6.0 to 6.2 advertise a piix4acpi
record of version 2, but with the content of version 1 record (also corrupting
everything later in the stream, but as this is the last record and qemu doesn't
care about junk in the end of the record, this went completely unnoticed).

While this can of-course be fixed by us locally, reserving version_id 3
upstream is the only way to prevent further incompatibilities if/when the
piix4acpi object gets further development/bugfixes which require a change to
the save-record.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 hw/piix4acpi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/piix4acpi.c b/hw/piix4acpi.c
index ddbe8e0..1e356f0 100644
--- a/hw/piix4acpi.c
+++ b/hw/piix4acpi.c
@@ -157,7 +157,7 @@ static int piix4acpi_load(QEMUFile *f, void *opaque, int version_id)
     int ret;
     uint32_t pm1a_evt_address_assigned;
 
-    if (version_id > 2)
+    if (version_id > 3)
         return -EINVAL;
     ret = pci_device_load(&s->dev, f);
     if (ret < 0)
@@ -778,7 +778,7 @@ i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
 #endif
     register_ioport_write(ACPI_DBG_IO_ADDR, 4, 1, acpi_dbg_writeb, d);
 
-    register_savevm("piix4acpi", 0, 2, piix4acpi_save, piix4acpi_load, d);
+    register_savevm("piix4acpi", 0, 3, piix4acpi_save, piix4acpi_load, d);
 
     return NULL;
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-17 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 14:00 [PATCH] qemu-traditional: Bump piix4acpi save-record version_id Andrew Cooper
2013-12-16 14:47 ` Ian Jackson
2013-12-16 15:32   ` Andrew Cooper
2013-12-16 16:23     ` Ian Jackson
2013-12-16 17:35       ` Andrew Cooper
2013-12-17 14:43         ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.