diff options
author | Clément Mathieu--Drif <clement.mathieu--drif@eviden.com> | 2024-07-09 14:26:10 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-21 14:45:56 -0400 |
commit | bb3a23d5b0b43bed3c9a6ecf5a6871e2871be883 (patch) | |
tree | 4362691709e689a846938e9e826a72cefe152b82 /hw/i386 | |
parent | d7258f7a250716231d23d5412dd6caf923936549 (diff) | |
download | qemu-bb3a23d5b0b43bed3c9a6ecf5a6871e2871be883.zip qemu-bb3a23d5b0b43bed3c9a6ecf5a6871e2871be883.tar.gz qemu-bb3a23d5b0b43bed3c9a6ecf5a6871e2871be883.tar.bz2 |
intel_iommu: make type match
The 'level' field in vtd_iotlb_key is an unsigned integer.
We don't need to store level as an int in vtd_lookup_iotlb.
This is not an issue by itself, but using unsigned here seems cleaner.
Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Message-Id: <20240709142557.317271-5-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/intel_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 37c21a0a..be0cb39 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -358,7 +358,7 @@ static VTDIOTLBEntry *vtd_lookup_iotlb(IntelIOMMUState *s, uint16_t source_id, { struct vtd_iotlb_key key; VTDIOTLBEntry *entry; - int level; + unsigned level; for (level = VTD_SL_PT_LEVEL; level < VTD_SL_PML4_LEVEL; level++) { key.gfn = vtd_get_iotlb_gfn(addr, level); |