]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Enlightened PASID allocation
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 16 May 2020 06:20:50 +0000 (14:20 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 18 May 2020 13:37:25 +0000 (15:37 +0200)
commit9aa9c3c414e5c35decfc3fe4b213339795bc183b
tree7f0c41d23603fbf82f7437b1ed418849131a3fb6
parentd5f141ee3a13ca81f2ce10a130b9df836c9be6a6
iommu/vt-d: Enlightened PASID allocation

Enabling IOMMU in a guest requires communication with the host
driver for certain aspects. Use of PASID ID to enable Shared Virtual
Addressing (SVA) requires managing PASID's in the host. VT-d 3.0 spec
provides a Virtual Command Register (VCMD) to facilitate this.
Writes to this register in the guest are trapped by vIOMMU which
proxies the call to the host driver.

This virtual command interface consists of a capability register,
a virtual command register, and a virtual response register. Refer
to section 10.4.42, 10.4.43, 10.4.44 for more information.

This patch adds the enlightened PASID allocation/free interfaces
via the virtual command interface.

Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20200516062101.29541-8-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-pasid.c
drivers/iommu/intel-pasid.h
include/linux/intel-iommu.h