Skip to content

Commit 18e70a4

Browse files
aljimenezbMichael Tokarev
authored andcommitted
amd_iommu: Fix mask to retrieve Interrupt Table Root Pointer from DTE
Fix an off-by-one error in the definition of AMDVI_IR_PHYS_ADDR_MASK. The current definition masks off the most significant bit of the Interrupt Table Root ptr i.e. it only generates a mask with bits [50:6] set. See the AMD I/O Virtualization Technology (IOMMU) Specification for the Interrupt Table Root Pointer[51:6] field in the Device Table Entry format. Cc: [email protected] Fixes: b44159f ("x86_iommu/amd: Add interrupt remap support when VAPIC is not enabled") Signed-off-by: Alejandro Jimenez <[email protected]> Reviewed-by: Vasant Hegde <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> (cherry picked from commit 123cf4bdd378f746dfa2f5415ba084148dded3e3) Signed-off-by: Michael Tokarev <[email protected]>
1 parent caaa648 commit 18e70a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/i386/amd_iommu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
#define AMDVI_IR_INTCTL_PASS 1
232232
#define AMDVI_IR_INTCTL_REMAP 2
233233

234-
#define AMDVI_IR_PHYS_ADDR_MASK (((1ULL << 45) - 1) << 6)
234+
#define AMDVI_IR_PHYS_ADDR_MASK GENMASK64(51, 6)
235235

236236
/* MSI data 10:0 bits (section 2.2.5.1 Fig 14) */
237237
#define AMDVI_IRTE_OFFSET 0x7ff

0 commit comments

Comments
 (0)