[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/16] virtio-iommu: Fix the domain_range end
From: |
Thomas Huth |
Subject: |
[PULL 14/16] virtio-iommu: Fix the domain_range end |
Date: |
Wed, 15 Dec 2021 08:34:00 +0100 |
From: Eric Auger <eric.auger@redhat.com>
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>
---
hw/virtio/virtio-iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
index 30ee09187b..aa9c16a17b 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);
--
2.27.0
- [PULL 01/16] qtest/libqos: add a function to initialize secondary PCI buses, (continued)
- [PULL 01/16] qtest/libqos: add a function to initialize secondary PCI buses, Thomas Huth, 2021/12/15
- [PULL 04/16] tests/libqtest: add a migration test with two couples of failover devices, Thomas Huth, 2021/12/15
- [PULL 06/16] tests/qtest: Fence the tests that need xlnx-zcu102 with CONFIG_XLNX_ZYNQMP_ARM, Thomas Huth, 2021/12/15
- [PULL 07/16] tests/qtest: Add a function that gets a list with available machine types, Thomas Huth, 2021/12/15
- [PULL 10/16] gitlab-ci.d/buildtest: Add jobs that run the device-crash-test, Thomas Huth, 2021/12/15
- [PULL 09/16] Move the libssh setup from configure to meson.build, Thomas Huth, 2021/12/15
- [PULL 08/16] tests/qtest: Add a function to check whether a machine is available, Thomas Huth, 2021/12/15
- [PULL 11/16] gitlab-ci: Add cirrus-ci based tests for NetBSD and OpenBSD, Thomas Huth, 2021/12/15
- [PULL 13/16] virtio-iommu: Fix endianness in get_config, Thomas Huth, 2021/12/15
- [PULL 12/16] virtio-iommu: Remove set_config callback, Thomas Huth, 2021/12/15
- [PULL 14/16] virtio-iommu: Fix the domain_range end,
Thomas Huth <=
- [PULL 15/16] tests: qtest: Add virtio-iommu test, Thomas Huth, 2021/12/15
- [PULL 16/16] gitlab-ci: Test compilation on Windows with MSYS2, Thomas Huth, 2021/12/15
- Re: [PULL 00/16] qtest and gitlab-CI improvements, Richard Henderson, 2021/12/15
- Re: [PULL 00/16] qtest and gitlab-CI improvements, Philippe Mathieu-Daudé, 2021/12/18