diff mbox

intel_iommu: fix incorrect mask for IOTLB invalidate desc

Message ID 1460343621-24503-1-git-send-email-peterx@redhat.com
State New
Headers show

Commit Message

Peter Xu April 11, 2016, 3 a.m. UTC
Address Mask (AM) should be 6 bits long, not 7. (vt-d spec 6.5.2.3)

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 hw/i386/intel_iommu_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Xu April 11, 2016, 5:12 a.m. UTC | #1
On Mon, Apr 11, 2016 at 11:00:21AM +0800, Peter Xu wrote:
> 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
diff mbox

Patch

diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index e5f514c..db7da18 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -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