virtio-iommu: Fix virtio_iommu_mr()
commitbfe7a961737452ae8e616df758406e86ac289972
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Fri, 30 Oct 2020 18:05:01 +0000 (30 19:05 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 3 Nov 2020 12:19:27 +0000 (3 07:19 -0500)
tree658df61cdae21f890b015581091b352461c0d52b
parent8055d2fb7f4717c6aa7c4ca801a487153945a15d
virtio-iommu: Fix virtio_iommu_mr()

Due to an invalid mask, virtio_iommu_mr() may return the wrong memory
region. It hasn't been too problematic so far because the function was
only used to test existence of an endpoint, but that is about to change.

Fixes: cfb42188b24d ("virtio-iommu: Implement attach/detach command")
Cc: QEMU Stable <qemu-stable@nongnu.org>
Acked-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-Id: <20201030180510.747225-2-jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-iommu.c