aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/hypercall.h
diff options
context:
space:
mode:
authorTina Zhang <tina.zhang@intel.com>2019-12-13 11:23:14 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2019-12-13 11:24:01 +0800
commit9f674c811740b5db4b34668b72d47f6e7b879b0a (patch)
tree8085b2e99b332ec85e527abfc436139d20dbdd53 /drivers/gpu/drm/i915/gvt/hypercall.h
parentdrm/i915/gvt: set guest display buffer as readonly (diff)
downloadlinux-dev-9f674c811740b5db4b34668b72d47f6e7b879b0a.tar.xz
linux-dev-9f674c811740b5db4b34668b72d47f6e7b879b0a.zip
drm/i915/gvt: Pin vgpu dma address before using
Dma-buf display uses the vgpu dma address saved in the guest part GGTT table which is updated by vCPU thread. In host side, when the dma address is used by qemu ui thread, gvt-g must make sure the dma address is validated before letting it go to the HW. Invalid guest dma address will easily cause DMA fault and make GPU hang. v2: Rebase Fixes: e546e281d33d ("drm/i915/gvt: Dmabuf support for GVT-g") Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20191212141342.3417-1-tina.zhang@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/hypercall.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/hypercall.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/hypercall.h b/drivers/gpu/drm/i915/gvt/hypercall.h
index 4862fb12778e..b19a3b1ea4c1 100644
--- a/drivers/gpu/drm/i915/gvt/hypercall.h
+++ b/drivers/gpu/drm/i915/gvt/hypercall.h
@@ -62,6 +62,8 @@ struct intel_gvt_mpt {
unsigned long size, dma_addr_t *dma_addr);
void (*dma_unmap_guest_page)(unsigned long handle, dma_addr_t dma_addr);
+ int (*dma_pin_guest_page)(unsigned long handle, dma_addr_t dma_addr);
+
int (*map_gfn_to_mfn)(unsigned long handle, unsigned long gfn,
unsigned long mfn, unsigned int nr, bool map);
int (*set_trap_area)(unsigned long handle, u64 start, u64 end,