]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
virtio-net: pass Device-TLB enable/disable events to vhost
authorViktor Prutyanov <viktor@daynix.com>
Mon, 26 Jun 2023 09:12:58 +0000 (12:12 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 10 Jul 2023 19:07:50 +0000 (15:07 -0400)
If vhost is enabled for virtio-net, Device-TLB enable/disable events
must be passed to vhost for proper IOMMU unmap flag selection.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230626091258.24453-3-viktor@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c

index 04783f5b9472ee8d9fffa40b7bc8376bbb303b68..d51067123b60399085feebbc6da900c94ce23426 100644 (file)
@@ -3951,6 +3951,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
     vdc->vmsd = &vmstate_virtio_net_device;
     vdc->primary_unplug_pending = primary_unplug_pending;
     vdc->get_vhost = virtio_net_get_vhost;
+    vdc->toggle_device_iotlb = vhost_toggle_device_iotlb;
 }
 
 static const TypeInfo virtio_net_info = {