]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Don't read VCCAP register unless it exists
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 26 Nov 2020 11:13:51 +0000 (11:13 +0000)
committerWill Deacon <will@kernel.org>
Thu, 26 Nov 2020 14:50:24 +0000 (14:50 +0000)
commit26c22d8e28a824492526096a72e76adaa28c2eea
tree17299f741bc4c68f792f2d6ddfe8d0bcd1cdd1ff
parent8b01c33400b8c85e0baeb3ca5b395c380b1d5079
iommu/vt-d: Don't read VCCAP register unless it exists

My virtual IOMMU implementation is whining that the guest is reading a
register that doesn't exist. Only read the VCCAP_REG if the corresponding
capability is set in ECAP_REG to indicate that it actually exists.

Fixes: f1e1d4cbb187 ("iommu/vt-d: Add custom allocator for IOASID")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Liu Yi L <yi.l.liu@intel.com>
Cc: stable@vger.kernel.org # v5.7+
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/de32b150ffaa752e0cff8571b17dfb1213fbe71c.camel@infradead.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/intel/dmar.c
drivers/iommu/intel/iommu.c