[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] mac_dbdma: add DBDMA controller state to VMStat
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-devel] [PATCH 3/4] mac_dbdma: add DBDMA controller state to VMStateDescription |
Date: |
Wed, 6 Jan 2016 20:37:25 +0000 |
Make sure that we include the DBDMA controller state in the migration
stream.
Signed-off-by: Mark Cave-Ayland <address@hidden>
---
hw/misc/macio/mac_dbdma.c | 40 ++++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index 5ee8f02..161f49e 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -712,20 +712,52 @@ static const MemoryRegionOps dbdma_ops = {
},
};
-static const VMStateDescription vmstate_dbdma_channel = {
- .name = "dbdma_channel",
+static const VMStateDescription vmstate_dbdma_io = {
+ .name = "dbdma_io",
+ .version_id = 0,
+ .minimum_version_id = 0,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT64(addr, struct DBDMA_io),
+ VMSTATE_INT32(len, struct DBDMA_io),
+ VMSTATE_INT32(is_last, struct DBDMA_io),
+ VMSTATE_INT32(is_dma_out, struct DBDMA_io),
+ VMSTATE_BOOL(processing, struct DBDMA_io),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static const VMStateDescription vmstate_dbdma_cmd = {
+ .name = "dbdma_cmd",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
+ VMSTATE_UINT16(req_count, dbdma_cmd),
+ VMSTATE_UINT16(command, dbdma_cmd),
+ VMSTATE_UINT32(phy_addr, dbdma_cmd),
+ VMSTATE_UINT32(cmd_dep, dbdma_cmd),
+ VMSTATE_UINT16(res_count, dbdma_cmd),
+ VMSTATE_UINT16(xfer_status, dbdma_cmd),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static const VMStateDescription vmstate_dbdma_channel = {
+ .name = "dbdma_channel",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField[]) {
VMSTATE_UINT32_ARRAY(regs, struct DBDMA_channel, DBDMA_REGS),
+ VMSTATE_STRUCT(io, struct DBDMA_channel, 0, vmstate_dbdma_io,
DBDMA_io),
+ VMSTATE_STRUCT(current, struct DBDMA_channel, 0, vmstate_dbdma_cmd,
+ dbdma_cmd),
VMSTATE_END_OF_LIST()
}
};
static const VMStateDescription vmstate_dbdma = {
.name = "dbdma",
- .version_id = 2,
- .minimum_version_id = 2,
+ .version_id = 3,
+ .minimum_version_id = 3,
.fields = (VMStateField[]) {
VMSTATE_STRUCT_ARRAY(channels, DBDMAState, DBDMA_CHANNELS, 1,
vmstate_dbdma_channel, DBDMA_channel),
--
1.7.10.4
- [Qemu-devel] [PATCH 0/4] ppc: loadvm/savevm fixups for macio/DBDMA, Mark Cave-Ayland, 2016/01/06
- [Qemu-devel] [PATCH 3/4] mac_dbdma: add DBDMA controller state to VMStateDescription,
Mark Cave-Ayland <=
- [Qemu-devel] [PATCH 4/4] cuda: add missing fields to VMStateDescription, Mark Cave-Ayland, 2016/01/06
- [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, Mark Cave-Ayland, 2016/01/06
- Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, John Snow, 2016/01/06
- Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, Mark Cave-Ayland, 2016/01/06
- Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, John Snow, 2016/01/08
- Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, Mark Cave-Ayland, 2016/01/11
- Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, John Snow, 2016/01/14
- Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription, Mark Cave-Ayland, 2016/01/14
[Qemu-devel] [PATCH 1/4] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb, Mark Cave-Ayland, 2016/01/06