static void input_disconnect(struct XenDevice *xendev) { struct XenInput *in = container_of(xendev, struct XenInput, c.xendev); if (in->qmouse) { qemu_remove_mouse_event_handler(in->qmouse); in->qmouse = NULL; } qemu_add_kbd_event_handler(NULL, NULL); common_unbind(&in->c); }
static void input_disconnect(struct XenDevice *xendev) { struct XenInput *in = container_of(xendev, struct XenInput, c.xendev); if (in->qkbd) { qemu_input_handler_unregister(in->qkbd); in->qkbd = NULL; } if (in->qmou) { qemu_input_handler_unregister(in->qmou); in->qmou = NULL; } common_unbind(&in->c); }
static void fb_disconnect(struct XenDevice *xendev) { struct XenFB *fb = container_of(xendev, struct XenFB, c.xendev); /* * FIXME: qemu can't un-init gfx display (yet?). * Replacing the framebuffer with anonymous shared memory * instead. This releases the guest pages and keeps qemu happy. */ fb->pixels = mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); common_unbind(&fb->c); fb->feature_update = 0; fb->bug_trigger = 0; }
static void fb_disconnect(struct XenDevice *xendev) { struct XenFB *fb = container_of(xendev, struct XenFB, c.xendev); /* * FIXME: qemu can't un-init gfx display (yet?). * Replacing the framebuffer with anonymous shared memory * instead. This releases the guest pages and keeps qemu happy. */ xenforeignmemory_unmap(xen_fmem, fb->pixels, fb->fbpages); fb->pixels = mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); if (fb->pixels == MAP_FAILED) { xen_be_printf(xendev, 0, "Couldn't replace the framebuffer with anonymous memory errno=%d\n", errno); } common_unbind(&fb->c); fb->feature_update = 0; fb->bug_trigger = 0; }