summaryrefslogtreecommitdiff
path: root/hw/ide/internal.h
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-02-23 11:18:03 -0500
committerKevin Wolf <kwolf@redhat.com>2015-03-10 14:02:23 +0100
commitbd6649101d044df446c66949cb6c1462c8989726 (patch)
tree7f4783b5d776e8f01e13eab40acfba57656865f7 /hw/ide/internal.h
parentd32c76b3add2cb5216ae6931ef06632b802a6f68 (diff)
downloadqemu-bd6649101d044df446c66949cb6c1462c8989726.tar.gz
qemu-bd6649101d044df446c66949cb6c1462c8989726.tar.bz2
qemu-bd6649101d044df446c66949cb6c1462c8989726.zip
ahci: Migrate IDEStatus
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 <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1424708286-16483-15-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/internal.h')
-rw-r--r--hw/ide/internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 0d5f881cea..965cc55cb8 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -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);