1. 08 Jun, 2017 12 commits
    • Chuanxiao Dong's avatar
      drm/i915/gvt: Add runtime_pm get/put to proctect MMIO accessing · 9b7bd65e
      Chuanxiao Dong authored
      In some cases, GVT-g is accessing MMIO without holding runtime_pm
      and this patch can add the inline API for doing the runtime_pm get/put
      to make sure when accessing HW MMIO the i915 HW is really powered on.
      Suggested-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      9b7bd65e
    • Nick Desaulniers's avatar
      drm/i915/gvt: remove redundant -Wall · 89009b77
      Nick Desaulniers authored
      This flag is already set in the top level Makefile of the kernel.
      
      Also, by having set CONFIG_DRM_I915_GVT, thereby appending -Wall to
      ccflags, you undo all the -Wno-* cflags previously set in the Make
      variable KBUILD_CFLAGS.
      
      For example:
      
      cc foo.c -Wall -Wno-format -Wall
      
      resets -Wformat.
      Signed-off-by: default avatarNick Desaulniers <nick.desaulniers@gmail.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      89009b77
    • fred gao's avatar
      drm/i915/gvt: Legacy HSW related MMIO handler clean up · a1dcba90
      fred gao authored
      remove all the legacy pre-BDW mmio handlers and the corresponding
      usage/definition since pre-BDW platforms are not supported in GVT
      environment.
      
      v2:
      - clean up all the left dirty code before BDW, e.g
        all D_HSW usage and itself, D_IVB, D_PRE_BDW. (Zhenyu)
      v3:
      - change is based on gvt-staging. (Zhenyu)
      Signed-off-by: default avatarfred gao <fred.gao@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      a1dcba90
    • Ping Gao's avatar
      drm/i915/gvt: Trigger scheduling after context complete · f100daec
      Ping Gao authored
      The time based scheduler poll context busy status at every
      micro-second during vGPU switch, it will make GPU idle for a while
      when the context is very small and completed before the next
      micro-second arrival. Trigger scheduling immediately after context
      complete will eliminate GPU idle and improve performance.
      
      Create two vGPU with same type, run Heaven simultaneously:
      Before this patch:
       +---------+----------+----------+
       |         |  vGPU1   |   vGPU2  |
       +---------+----------+----------+
       |  Heaven |  357     |    354   |
       +-------------------------------+
      
      After this patch:
       +---------+----------+----------+
       |         |  vGPU1   |   vGPU2  |
       +---------+----------+----------+
       |  Heaven |  397     |    398   |
       +-------------------------------+
      
      v2: Let need_reschedule protect by gvt-lock.
      Signed-off-by: default avatarPing Gao <ping.a.gao@intel.com>
      Signed-off-by: default avatarWeinan Li <weinan.z.li@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      f100daec
    • Ping Gao's avatar
      drm/i915/gvt: Support event based scheduling · c713cb2f
      Ping Gao authored
      This patch decouple the time slice calculation and scheduler, let
      other event be able to trigger scheduling without impact the
      calculation for QoS.
      
      v2: add only one new enum definition.
      v3: fix typo.
      Signed-off-by: default avatarPing Gao <ping.a.gao@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      c713cb2f
    • Xiong Zhang's avatar
      drm/i915/gvt: Delete gvt_dbg_cmd() in cmd_parser_exec() · 089f93c3
      Xiong Zhang authored
      Since cmd message have been recorded in trace, gvt_dbg_cmd isn't
      necessary. This will reduce much of dmesg as gvt_dbg_cmd is repeated
      on each workload.
      Signed-off-by: default avatarXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      089f93c3
    • Xiong Zhang's avatar
      drm/i915/gvt: Change flood gvt dmesg into trace · 7fb6a7d6
      Xiong Zhang authored
      Currently gvt dmesg is so heavy at drm.debug=0x2 that guest and
      host almost couldn't run on xengt.
      
      This patch transfer these repeated messages into trace, so dmesg
      is light at drm.debug=0x2, and user could get the target message through
      trace event and trace filter.
      Suggested-by: default avatarZhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: default avatarXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      7fb6a7d6
    • Changbin Du's avatar
      drm/i915/gvt: clean up the unused last_ctx_submit_time of struct intel_vgpu · 7b8d5758
      Changbin Du authored
      Clean up it as it is not used now.
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      7b8d5758
    • Weinan Li's avatar
      drm/i915/gvt: add RING_INSTDONE and SC_INSTDONE mmio handler in GVT-g · 23ce0592
      Weinan Li authored
      kernel hangcheck needs to check RING_INSTDONE and SC_INSTDONE registers'
      state to know if hardware is still running. In GVT-g environment, we need
      to emulate these registers changing for all the guests although they are
      not render owner. Here we return the physical state for all the guests,
      then if INSTDONE is changing guest can know hardware is still running
      although its workload is pending.
      
      Read INSTDONE isn't one correct way to know if guest trigger gfx reset,
      especially with Linux guest, it will read ACTH first, then check INSTDONE
      and SUBSLICE registers to check if hardware is still running, at last
      trigger gfx reset when it finds all the registers is frozen. In Windows
      guest, read INSTDONE usually happens when OS detect TDR.
      
      With the difference between Windows and Linux guest, "disable_warn_untrack"
      may let debug log run into wrong state(Linux guest trigger hangcheck
      with no ACTHD changed, then check INSTDONE), but actually there is no TDR
      happened.
      
      The new policy is always WARN with untrack MMIO r/w. Bad effect is many
      noisy untrack mmio warning logs exist when real TDR happen. Even so you can
      control the log output or not by setting the debug mask bit.
      
      v2: remove log in instdone_mmio_read
      Suggested-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarWeinan Li <weinan.z.li@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      23ce0592
    • Changbin Du's avatar
      drm/i915/gvt: implement per-vm mmio switching optimization · 0e86cc9c
      Changbin Du authored
      Commit ab9da627906a ("drm/i915: make context status notifier head be
      per engine") gives us a chance to inspect every single request. Then
      we can eliminate unnecessary mmio switching for same vGPU. We only
      need mmio switching for different VMs (including host).
      
      This patch introduced a new general API intel_gvt_switch_mmio() to
      replace the old intel_gvt_load/restore_render_mmio(). This function
      can be further optimized for vGPU to vGPU switching.
      
      To support individual ring switch, we track the owner who occupy
      each ring. When another VM or host request a ring we do the mmio
      context switching. Otherwise no need to switch the ring.
      
      This optimization is very useful if only one guest has plenty of
      workloads and the host is mostly idle. The best case is no mmio
      switching will happen.
      
      v2:
        o fix missing ring switch issue. (chuanxiao)
        o support individual ring switch.
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Reviewed-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      0e86cc9c
    • Changbin Du's avatar
      drm/i915/gvt: refactor function intel_vgpu_submit_execlist · 5d0f5de1
      Changbin Du authored
      The function intel_vgpu_submit_execlist could be more simpler. It
      actually does:
        1) validate the submission. The first context must be valid,
           and all two must be privilege_access.
        2) submit valid contexts. The first one need emulate schedule_in.
      
      We do not need a bitmap, valid desc copy valid_desc. Local variable
      emulate_schedule_in also can be optimized out.
      
      v2: dump desc content in err msg (Zhi Wang)
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Reviewed-by: default avatarZhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      5d0f5de1
    • Changbin Du's avatar
      drm/i915/gvt: rewrite the trace gvt:gvt_command using trace style approach · ffc19776
      Changbin Du authored
      The gvt:gvt_command trace involve unnecessary overhead even this trace is
      not enabled. We need improve it.
      
      The kernel trace infrastructure provide a full api to define a trace event.
      We should leverage them if possible. And one important thing is that a trace
      point should store raw data but not format string.
      
      This patch include two part work:
      1) Refactor the gvt_command trace definition, including:
        o only store raw trace data.
        o use __dynamic_array() to declare a variable size buffer.
        o use __print_array() to format raw cmd data.
        o rename vm_id as vgpu_id.
      
      2) Improve the trace invoking, including:
        o remove the cycles calculation for handler. We can get this data
          by any perf tool.
        o do not make a backup for raw cmd data which just doesn't make sense.
      
      With this patch, this trace has no overhead if it is not enabled. And we are
      trace style now.
      
      The final output example:
        gvt workload 0-211   [000] ...1   120.555964: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e880, raw cmd {0x4000000}
        gvt workload 0-211   [000] ...1   120.556014: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e884, raw cmd {0x7a000004,0x1004000,0xe1511018,0x0,0x7d,0x0}
        gvt workload 0-211   [000] ...1   120.556062: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e89c, raw cmd {0x7a000004,0x140000,0x0,0x0,0x0,0x0}
        gvt workload 0-211   [000] ...1   120.556110: gvt_command: vgpu1 ring 0: buf_type 0, ip_gma e161e8b4, raw cmd {0x10400002,0xe1511018,0x0,0x7d}
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      ffc19776
  2. 29 May, 2017 1 commit
  3. 26 May, 2017 6 commits
  4. 25 May, 2017 3 commits
  5. 24 May, 2017 2 commits
  6. 23 May, 2017 2 commits
  7. 22 May, 2017 3 commits
  8. 19 May, 2017 6 commits
  9. 18 May, 2017 5 commits