intel_iommu: fix incorrect mask for IOTLB invalidate desc
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)
Signed-off-by Peter Xu <[email protected]>
--- hw/i386/intel_iommu_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/intel_iommu_internal.h +1 -1
@@ -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
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