aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/intel_iommu_internal.h
diff options
context:
space:
mode:
authorLiu Yi L <yi.l.liu@intel.com>2020-07-04 01:07:15 -0700
committerMichael S. Tsirkin <mst@redhat.com>2020-07-22 07:57:07 -0400
commita4544c45e109ceee87ee8c19baff28be3890d788 (patch)
treef5b5eb70e2da31fefede2ccf6e738dfc77bf0af7 /hw/i386/intel_iommu_internal.h
parent9b3a35ec8236933ab958a4c3ad883163f1ca66e7 (diff)
intel_iommu: Use correct shift for 256 bits qi descriptor
In chapter 10.4.23 of VT-d spec 3.0, Descriptor Width bit was introduced in VTD_IQA_REG. Software could set this bit to tell VT-d the QI descriptor from software would be 256 bits. Accordingly, the VTD_IQH_QH_SHIFT should be 5 when descriptor size is 256 bits. This patch adds the DW bit check when deciding the shift used to update VTD_IQH_REG. Signed-off-by: Liu Yi L <yi.l.liu@intel.com> Message-Id: <1593850035-35483-1-git-send-email-yi.l.liu@intel.com> Reviewed-by: Peter Xu <peterx@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/intel_iommu_internal.h')
-rw-r--r--hw/i386/intel_iommu_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index 862033ebe6..3d5487fe2c 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -230,7 +230,8 @@
#define VTD_IQA_DW_MASK 0x800
/* IQH_REG */
-#define VTD_IQH_QH_SHIFT 4
+#define VTD_IQH_QH_SHIFT_4 4
+#define VTD_IQH_QH_SHIFT_5 5
#define VTD_IQH_QH_MASK 0x7fff0ULL
/* ICS_REG */