summaryrefslogtreecommitdiffstats
path: root/hw/i386/intel_iommu_internal.h
diff options
context:
space:
mode:
authorJason Wang2016-11-03 02:22:23 +0100
committerMichael S. Tsirkin2016-11-15 16:20:36 +0100
commitbacabb0afadb47294806481a7ebb6fa5d4f1c7bd (patch)
tree71ed1d5be2761469f2992b27af332c6fc6a95f8e /hw/i386/intel_iommu_internal.h
parentMAINTAINERS: Remove obsolete stable branches (diff)
downloadqemu-bacabb0afadb47294806481a7ebb6fa5d4f1c7bd.tar.gz
qemu-bacabb0afadb47294806481a7ebb6fa5d4f1c7bd.tar.xz
qemu-bacabb0afadb47294806481a7ebb6fa5d4f1c7bd.zip
intel_iommu: fixing source id during IOTLB hash key calculation
Using uint8_t for source id will lose bus num and get the wrong/invalid IOTLB entry. Fixing by using uint16_t instead and enlarge level shift. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/intel_iommu_internal.h')
-rw-r--r--hw/i386/intel_iommu_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index 0829a5064f..11abfa2233 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -115,7 +115,7 @@
/* The shift of source_id in the key of IOTLB hash table */
#define VTD_IOTLB_SID_SHIFT 36
-#define VTD_IOTLB_LVL_SHIFT 44
+#define VTD_IOTLB_LVL_SHIFT 52
#define VTD_IOTLB_MAX_SIZE 1024 /* Max size of the hash table */
/* IOTLB_REG */