Received: from eggs.gnu.org ([2001:4830:134:3::10]:40453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UykRj-0006RV-6g for qemu-devel@nongnu.org; Mon, 15 Jul 2013 11:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UykRc-0002Ws-MX for qemu-devel@nongnu.org; Mon, 15 Jul 2013 11:12:15 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:55118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UykRc-0002Wc-Gy for qemu-devel@nongnu.org; Mon, 15 Jul 2013 11:12:08 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Jul 2013 11:12:08 -0400 From: Anthony Liguori Date: Mon, 15 Jul 2013 10:11:16 -0500 Message-Id: <1373901083-18730-5-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1373901083-18730-1-git-send-email-aliguori@us.ibm.com> References: <1373901083-18730-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 04/11] pseries: savevm support for PAPR VIO logical tty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Paolo Bonzini , qemu-ppc@nongnu.org, David Gibson From: David Gibson This patch adds the necessary VMStateDescription information to support savevm/loadvm for the spapr_tty (PAPR logical serial) device. Signed-off-by: David Gibson Reviewed-by: Anthony Liguori --- 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