Skip to content

Commit

Permalink
intel_iommu: fix incorrect device invalidate
Browse files Browse the repository at this point in the history
"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 6cb99ac)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
xzpeter authored and mdroth committed Dec 13, 2016
1 parent 248a780 commit 0ef167c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/i386/intel_iommu.c
Expand Up @@ -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));
Expand Down

0 comments on commit 0ef167c

Please sign in to comment.