Revision 5430a28f hw/vhost.c

b/hw/vhost.c
581 581
                              0, virtio_queue_get_desc_size(vdev, idx));
582 582
}
583 583

  
584
int vhost_dev_init(struct vhost_dev *hdev, int devfd)
584
int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
585 585
{
586 586
    uint64_t features;
587 587
    int r;
......
613 613
    hdev->log_enabled = false;
614 614
    hdev->started = false;
615 615
    cpu_register_phys_memory_client(&hdev->client);
616
    hdev->force = force;
616 617
    return 0;
617 618
fail:
618 619
    r = -errno;
......
627 628
    close(hdev->control);
628 629
}
629 630

  
631
bool vhost_dev_query(struct vhost_dev *hdev, VirtIODevice *vdev)
632
{
633
    return !vdev->binding->query_guest_notifiers ||
634
        vdev->binding->query_guest_notifiers(vdev->binding_opaque) ||
635
        hdev->force;
636
}
637

  
630 638
int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)
631 639
{
632 640
    int i, r;

Also available in: Unified diff