hw/i386: Fix AMDVI GATS and HATS encodings
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 22 May 2018 07:07:53 +0000 (09:07 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 26 Jun 2018 18:58:03 +0000 (21:58 +0300)
We support up to 6 levels, but those are encoded as 10b according to the
AMD IOMMU spec (chapter 3.3.1, Extended Feature Register).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/amd_iommu.h

index aeef802364a5b6b28396e217d180bb8475ed06b2..874030582dcbc4e2b9af8e3d196c2a350e893bbd 100644 (file)
 #define AMDVI_DTE_UPPER_QUAD_RESERVED  0x08f0000000000000
 
 /* AMDVI paging mode */
-#define AMDVI_GATS_MODE                 (6ULL <<  12)
-#define AMDVI_HATS_MODE                 (6ULL <<  10)
+#define AMDVI_GATS_MODE                 (2ULL <<  12)
+#define AMDVI_HATS_MODE                 (2ULL <<  10)
 
 /* IOTLB */
 #define AMDVI_IOTLB_MAX_SIZE 1024