drm/i915/gvt: Fix GPU hang after reusing vGPU instance across different guest OS
authorChangbin Du <changbin.du@intel.com>
Fri, 22 Sep 2017 02:00:09 +0000 (10:00 +0800)
committerZhi Wang <zhi.a.wang@intel.com>
Mon, 16 Oct 2017 16:44:10 +0000 (00:44 +0800)
commitba3ee00683bc2dad4c14fba805c2241ae23acff9
treef037488d488883e9b8195d21f426b4ac7709712c
parentea850f64c2722278f150dc11de2141baeb24211c
drm/i915/gvt: Fix GPU hang after reusing vGPU instance across different guest OS

We have implemented delayed ring mmio switch mechanism to reduce
unnecessary mmio switch. While the vGPU is being destroyed or
detached from VM, we need to force the ring switch to host context.

The later deadline is missed. Then it got a chance that word load
from VM2 might execute under the ring context of VM1 which was
attached to a same vGPU instance. Finally, the GPU is hang.

This patch guarantee the two deadline are performed.

v2: Remove unused variable 'scheduler'

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/sched_policy.c