summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/debug.h
diff options
context:
space:
mode:
authorZhi Wang <zhi.a.wang@intel.com>2016-03-28 23:23:16 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-10-14 18:12:33 +0800
commit2707e44466881d6b0a8ed05a429dcf0940c22f60 (patch)
tree66955d07eab021a350ea9f776637cfebb8e14201 /drivers/gpu/drm/i915/gvt/debug.h
parentc8fe6a6811a7186656379d0c27e85325a966077a (diff)
downloadlinux-stable-2707e44466881d6b0a8ed05a429dcf0940c22f60.tar.gz
linux-stable-2707e44466881d6b0a8ed05a429dcf0940c22f60.tar.bz2
linux-stable-2707e44466881d6b0a8ed05a429dcf0940c22f60.zip
drm/i915/gvt: vGPU graphics memory virtualization
The vGPU graphics memory emulation framework is responsible for graphics memory table virtualization. Under virtualization environment, a VM will populate the page table entry with guest page frame number(GPFN/GFN), while HW needs a page table filled with MFN(Machine frame number). The relationship between GFN and MFN(Machine frame number) is managed by hypervisor, while GEN HW doesn't have such knowledge to translate a GFN. To solve this gap, shadow GGTT/PPGTT page table is introdcued. For GGTT, the GFN inside the guest GGTT page table entry will be translated into MFN and written into physical GTT MMIO registers when guest write virtual GTT MMIO registers. For PPGTT, a shadow PPGTT page table will be created and write-protected translated from guest PPGTT page table. And the shadow page table root pointers will be written into the shadow context after a guest workload is shadowed. vGPU graphics memory emulation framework consists: - Per-GEN HW platform page table entry bits extract/de-extract routines. - GTT MMIO register emulation handlers, which will call hypercall to do GFN->MFN translation when guest write GTT MMIO register - PPGTT shadow page table routines, e.g. shadow create/destroy/out-of-sync Signed-off-by: Zhi Wang <zhi.a.wang@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/debug.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/debug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/debug.h b/drivers/gpu/drm/i915/gvt/debug.h
index 1be93e855d7e..82269b750aac 100644
--- a/drivers/gpu/drm/i915/gvt/debug.h
+++ b/drivers/gpu/drm/i915/gvt/debug.h
@@ -33,4 +33,7 @@
#define gvt_dbg_irq(fmt, args...) \
DRM_DEBUG_DRIVER("gvt: irq: "fmt, ##args)
+#define gvt_dbg_mm(fmt, args...) \
+ DRM_DEBUG_DRIVER("gvt: mm: "fmt, ##args)
+
#endif