OSDN Git Service

drm/i915/gvt: implement scratch page table tree for shadow PPGTT
authorPing Gao <ping.a.gao@intel.com>
Fri, 4 Nov 2016 05:47:35 +0000 (13:47 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 7 Nov 2016 06:17:02 +0000 (14:17 +0800)
commit3b6411c2c20525f98b8541b3060c9ed95e31a762
tree6693210d13ffed795a1d54ae606c21c67ca5967f
parent2fb39fad065f7c694d8974b07d6c654709b52005
drm/i915/gvt: implement scratch page table tree for shadow PPGTT

All the unused entries in the page table tree(PML4E->PDPE->PDE->PTE)
should point to scratch page table/scratch page to avoid page walk error
due to the page prefetching.
When removing an entry in shadow PPGTT,  it need map to scratch page
also, the older implementation use single scratch page to assign to all
level entries, it doesn't align the page walk behavior when removed
entry is in PML, PDP, PD.  To avoid potential page walk error this patch
implement a scratch page tree to replace the single scratch page.

v2: more details in commit message address Kevin's comments.

Signed-off-by: Ping Gao <ping.a.gao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gtt.c
drivers/gpu/drm/i915/gvt/gtt.h