]> xenbits.xensource.com Git - qemu-xen.git/commit
vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM
authorJason Wang <jasowang@redhat.com>
Mon, 2 Mar 2020 04:24:54 +0000 (12:24 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 8 Mar 2020 13:27:09 +0000 (09:27 -0400)
commitf7ef7e6e3ba6e994e070cc609eb154339d1c4a11
tree1b1cea19b8045cddac346783280d731c8735f67e
parent530a0963184e57e71a5b538e9161f115df533e96
vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on
platform without IOMMU support. This can lead unnecessary IOTLB
transactions which will damage the performance.

Fixing this by check whether the device is backed by IOMMU and disable
device IOTLB.

Reported-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20200302042454.24814-1-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost.c