]> xenbits.xensource.com Git - qemu-xen-4.5-testing.git/commitdiff
qemu-xen: ignore console disconnect events for console/0
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 1 Mar 2012 18:58:27 +0000 (18:58 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 1 Mar 2012 18:58:27 +0000 (18:58 +0000)
The first console has a different location compared to other PV devices
(console, rather than device/console/0) and doesn't obey the xenstore
state protocol. We already special case the first console in con_init
and con_initialise, we should also do it in con_disconnect.

This patch should be applied to 4.1 too.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen_console.c

index d7099c4e389afde8d855e10719979fd9246c8c44..8d1413156bb157576c33638c95896a927f393d94 100644 (file)
@@ -253,6 +253,8 @@ static void con_disconnect(struct XenDevice *xendev)
 {
     struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
 
+    if (!xendev->dev)
+        return;
     if (con->chr)
         qemu_chr_add_handlers(con->chr, NULL, NULL, NULL, NULL);
     xen_be_unbind_evtchn(&con->xendev);