]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: factor out tlb and mocs register offset table
authorZhi Wang <zhi.a.wang@intel.com>
Mon, 22 Jul 2019 11:07:07 +0000 (14:07 +0300)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 13 Aug 2019 09:55:06 +0000 (17:55 +0800)
commit1ee6e81497cec71795775492577b44a18a86bbf1
tree7d9fed21e44cd358b0a90eb72b2ac8e5be8a03a6
parentb26bd2123c73d84c539782793d1d9990493ec15a
drm/i915/gvt: factor out tlb and mocs register offset table

Factor out tlb and mocs register offset table to fix the issues reported
by klocwork, #512 and #550. Mostly, the reason why the klocwork reports
these problems is because there can be possbilities for platforms, which
have more rings than the ring offset table, to take the dirty data from
the stack as the register offset. It results to a random HW register
offset writting in this scenairo when doing context switch between vGPUs.

After the factoring, the ring offset table of TLB and MOCS should be per
platform.

v2:

- Enable TLB register switch for GEN8. (Zhenyu)

Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/mmio_context.c