intel_iommu: fixing source id during IOTLB hash key calculation
commitbacabb0afadb47294806481a7ebb6fa5d4f1c7bd
authorJason Wang <jasowang@redhat.com>
Thu, 3 Nov 2016 01:22:23 +0000 (3 09:22 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 15 Nov 2016 15:20:36 +0000 (15 17:20 +0200)
tree71ed1d5be2761469f2992b27af332c6fc6a95f8e
parent6bbcb76301a72dc80c8d29af13d40bb9a759c9c6
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>
hw/i386/intel_iommu.c
hw/i386/intel_iommu_internal.h