From patchwork Fri Jul 12 07:30:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 258706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E95002C0330 for ; Fri, 12 Jul 2013 17:31:31 +1000 (EST) Received: from localhost ([::1]:59398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXpB-0004xl-JC for incoming@patchwork.ozlabs.org; Fri, 12 Jul 2013 03:31:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXoY-0004fi-JV for qemu-devel@nongnu.org; Fri, 12 Jul 2013 03:30:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxXoR-0007aZ-Nu for qemu-devel@nongnu.org; Fri, 12 Jul 2013 03:30:50 -0400 Received: from mail-yh0-f50.google.com ([209.85.213.50]:56756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXoR-0007aQ-Hw for qemu-devel@nongnu.org; Fri, 12 Jul 2013 03:30:43 -0400 Received: by mail-yh0-f50.google.com with SMTP id i72so3600512yha.9 for ; Fri, 12 Jul 2013 00:30:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=iKUvIoBLd3SEM2yqQGh0QAjmqHcmOfxFcIIXRsTFL8M=; b=Q5W0OTgrcmkcYn3amiqpywUfJ5Bxmea14keg981/Zq16kkc3w8kosT1SefTPoVCiuk jg9RpX0uC2fk1VqSmbqTMSpCfj82vrZ6yqjPGM5wzPmUcNkxvuelGn5TR1KWoeFWY9FZ 4I8jbspLBI8oel4paCoa38FluyI3ykW1BGqGcRmHCr+e6gh6PDSbH33XMG9L37YL0aKW dP0NJcngCyu12iFA52O7bOPQGcNvImCTEzNjjDVNDkdHBhcRrPN0YDRgI60MjgvMKfii eMn24YsvWofNnpwxBBpn9asRKjcE/9g/sZ8KdB2aDinL1lrkmzgQKN1eA3AwMXiBSFLL XdAw== X-Received: by 10.236.28.112 with SMTP id f76mr23280969yha.93.1373614243142; Fri, 12 Jul 2013 00:30:43 -0700 (PDT) Received: from ka1.ozlabs.ibm.com (ibmaus65.lnk.telstra.net. [165.228.126.9]) by mx.google.com with ESMTPSA id e69sm66371951yhl.3.2013.07.12.00.30.39 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Jul 2013 00:30:42 -0700 (PDT) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Fri, 12 Jul 2013 17:30:17 +1000 Message-Id: <1373614220-14981-4-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1373614220-14981-1-git-send-email-aik@ozlabs.ru> References: <1373614220-14981-1-git-send-email-aik@ozlabs.ru> X-Gm-Message-State: ALoCoQlfLT3d+/RPvH6a8doztjahQgZxP0KGwkyPhwVcb5WS4iZj/UIwtG4cfP/p1ln5h4EcQbuS X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.213.50 Cc: Anthony Liguori , aik@ozlabs.ru, Alexander Graf , qemu-ppc@nongnu.org, Paul Mackerras , David Gibson Subject: [Qemu-devel] [PATCH 3/6] pseries: savevm support for PAPR VIO logical tty X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Alexey Kardashevskiy --- 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 = {