]> git.proxmox.com Git - mirror_qemu.git/commitdiff
intel_iommu: fix incorrect device invalidate
authorPeter Xu <peterx@redhat.com>
Tue, 29 Nov 2016 05:43:40 +0000 (13:43 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 30 Nov 2016 02:20:57 +0000 (04:20 +0200)
"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>
hw/i386/intel_iommu.c

index 1b706adf9dedde73e8ddb35fbe0debc58c0c6f2a..5f3e35123d466d2ff53d8034c5b0677660cb4587 100644 (file)
@@ -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));