Skip to contentSkip to conversation

intel_iommu: fix incorrect mask for IOTLB invalidate desc

PATCH In review Peter Xu 1 participant 2 messages Apr 11, 2016

lore
Share & tools
lore

Peter Xu

author
#0 lore raw

PATCH 1/1 intel_iommu: fix incorrect mask for IOTLB invalidate desc

Address Mask (AM) should be 6 bits long, not 7. (vt-d spec 6.5.2.3)

---
 hw/i386/intel_iommu_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/intel_iommu_internal.h +1 -1
index e5f514c..db7da18 100644
@@ -315,7 +315,7 @@ typedef struct VTDInvDesc VTDInvDesc;
 #define VTD_INV_DESC_IOTLB_DID(val)     (((val) >> 16) & VTD_DOMAIN_ID_MASK)
 #define VTD_INV_DESC_IOTLB_ADDR(val)    ((val) & ~0xfffULL & \
                                          ((1ULL << VTD_MGAW) - 1))
-#define VTD_INV_DESC_IOTLB_AM(val)      ((val) & 0x3fULL)
+#define VTD_INV_DESC_IOTLB_AM(val)      ((val) & 0x2fULL)
 #define VTD_INV_DESC_IOTLB_RSVD_LO      0xffffffff0000ff00ULL
 #define VTD_INV_DESC_IOTLB_RSVD_HI      0xf80ULL
 
Signature · 1 line
2.4.3
author
#1 lore raw
Quoted 2 lines · Peter Xu

Address Mask (AM) should be 6 bits long, not 7. (vt-d spec 6.5.2.3)

OMG I was wrong... Sorry please ignore this one.

-- peterx