]> git.ipfire.org Git - thirdparty/qemu.git/commit
intel_iommu: Use correct shift for 256 bits qi descriptor
authorLiu Yi L <yi.l.liu@intel.com>
Sat, 4 Jul 2020 08:07:15 +0000 (01:07 -0700)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 9 Sep 2020 23:51:39 +0000 (18:51 -0500)
commit58c523563dc3146ca4326e20af924abf0b90e9c3
tree6d5b36c2ce3014b15c298c5d0f7eef2e241f1e4a
parent7c4c30e764e2e177fefe241a0f8559b02def9089
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>
(cherry picked from commit a4544c45e109ceee87ee8c19baff28be3890d788)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/i386/intel_iommu.c
hw/i386/intel_iommu_internal.h