summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/mpt.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-23 06:58:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-23 06:58:02 -0500
commiteb1488360c7d66955ff6e0b07049a22f553efaf3 (patch)
treea3550cad197bb11d759d3362e7be2becf69e576d /drivers/gpu/drm/i915/gvt/mpt.h
parentea81896dc98f324ff3fb9b1e74b4915a1beb3296 (diff)
parent46cf053efec6a3a5f343fead837777efe8252a46 (diff)
Merge 5.5-rc3 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/mpt.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/mpt.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/mpt.h b/drivers/gpu/drm/i915/gvt/mpt.h
index 0f9440128123..9ad224df9c68 100644
--- a/drivers/gpu/drm/i915/gvt/mpt.h
+++ b/drivers/gpu/drm/i915/gvt/mpt.h
@@ -255,6 +255,21 @@ static inline void intel_gvt_hypervisor_dma_unmap_guest_page(
}
/**
+ * intel_gvt_hypervisor_dma_pin_guest_page - pin guest dma buf
+ * @vgpu: a vGPU
+ * @dma_addr: guest dma addr
+ *
+ * Returns:
+ * 0 on success, negative error code if failed.
+ */
+static inline int
+intel_gvt_hypervisor_dma_pin_guest_page(struct intel_vgpu *vgpu,
+ dma_addr_t dma_addr)
+{
+ return intel_gvt_host.mpt->dma_pin_guest_page(vgpu->handle, dma_addr);
+}
+
+/**
* intel_gvt_hypervisor_map_gfn_to_mfn - map a GFN region to MFN
* @vgpu: a vGPU
* @gfn: guest PFN