[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 4/8] pseries: savevm support for VIO devices
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 4/8] pseries: savevm support for VIO devices |
Date: |
Fri, 3 May 2013 11:38:08 +1000 |
This patch adds helpers to allow PAPR VIO devices to save state common
to all VIO devices during savevm.
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_vio.c | 20 ++++++++++++++++++++
include/hw/ppc/spapr_vio.h | 5 +++++
2 files changed, 25 insertions(+)
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 1405c32..d13a15b 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -543,6 +543,26 @@ static const TypeInfo spapr_vio_bridge_info = {
.class_init = spapr_vio_bridge_class_init,
};
+const VMStateDescription vmstate_spapr_vio = {
+ .name = "spapr_vio",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .minimum_version_id_old = 1,
+ .fields = (VMStateField []) {
+ /* Sanity check */
+ VMSTATE_UINT32_EQUAL(reg, VIOsPAPRDevice),
+ VMSTATE_UINT32_EQUAL(irq, VIOsPAPRDevice),
+
+ /* General VIO device state */
+ VMSTATE_UINTTL(signal_state, VIOsPAPRDevice),
+ VMSTATE_UINT64(crq.qladdr, VIOsPAPRDevice),
+ VMSTATE_UINT32(crq.qsize, VIOsPAPRDevice),
+ VMSTATE_UINT32(crq.qnext, VIOsPAPRDevice),
+
+ VMSTATE_END_OF_LIST()
+ },
+};
+
static void vio_spapr_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h
index f98ec0a..01ad26c 100644
--- a/include/hw/ppc/spapr_vio.h
+++ b/include/hw/ppc/spapr_vio.h
@@ -133,4 +133,9 @@ VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus);
void spapr_vio_quiesce(void);
+extern const VMStateDescription vmstate_spapr_vio;
+
+#define VMSTATE_SPAPR_VIO(_f, _s) \
+ VMSTATE_STRUCT(_f, _s, 0, vmstate_spapr_vio, VIOsPAPRDevice)
+
#endif /* _HW_SPAPR_VIO_H */
--
1.7.10.4
- [Qemu-ppc] [0/8] pseries: savevm / migration support, David Gibson, 2013/05/02
- [Qemu-ppc] [PATCH 1/8] savevm: Implement VMS_DIVIDE flag, David Gibson, 2013/05/02
- [Qemu-ppc] [PATCH 4/8] pseries: savevm support for VIO devices,
David Gibson <=
- [Qemu-ppc] [PATCH 6/8] pseries: savevm support for PAPR TCE tables, David Gibson, 2013/05/02
- [Qemu-ppc] [PATCH 5/8] pseries: savevm support for PAPR VIO logical lan, David Gibson, 2013/05/02
- [Qemu-ppc] [PATCH 3/8] pseries: savevm support for XICS interrupt controller, David Gibson, 2013/05/02
- [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, David Gibson, 2013/05/02
- Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, Paolo Bonzini, 2013/05/06
- Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, David Gibson, 2013/05/06
- Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, Alexey Kardashevskiy, 2013/05/27
- Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, Paolo Bonzini, 2013/05/27
- Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, Alexey Kardashevskiy, 2013/05/31
- Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI, Paolo Bonzini, 2013/05/31