[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 14/17] ahci: Migrate IDEStatus
From: |
John Snow |
Subject: |
[Qemu-devel] [PATCH v2 14/17] ahci: Migrate IDEStatus |
Date: |
Tue, 16 Dec 2014 20:36:04 -0500 |
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.
Signed-off-by: John Snow <address@hidden>
---
hw/ide/ahci.c | 1 +
hw/ide/internal.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index bc6d5ce..3f4fc77 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -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),
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 0beba43..c278dea 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -524,6 +524,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);
--
1.9.3
- [Qemu-devel] [PATCH v2 07/17] ide: remove restart_cb callback, (continued)
- [Qemu-devel] [PATCH v2 07/17] ide: remove restart_cb callback, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 06/17] ide: move restart callback to common code, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 08/17] ide: replace set_unit callback with more IDEBus state, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 09/17] ide: place initial state of the current request to IDEBus, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 11/17] ide: commonize io_buffer_index initialization, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 10/17] ide: migrate initial request state via IDEBus, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 12/17] ide: make more functions static, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 13/17] ide: support PIO restart for the ISA controller, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 15/17] ahci: add support for restarting non-queued commands, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 14/17] ahci: Migrate IDEStatus,
John Snow <=
- [Qemu-devel] [PATCH v2 17/17] qtest/ide: Test flush / retry for ISA and PCI, John Snow, 2014/12/16
- [Qemu-devel] [PATCH v2 16/17] ahci: Recompute cur_cmd on migrate post load, John Snow, 2014/12/16
- Re: [Qemu-devel] [PATCH v2 00/17] ide: rerror and werror support for IDE and AHCI, Markus Armbruster, 2014/12/17