qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [PATCH 62/67] intel_iommu: fix incorrect device invalidate


From: Michael Roth
Subject: [Qemu-stable] [PATCH 62/67] intel_iommu: fix incorrect device invalidate
Date: Wed, 14 Dec 2016 18:44:56 -0600

From: Peter Xu <address@hidden>

"mask" needs to be inverted before use.

Signed-off-by: Peter Xu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit 6cb99acc2808cc41e2d772a23e9cc564515535cc)
Signed-off-by: Michael Roth <address@hidden>
---
 hw/i386/intel_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 28c31a2..a22545b 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));
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]