diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/vhost_net.c | 12 | ||||
-rw-r--r-- | hw/net/virtio-net.c | 4 | ||||
-rw-r--r-- | hw/scsi/vhost-scsi.c | 2 | ||||
-rw-r--r-- | hw/virtio/vhost.c | 14 |
4 files changed, 3 insertions, 29 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f505c91d42..9bd360bd17 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -163,7 +163,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options) net->dev.vq_index = net->nc->queue_index; r = vhost_dev_init(&net->dev, options->opaque, - options->backend_type, options->force); + options->backend_type); if (r < 0) { goto fail; } @@ -188,11 +188,6 @@ fail: return NULL; } -bool vhost_net_query(VHostNetState *net, VirtIODevice *dev) -{ - return vhost_dev_query(&net->dev, dev); -} - static void vhost_net_set_vq_index(struct vhost_net *net, int vq_index) { net->dev.vq_index = vq_index; @@ -424,11 +419,6 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options) return NULL; } -bool vhost_net_query(VHostNetState *net, VirtIODevice *dev) -{ - return false; -} - int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9281aa107c..d7282335de 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -128,10 +128,6 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status) if (!n->vhost_started) { int r, i; - if (!vhost_net_query(get_vhost_net(nc->peer), vdev)) { - return; - } - /* Any packets outstanding? Purge them to avoid touching rings * when vhost is running. */ diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 1941aa15c0..1c389c4d7e 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -246,7 +246,7 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp) s->dev.backend_features = 0; ret = vhost_dev_init(&s->dev, (void *)(uintptr_t)vhostfd, - VHOST_BACKEND_TYPE_KERNEL, true); + VHOST_BACKEND_TYPE_KERNEL); if (ret < 0) { error_setg(errp, "vhost-scsi: vhost initialization failed: %s", strerror(-ret)); diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 7ea45b391c..b84d21cf7e 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -898,7 +898,7 @@ static void vhost_virtqueue_cleanup(struct vhost_virtqueue *vq) } int vhost_dev_init(struct vhost_dev *hdev, void *opaque, - VhostBackendType backend_type, bool force) + VhostBackendType backend_type) { uint64_t features; int i, r; @@ -961,7 +961,6 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, hdev->started = false; hdev->memory_changed = false; memory_listener_register(&hdev->memory_listener, &address_space_memory); - hdev->force = force; return 0; fail_vq: while (--i >= 0) { @@ -989,17 +988,6 @@ void vhost_dev_cleanup(struct vhost_dev *hdev) hdev->vhost_ops->vhost_backend_cleanup(hdev); } -bool vhost_dev_query(struct vhost_dev *hdev, VirtIODevice *vdev) -{ - BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vdev))); - VirtioBusState *vbus = VIRTIO_BUS(qbus); - VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus); - - return !k->query_guest_notifiers || - k->query_guest_notifiers(qbus->parent) || - hdev->force; -} - /* Stop processing guest IO notifications in qemu. * Start processing them in vhost in kernel. */ |