[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 04/11] pseries: savevm support for PAPR VIO logical tt
From: |
Anthony Liguori |
Subject: |
[Qemu-ppc] [PATCH 04/11] pseries: savevm support for PAPR VIO logical tty |
Date: |
Mon, 15 Jul 2013 10:11:16 -0500 |
From: David Gibson <address@hidden>
This patch adds the necessary VMStateDescription information to support
savevm/loadvm for the spapr_tty (PAPR logical serial) device.
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
---
hw/char/spapr_vty.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 2993848..a799721 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -142,6 +142,21 @@ static Property spapr_vty_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
+static const VMStateDescription vmstate_spapr_vty = {
+ .name = "spapr_vty",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .minimum_version_id_old = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_SPAPR_VIO(sdev, VIOsPAPRVTYDevice),
+
+ VMSTATE_UINT32(in, VIOsPAPRVTYDevice),
+ VMSTATE_UINT32(out, VIOsPAPRVTYDevice),
+ VMSTATE_BUFFER(buf, VIOsPAPRVTYDevice),
+ VMSTATE_END_OF_LIST()
+ },
+};
+
static void spapr_vty_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -152,6 +167,7 @@ static void spapr_vty_class_init(ObjectClass *klass, void
*data)
k->dt_type = "serial";
k->dt_compatible = "hvterm1";
dc->props = spapr_vty_properties;
+ dc->vmsd = &vmstate_spapr_vty;
}
static const TypeInfo spapr_vty_info = {
--
1.8.0
[Qemu-ppc] [PATCH 06/11] pseries: rework PAPR virtual SCSI, Anthony Liguori, 2013/07/15
[Qemu-ppc] [PATCH 01/11] target-ppc: Convert ppc cpu savevm to VMStateDescription, Anthony Liguori, 2013/07/15