Exemple #1
0
static void common_unbind(struct common *c)
{
    xen_pv_unbind_evtchn(&c->xendev);
    if (c->page) {
        xenforeignmemory_unmap(xen_fmem, c->page, 1);
	c->page = NULL;
    }
}
Exemple #2
0
static void con_disconnect(struct XenDevice *xendev)
{
    struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);

    qemu_chr_fe_deinit(&con->chr, false);
    xen_pv_unbind_evtchn(&con->xendev);

    if (con->sring) {
        if (!xendev->dev) {
            xenforeignmemory_unmap(xen_fmem, con->sring, 1);
        } else {
            xengnttab_unmap(xendev->gnttabdev, con->sring, 1);
        }
        con->sring = NULL;
    }
}