Skip to content

Commit 10a9eed

Browse files
aljimenezbMichael Tokarev
authored andcommitted
amd_iommu: Fix Miscellaneous Information Register 0 encoding
The definitions encoding the maximum Virtual, Physical, and Guest Virtual Address sizes supported by the IOMMU are using incorrect offsets i.e. the VASize and GVASize offsets are switched. The value in the GVAsize field is also modified, since it was incorrectly encoded. Cc: [email protected] Fixes: d29a09c ("hw/i386: Introduce AMD IOMMU") Co-developed-by: Ethan MILON <[email protected]> Signed-off-by: Ethan MILON <[email protected]> Signed-off-by: Alejandro Jimenez <[email protected]> Message-Id: <[email protected]> Reviewed-by: Vasant Hegde <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> (cherry picked from commit 091c7d7924f33781c2fb8e7297dc54971e0c3785) Signed-off-by: Michael Tokarev <[email protected]>
1 parent f272f31 commit 10a9eed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hw/i386/amd_iommu.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@
196196
#define AMDVI_PAGE_SHIFT_4K 12
197197
#define AMDVI_PAGE_MASK_4K (~((1ULL << AMDVI_PAGE_SHIFT_4K) - 1))
198198

199-
#define AMDVI_MAX_VA_ADDR (48UL << 5)
200-
#define AMDVI_MAX_PH_ADDR (40UL << 8)
201-
#define AMDVI_MAX_GVA_ADDR (48UL << 15)
199+
#define AMDVI_MAX_GVA_ADDR (2UL << 5)
200+
#define AMDVI_MAX_PH_ADDR (40UL << 8)
201+
#define AMDVI_MAX_VA_ADDR (48UL << 15)
202202

203203
/* Completion Wait data size */
204204
#define AMDVI_COMPLETION_DATA_SIZE 8

0 commit comments

Comments
 (0)