mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
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>
This commit is contained in:
parent
9e2a3701a1
commit
def93791f2
4 changed files with 105 additions and 8 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue