aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2021-11-27 08:29:09 +0100
committerThomas Huth <thuth@redhat.com>2021-12-15 08:08:59 +0100
commit6b77ae0531d1a70a87c08408f6c9cd3389439686 (patch)
tree1202534701702c45d3827aa6b433a67788e7d1da /hw/virtio
parent3a411b2d9660234c8b6855d1b2861085a4ee5943 (diff)
downloadqemu-6b77ae0531d1a70a87c08408f6c9cd3389439686.zip
qemu-6b77ae0531d1a70a87c08408f6c9cd3389439686.tar.gz
qemu-6b77ae0531d1a70a87c08408f6c9cd3389439686.tar.bz2
virtio-iommu: Fix the domain_range end
in old times the domain range was defined by a domain_bits le32. This was then converted into a domain_range struct. During the upgrade the original value of '32' (bits) has been kept while the end field now is the max value of the domain id (UINT32_MAX). Fix that and also use UINT64_MAX for the input_range.end. Reported-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Message-Id: <20211127072910.1261824-4-eric.auger@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio-iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 30ee091..aa9c16a 100644
--- a/hw/virtio/virtio-iommu.c
+++ b/hw/virtio/virtio-iommu.c
@@ -978,8 +978,8 @@ static void virtio_iommu_device_realize(DeviceState *dev, Error **errp)
s->event_vq = virtio_add_queue(vdev, VIOMMU_DEFAULT_QUEUE_SIZE, NULL);
s->config.page_size_mask = TARGET_PAGE_MASK;
- s->config.input_range.end = -1UL;
- s->config.domain_range.end = 32;
+ s->config.input_range.end = UINT64_MAX;
+ s->config.domain_range.end = UINT32_MAX;
s->config.probe_size = VIOMMU_PROBE_SIZE;
virtio_add_feature(&s->features, VIRTIO_RING_F_EVENT_IDX);