diff options
author | Peter Xu <peterx@redhat.com> | 2016-11-29 13:43:40 +0800 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2016-12-12 18:06:43 -0600 |
commit | 0ef167c907c13dc706ac08e96a095ff5c7d75445 (patch) | |
tree | 2634787321d1f7fb2ed940a6d8ebfef4a8b5eeab | |
parent | 248a780fd31ca218d2652c8a4ca19ca8abefb472 (diff) | |
download | qemu-0ef167c907c13dc706ac08e96a095ff5c7d75445.tar.gz |
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>
(cherry picked from commit 6cb99acc2808cc41e2d772a23e9cc564515535cc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | hw/i386/intel_iommu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 28c31a2cdf..a22545b365 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -985,6 +985,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)); |