Set proper masks to avoid invalid input spillover to reserved bits.
Unified · Split
| @@ -381,8 +381,8 @@ enum { · 380 unmodified lines | ||
| 381 | 381 | |
| 382 | 382 | #define QI_DEV_EIOTLB_ADDR(a) ((u64)(a) & VTD_PAGE_MASK) |
| 383 | 383 | #define QI_DEV_EIOTLB_SIZE (((u64)1) << 11) |
| 384 | −#define QI_DEV_EIOTLB_GLOB(g) ((u64)g) | |
| 385 | −#define QI_DEV_EIOTLB_PASID(p) (((u64)p) << 32) | |
| 384 | +#define QI_DEV_EIOTLB_GLOB(g) ((u64)(g) & 0x1) | |
| 385 | +#define QI_DEV_EIOTLB_PASID(p) ((u64)((p) & 0xfffff) << 32) | |
| 386 | 386 | #define QI_DEV_EIOTLB_SID(sid) ((u64)((sid) & 0xffff) << 16) |
| 387 | 387 | #define QI_DEV_EIOTLB_QDEP(qd) ((u64)((qd) & 0x1f) << 4) |
| 388 | 388 | #define QI_DEV_EIOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | \ |