summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2016-11-29 13:43:40 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-11-30 04:20:57 +0200
commit6cb99acc2808cc41e2d772a23e9cc564515535cc (patch)
tree4f6d1196a42a6eb1d7c5688f1b6a08b9eb435b5f /hw
parent5449c230fac9cd6a645fe8c85693444dad512b59 (diff)
downloadqemu-6cb99acc2808cc41e2d772a23e9cc564515535cc.zip
intel_iommu: fix incorrect device invalidate
"mask" needs to be inverted before use. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/intel_iommu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 1b706adf9d..5f3e35123d 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -988,6 +988,7 @@ static void vtd_context_device_invalidate(IntelIOMMUState *s,
mask = 7; /* Mask bit 2:0 in the SID field */
break;
}
+ mask = ~mask;
VTD_DPRINTF(INV, "device-selective invalidation source 0x%"PRIx16
" mask %"PRIu16, source_id, mask);
vtd_bus = vtd_find_as_from_bus_num(s, VTD_SID_TO_BUS(source_id));