From c60ac50bbdeaa049ac34a4508b79eed9d6efaff3 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 21 Jun 2011 17:58:47 +0100 Subject: [PATCH] qemu-xen: fix unmapping logic in hw/xen_console.c. Signed-off-by: Wei Liu Acked-by: Stefano Stabellini --- hw/xen_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen_console.c b/hw/xen_console.c index 0a2374c8d..d7099c4e3 100644 --- a/hw/xen_console.c +++ b/hw/xen_console.c @@ -258,7 +258,7 @@ static void con_disconnect(struct XenDevice *xendev) xen_be_unbind_evtchn(&con->xendev); if (con->sring) { - if (!xendev->dev) + if (!xendev->gnttabdev) munmap(con->sring, XC_PAGE_SIZE); else xc_gnttab_munmap(xendev->gnttabdev, con->sring, 1); -- 2.39.5