]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
drm/i915: Move the release of PT page to the upper caller
authorZhi Wang <zhi.a.wang@intel.com>
Tue, 29 Nov 2016 06:55:16 +0000 (14:55 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:52 +0000 (10:11 +0200)
commitdea3ee9a154791f07dbf118f7aff689a57c2974e
treea11ce52184f3f41ba52992f35478b622e0411d5d
parent8ff5433f7d30877f1c2ebdd15e8e3a571082348b
drm/i915: Move the release of PT page to the upper caller

BugLink: http://bugs.launchpad.net/bugs/1681875
commit a18dbba8f01ffae229d00517994f84e7bfad4c49 upstream.

a PT page will be released if it doesn't contain any meaningful mappings
during PPGTT page table shrinking. The PT entry in the upper level will
be set to a scratch entry.

Normally this works nicely, but in virtualization world, the PPGTT page
table is tracked by hypervisor. Releasing the PT page before modifying
the upper level PT entry would cause extra efforts.

As the tracked page has been returned to OS before losing track from
hypervisor, it could be written in any pattern. Hypervisor has to recognize
if a page is still being used as a PT page by validating these writing
patterns. It's complicated. Better let the guest modify the PT entry in
upper level PT first, then release the PT page.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: https://patchwork.freedesktop.org/patch/122697/msgid/1479728666-25333-1-git-send-email-zhi.a.wang@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1480402516-22275-1-git-send-email-zhi.a.wang@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/i915/i915_gem_gtt.c