summaryrefslogtreecommitdiff
path: root/hw/ide/pci.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2011-05-26 15:00:34 +0200
committerKevin Wolf <kwolf@redhat.com>2011-06-15 14:36:15 +0200
commitdef93791f22a3536c3508244ec7d270098484c7d (patch)
treed2730ee2e84d06a24048e8d1abbe937207b60824 /hw/ide/pci.h
parent9e2a3701a1fcfec0316b9dc1a6cd62869de5542c (diff)
downloadqemu-def93791f22a3536c3508244ec7d270098484c7d.tar.gz
ide: Split error status from status register
When adding the werror=stop mode, some flags were added to s->status which are used to determine what kind of operation should be restarted when the VM is continued. Unfortunately, it turns out that s->status is in fact a device register and as such is visible to the guest (some of the abused bits are even writable for the guest). For migration we keep on using the old VMState field (renamed to migration_compat_status) if the status register doesn't use any of the previously abused bits. If it does, we use a subsection with a clean copy of the status register. The error status is always sent in a subsection if there is any error. It can't use the old field because errors happen even without PCI. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/pci.h')
-rw-r--r--hw/ide/pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ide/pci.h b/hw/ide/pci.h
index cd72cbaeb9..b4f3691a5c 100644
--- a/hw/ide/pci.h
+++ b/hw/ide/pci.h
@@ -22,6 +22,10 @@ typedef struct BMDMAState {
IORange addr_ioport;
QEMUBH *bh;
qemu_irq irq;
+
+ /* Bit 0-2 and 7: BM status register
+ * Bit 3-6: bus->error_status */
+ uint8_t migration_compat_status;
} BMDMAState;
typedef struct PCIIDEState {