Stefano Stabellini
2012-Feb-22 14:21 UTC
[PATCH] qemu-xen: ignore console disconnect events from console/0
qemu-xen: ignore console disconnect events for console/0
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>
diff --git a/hw/xen_console.c b/hw/xen_console.c
index 0a2374c..f036b8d 100644
--- a/hw/xen_console.c
+++ b/hw/xen_console.c
@@ -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);
Ian Jackson
2012-Mar-01 18:59 UTC
Re: [PATCH] qemu-xen: ignore console disconnect events from console/0
Stefano Stabellini writes ("[Xen-devel] [PATCH] qemu-xen: ignore console
disconnect events from console/0"):> qemu-xen: ignore console disconnect events for console/0
>
> 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.
I have applied this to qemu-xen-unstable.git. As usual, we should let
it cook there for a week or two before backporting it.
Thanks,
Ian.
Ian Jackson
2012-Mar-14 12:02 UTC
Re: [PATCH] qemu-xen: ignore console disconnect events from console/0
Ian Jackson writes ("Re: [Xen-devel] [PATCH] qemu-xen: ignore console
disconnect events from console/0"):> Stefano Stabellini writes ("[Xen-devel] [PATCH] qemu-xen: ignore
console disconnect events from console/0"):
> > qemu-xen: ignore console disconnect events for console/0
> >
> > 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.
>
> I have applied this to qemu-xen-unstable.git. As usual, we should let
> it cook there for a week or two before backporting it.
I have applied this to 4.1.
Thanks,
Ian.
Reasonably Related Threads
- [xen-unstable test] 12385: regressions - FAIL
- [xen-unstable test] 12252: regressions - FAIL
- [PATCHv2 1/2] Xen PV backend (for qemu-upstream-4.2-testing): Move call to bdrv_new from blk_init to blk_connect
- [PATCH v3] xen_disk: cope with missing xenstore "params" node
- [PATCH v2] xen_disk: cope with missing xenstore "params" node