]> xenbits.xensource.com Git - qemu-xen.git/commit
vhost: register and change IOMMU flag depending on Device-TLB state
authorViktor Prutyanov <viktor@daynix.com>
Mon, 26 Jun 2023 09:12:57 +0000 (12:12 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 31 Jul 2023 06:10:51 +0000 (09:10 +0300)
commit8eed78e2bff8151f92c4e715a5f9674de56cdf06
tree3823678a067d4d8a3723e6aea5b1f3c650f3e196
parent5f3fe5657d820bd4b1055eface0d9805ec6005e6
vhost: register and change IOMMU flag depending on Device-TLB state

The guest can disable or never enable Device-TLB. In these cases,
it can't be used even if enabled in QEMU. So, check Device-TLB state
before registering IOMMU notifier and select unmap flag depending on
that. Also, implement a way to change IOMMU notifier flag if Device-TLB
state is changed.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2001312
Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230626091258.24453-2-viktor@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit ee071f67f7a103c66f85f68ffe083712929122e3)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/virtio/vhost-stub.c
hw/virtio/vhost.c
include/hw/virtio/vhost.h