Signed-off-by: Alon Levy <[email protected]>
---
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;
}
--
1.8.1.4