iommu/vt-d: Report page request faults for guest SVA
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 24 Jul 2020 01:49:23 +0000 (09:49 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 24 Jul 2020 08:51:21 +0000 (10:51 +0200)
commiteb8d93ea3c1d35b0baf693dd0b7c87ec62358fc9
tree843709730712b90ce52349a5025c23b1a069f866
parent19abcf70c2b16834a607db515b26a32b233c79eb
iommu/vt-d: Report page request faults for guest SVA

A pasid might be bound to a page table from a VM guest via the iommu
ops.sva_bind_gpasid. In this case, when a DMA page fault is detected
on the physical IOMMU, we need to inject the page fault request into
the guest. After the guest completes handling the page fault, a page
response need to be sent back via the iommu ops.page_response().

This adds support to report a page request fault. Any external module
which is interested in handling this fault should regiester a notifier
with iommu_register_device_fault_handler().

Co-developed-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Co-developed-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20200724014925.15523-11-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/svm.c