drm/i915/gvt: Add huge gtt shadowing

Submitted by changbin.du@intel.com on March 15, 2018, 7:04 a.m.

Details

Reviewer None
Submitted March 15, 2018, 7:04 a.m.
Last Updated May 15, 2018, 2:46 a.m.
Revision 7

Cover Letter(s)

Revision 1
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 420 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  16 +-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     |  82 ++++---
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 drivers/gpu/drm/i915/i915_gem.c      |   8 +-
 drivers/gpu/drm/i915/i915_pvinfo.h   |   1 +
 drivers/gpu/drm/i915/i915_vgpu.h     |   6 +
 10 files changed, 459 insertions(+), 93 deletions(-)
    
Revision 2
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT.

v2:
  o fix comments from zhenyu.
  o rebase.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 419 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  16 +-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     |  84 ++++---
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 drivers/gpu/drm/i915/i915_gem.c      |   8 +-
 drivers/gpu/drm/i915/i915_pvinfo.h   |   1 +
 drivers/gpu/drm/i915/i915_vgpu.h     |   6 +
 10 files changed, 459 insertions(+), 94 deletions(-)
    
Revision 3
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT.

v3:
  o rebase.
v2:
  o fix comments from zhenyu.
  o rebase.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 419 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  16 +-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     | 130 +++++++----
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 drivers/gpu/drm/i915/i915_gem.c      |   8 +-
 drivers/gpu/drm/i915/i915_pvinfo.h   |   1 +
 drivers/gpu/drm/i915/i915_vgpu.h     |   6 +
 10 files changed, 495 insertions(+), 104 deletions(-)
    
Revision 4
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT.

v4:
  o Make first patch bisectable.
v3:
  o rebase.
v2:
  o fix comments from zhenyu.
  o rebase.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 419 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  16 +-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     | 130 +++++++----
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 drivers/gpu/drm/i915/i915_gem.c      |   8 +-
 drivers/gpu/drm/i915/i915_pvinfo.h   |   1 +
 drivers/gpu/drm/i915/i915_vgpu.h     |   6 +
 10 files changed, 495 insertions(+), 104 deletions(-)
    
Revision 5
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT. This will alow huge gtt feature turned on for vGPU.

v5:
  o IPS of all engines must be enabled together for gen9.
  o Coding style improvment.
v4:
  o Make first patch bisectable.
v3:
  o rebase.
v2:
  o fix comments from zhenyu.
  o rebase.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 421 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  29 ++-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     | 130 ++++++++---
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 drivers/gpu/drm/i915/i915_gem.c      |   8 +-
 drivers/gpu/drm/i915/i915_pvinfo.h   |   1 +
 drivers/gpu/drm/i915/i915_vgpu.h     |   6 +
 10 files changed, 509 insertions(+), 105 deletions(-)
    
Revision 6
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT. This will alow huge gtt feature turned on for vGPU.

v6:
  o Split changes of last patch in i915 side into a separated patch.
v5:
  o IPS of all engines must be enabled together for gen9.
  o Coding style improvment.
v4:
  o Make first patch bisectable.
v3:
  o rebase.
v2:
  o fix comments from zhenyu.
  o rebase.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 421 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  29 ++-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     | 130 ++++++++---
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 7 files changed, 500 insertions(+), 99 deletions(-)
    
Revision 7
      From: Changbin Du <changbin.du@intel.com>

Add huge gtt shadowing for GVT. This will alow huge gtt feature turned on for vGPU.

v7:
  o Extend IPS mmio control to Gen10. (Matthew Auld)
v6:
  o Split changes of last patch in i915 side into a separated patch.
v5:
  o IPS of all engines must be enabled together for gen9.
  o Coding style improvment.
v4:
  o Make first patch bisectable.
v3:
  o rebase.
v2:
  o fix comments from zhenyu.
  o rebase.

Changbin Du (14):
  drm/i915/gvt: Add new 64K entry type
  drm/i915/gvt: Add PTE IPS bit operations
  drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
  drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE
  drm/i915/gvt: Add software PTE flag to mark special 64K splited entry
  drm/i915/gvt: Add GTT clear_pse operation
  drm/i915/gvt: Split ppgtt_alloc_spt into two parts
  drm/i915/gvt: Make PTE iterator 64K entry aware
  drm/i915/gvt: Add 64K huge gtt support
  drm/i915/kvmgt: Support setting dma map for huge pages
  drm/i915/gvt: Add 2M huge gtt support
  drm/i915/gvt: Handle special sequence on PDE IPS bit
  drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry
  drm/i915: Enable platform support for vGPU huge gtt pages

 drivers/gpu/drm/i915/gvt/gtt.c       | 423 ++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/gvt/gtt.h       |   9 +
 drivers/gpu/drm/i915/gvt/handlers.c  |  29 ++-
 drivers/gpu/drm/i915/gvt/hypercall.h |   2 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c     | 130 ++++++++---
 drivers/gpu/drm/i915/gvt/mpt.h       |   7 +-
 drivers/gpu/drm/i915/gvt/vgpu.c      |   1 +
 7 files changed, 502 insertions(+), 99 deletions(-)
    

Revisions