From patchwork Wed Mar 20 09:55:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 229303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 14F902C0091 for ; Wed, 20 Mar 2013 20:59:32 +1100 (EST) Received: from localhost ([::1]:48600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFnu-0003Ib-CI for incoming@patchwork.ozlabs.org; Wed, 20 Mar 2013 05:59:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFk0-0005us-6M for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIFjy-0002Bu-3G for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFjx-0002BN-R6 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:25 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2K9tPOm007138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Mar 2013 05:55:25 -0400 Received: from localhost.localdomain (vpn1-4-179.ams2.redhat.com [10.36.4.179]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2K9tFGK019828; Wed, 20 Mar 2013 05:55:23 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Wed, 20 Mar 2013 11:55:13 +0200 Message-Id: <1363773314-32332-4-git-send-email-alevy@redhat.com> In-Reply-To: <1363773314-32332-1-git-send-email-alevy@redhat.com> References: <1363773314-32332-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: amit.shah@redhat.com, hdegoede@redhat.com, aliguori@us.ibm.com, kraxel@redhat.com Subject: [Qemu-devel] [PATCH 3/4] virtio-console: implement post_load to call to qemu_chr_fe_post_load 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 Signed-off-by: Alon Levy --- hw/virtio-console.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index e2d1c58..a6ff2f7 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -88,6 +88,16 @@ static void guest_close(VirtIOSerialPort *port) qemu_chr_fe_close(vcon->chr); } +static void post_load(VirtIOSerialPort *port) +{ + VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port); + + if (!vcon->chr) { + return; + } + qemu_chr_fe_post_load(vcon->chr, port->guest_connected); +} + /* Readiness of the guest to accept data on a port */ static int chr_can_read(void *opaque) { @@ -177,6 +187,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data) k->have_data = flush_buf; k->guest_open = guest_open; k->guest_close = guest_close; + k->post_load = post_load; dc->props = virtserialport_properties; }