On 1/19/23 19:46, David Marchand wrote:
clang does not support conditionally held locks when statically analysing
taken locks with thread safety checks.
Always take iotlb locks regardless of VIRTIO_F_IOMMU_PLATFORM feature.

Signed-off-by: David Marchand <david.march...@redhat.com>
---
  lib/vhost/vhost.c      |  8 +++-----
  lib/vhost/virtio_net.c | 24 ++++++++----------------
  2 files changed, 11 insertions(+), 21 deletions(-)


Since there will never be contention when VIRTIO_F_IOMMU_PLATFORM hasn't
been negotiated, there should not be noticeable overhead by taking it
unconditionally, especially since it is removing checking the feature
bit.

Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>

Thanks,
Maxime

Reply via email to