]> Git Repo - qemu.git/commitdiff
ahci: Migrate IDEStatus
authorJohn Snow <[email protected]>
Mon, 23 Feb 2015 16:18:03 +0000 (11:18 -0500)
committerKevin Wolf <[email protected]>
Tue, 10 Mar 2015 13:02:23 +0000 (14:02 +0100)
Amazingly, we weren't doing this before.

Make sure we migrate the IDEState structure that belongs to
the AHCIDevice.IDEBus structure during migrations.

No version numbering changes because AHCI is not officially
migratable (and we can all see with good reason why) so we
do not impact any official builds by altering the stream and
leaving it at version 1.

This fixes the rerror=stop/werror=stop test case where we wish
to migrate a halted job. Previously, the error code would not
migrate, so even if the job completed successfully, AHCI would
report an error because it would still have the placeholder
error code from initialization time.

Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: John Snow <[email protected]>
Message-id: 1424708286[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
hw/ide/ahci.c
hw/ide/internal.h

index bc6d5cea5d0b6d5b6e3dc7b6b9bee04bd5df017a..3f4fc77ab6be794be19f918e1ea93e2977b56bca 100644 (file)
@@ -1321,6 +1321,7 @@ static const VMStateDescription vmstate_ahci_device = {
     .version_id = 1,
     .fields = (VMStateField[]) {
         VMSTATE_IDE_BUS(port, AHCIDevice),
+        VMSTATE_IDE_DRIVE(port.ifs[0], AHCIDevice),
         VMSTATE_UINT32(port_state, AHCIDevice),
         VMSTATE_UINT32(finished, AHCIDevice),
         VMSTATE_UINT32(port_regs.lst_addr, AHCIDevice),
index 0d5f881cea2ea81f3417fb2579c06020114ac831..965cc55cb81a8d64852aba4c382e8f106ccf3fac 100644 (file)
@@ -526,6 +526,9 @@ extern const VMStateDescription vmstate_ide_drive;
 #define VMSTATE_IDE_DRIVES(_field, _state) \
     VMSTATE_STRUCT_ARRAY(_field, _state, 2, 3, vmstate_ide_drive, IDEState)
 
+#define VMSTATE_IDE_DRIVE(_field, _state) \
+    VMSTATE_STRUCT(_field, _state, 1, vmstate_ide_drive, IDEState)
+
 void ide_bus_reset(IDEBus *bus);
 int64_t ide_get_sector(IDEState *s);
 void ide_set_sector(IDEState *s, int64_t sector_num);
This page took 0.032027 seconds and 4 git commands to generate.