]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Force VT'd workarounds when running as a guest OS
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Oct 2020 10:15:23 +0000 (11:15 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 20 Oct 2020 10:25:44 +0000 (11:25 +0100)
commitc33c87442da0b27a716c795eba35583c1b230e0a
treef08a9c51ff0ef1a47c86ffe334a8d8eec7396642
parent005fef5ae63c72005a0fdc358b18ad41e3aab59d
drm/i915: Force VT'd workarounds when running as a guest OS

If i915.ko is being used as a passthrough device, it does not know if
the host is using intel_iommu. Mixing the iommu and gfx causes a few
issues (such as scanout overfetch) which we need to workaround inside
the driver, so if we detect we are running under a hypervisor, also
assume the device access is being virtualised.

Reported-by: Stefan Fritsch <sf@sfritsch.de>
Suggested-by: Stefan Fritsch <sf@sfritsch.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Stefan Fritsch <sf@sfritsch.de>
Cc: stable@vger.kernel.org
Tested-by: Stefan Fritsch <sf@sfritsch.de>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201019101523.4145-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h