drm/i915/gvt: optimize for vGPU mmio switch
authorWeinan Li <weinan.z.li@intel.com>
Wed, 13 Dec 2017 02:47:00 +0000 (10:47 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 18 Dec 2017 08:30:07 +0000 (16:30 +0800)
commite47107ad37c3774be9d5bf6fb4625c59e59f632c
tree4a2e58760f1c5443c34fbe7688b60af9c79f5da9
parentdc5718f47cda438f47420591f4ac7338d7964bce
drm/i915/gvt: optimize for vGPU mmio switch

Now mmio switch between vGPUs need to switch to host first then to expected
vGPU, it waste one time mmio save/restore. r/w mmio usually is
time-consuming, and there are so many mocs registers need to save/restore
during vGPU switch. Combine the switch_to_host and switch_to_vgpu can
reduce 1 time mmio save/restore, it will reduce the CPU utilization and
performance while there is multi VMs with heavy work load.

Signed-off-by: Weinan Li <weinan.z.li@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/mmio_context.c