From ec934266fdb21c1791163e5d8ccc1632b667045d Mon Sep 17 00:00:00 2001 From: Viktor Prutyanov Date: Mon, 26 Jun 2023 12:12:58 +0300 Subject: [PATCH] virtio-net: pass Device-TLB enable/disable events to vhost 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 Acked-by: Jason Wang Message-Id: <20230626091258.24453-3-viktor@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit cd9b8346884353ba9ae6560b44b7cccdf00a6633) Signed-off-by: Michael Tokarev --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 4abd49e298c..8cd7a400a07 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3888,6 +3888,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 = { -- 2.39.5