1. 16 11月, 2017 8 次提交
  2. 27 10月, 2017 1 次提交
  3. 08 9月, 2017 3 次提交
    • F
      drm/i915/gvt: Refine error handling for prepare_execlist_workload · 0cce2823
      fred gao 提交于
      refine the error handling for prepare_execlist_workload to restore to the
      original states once error occurs.
      
      only release the shadowed batch buffer and wa ctx when the workload is
      completed successfully.
      
      v2:
      - split the mixed several error paths for better review. (Zhenyu)
      
      v3:
      - handle prepare batch buffer/wa ctx pin errors and
      - emulate_schedule_in null issue. (Zhenyu)
      
      v4:
      - no need to handle emulate_schedule_in null issue. (Zhenyu)
      
      v5:
      - release the shadowed batch buffer and wa ctx only for the
        successful workload. (Zhenyu)
      
      v6:
      - polish the return style. (Zhenyu)
      Signed-off-by: Nfred gao <fred.gao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      0cce2823
    • F
      drm/i915/gvt: Add error handling for intel_gvt_scan_and_shadow_workload · a3cfdca9
      fred gao 提交于
      When an error occurs after shadow_indirect_ctx, this patch is to do the
      proper cleanup and rollback to the original states for shadowed indirect
      context before the workload is abandoned.
      
      v2:
      - split the mixed several error paths for better review. (Zhenyu)
      
      v3:
      - no return check for clean up functions. (Changbin)
      
      v4:
      - expose and reuse the existing release_shadow_wa_ctx. (Zhenyu)
      
      v5:
      - move the release function to scheduler.c file. (Zhenyu)
      
      v6:
      - move error handling code of intel_gvt_scan_and_shadow_workload
        to here. (Zhenyu)
      Signed-off-by: Nfred gao <fred.gao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      a3cfdca9
    • F
      drm/i915/gvt: Separate cmd scan from request allocation · 0a53bc07
      fred gao 提交于
      Currently i915 request structure and shadow ring buffer are allocated
      before command scan, so it will have to restore to previous states once
      any error happens afterwards in the long dispatch_workload path.
      
      This patch is to introduce a reserved ring buffer created at the beginning
      of vGPU initialization. Workload will be coped to this reserved buffer and
      be scanned first, the i915 request and shadow ring buffer are only
      allocated after the result of scan is successful.
      
      To balance the memory usage and buffer alloc time, the coming bigger ring
      buffer will be reallocated and kept until more bigger buffer is coming.
      
      v2:
      - use kmalloc for the smaller ring buffer, realloc if required. (Zhenyu)
      
      v3:
      - remove the dynamically allocated ring buffer. (Zhenyu)
      
      v4:
      - code style polish.
      - kfree previous allocated buffer once kmalloc failed. (Zhenyu)
      Signed-off-by: Nfred gao <fred.gao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      0a53bc07
  4. 10 8月, 2017 3 次提交
  5. 02 8月, 2017 2 次提交
  6. 08 6月, 2017 1 次提交
  7. 24 5月, 2017 1 次提交
    • C
      drm/i915/gvt: clean up unsubmited workloads before destroying kmem cache · e274086e
      Changbin Du 提交于
      This is to fix a memory leak issue caused by unfreed gvtg workload objects.
      Walk through the workload list and free all of the remained workloads
      before destroying kmem cache.
      
      [179.885211] INFO: Object 0xffff9cef10003b80 @offset=7040
      [179.885657] kmem_cache_destroy gvt-g_vgpu_workload: Slab cache still has objects
      [179.886146] CPU: 2 PID: 2318 Comm: win_lucas Tainted: G    B   W       4.11.0+ #1
      [179.887223] Call Trace:
      [179.887394]  dump_stack+0x63/0x90
      [179.887617]  kmem_cache_destroy+0x1cf/0x1e0
      [179.887960]  intel_vgpu_clean_execlist+0x15/0x20 [i915]
      [179.888365]  intel_gvt_destroy_vgpu+0x4c/0xd0 [i915]
      [179.888688]  intel_vgpu_remove+0x2a/0x30 [kvmgt]
      [179.888988]  mdev_device_remove_ops+0x23/0x50 [mdev]
      [179.889309]  mdev_device_remove+0xe4/0x190 [mdev]
      [179.889615]  remove_store+0x7d/0xb0 [mdev]
      [179.889885]  dev_attr_store+0x18/0x30
      [179.890129]  sysfs_kf_write+0x37/0x40
      [179.890371]  kernfs_fop_write+0x107/0x180
      [179.890632]  __vfs_write+0x37/0x160
      [179.890865]  ? kmem_cache_alloc+0xd7/0x1b0
      [179.891116]  ? apparmor_file_permission+0x1a/0x20
      [179.891372]  ? security_file_permission+0x3b/0xc0
      [179.891628]  vfs_write+0xb8/0x1b0
      [179.891812]  SyS_write+0x55/0xc0
      [179.891992]  entry_SYSCALL_64_fastpath+0x1e/0xad
      Signed-off-by: NChangbin Du <changbin.du@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      e274086e
  8. 18 4月, 2017 1 次提交
  9. 12 4月, 2017 1 次提交
  10. 06 4月, 2017 1 次提交
  11. 29 3月, 2017 1 次提交
  12. 17 3月, 2017 1 次提交
    • T
      drm/i915/gvt: replace the gvt_err with gvt_vgpu_err · 695fbc08
      Tina Zhang 提交于
      gvt_err should be used only for the very few critical error message
      during host i915 drvier initialization. This patch
      1. removes the redundant gvt_err;
      2. creates a new gvt_vgpu_err to show errors caused by vgpu;
      3. replaces the most gvt_err with gvt_vgpu_err;
      4. leaves very few gvt_err for dumping gvt error during host gvt
         initialization.
      
      v2. change name to gvt_vgpu_err and add vgpu id to the message. (Kevin)
          add gpu id to gvt_vgpu_err. (Zhi)
      v3. remove gpu id from gvt_vgpu_err caller. (Zhi)
      v4. add vgpu check to the gvt_vgpu_err macro. (Zhiyuan)
      v5. add comments for v3 and v4.
      v6. split the big patch into two, with this patch only for checking
          gvt_vgpu_err. (Zhenyu)
      v7. rebase to staging branch
      v8. rebase to fix branch
      Signed-off-by: NTina Zhang <tina.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      695fbc08
  13. 10 2月, 2017 1 次提交
    • C
      drm/i915/gvt: fix crash at function release_shadow_wa_ctx · 7e5f3d30
      Changbin Du 提交于
      In function dispatch_workload(), if it fail before calling
      intel_gvt_scan_and_shadow_wa_ctx(), the indirect ctx will
      not be shadowed so no cleaup need. wa_ctx->indirect_ctx.obj
      indicate whether indirect_ctx is shadowed. The obj is null
      if it is unshadowed.
      
      BUG: unable to handle kernel NULL pointer dereference at
      00000000000001a0
      IP: complete_execlist_workload+0x2c9/0x3e0 [i915]
      Oops: 0002 [#1] SMP
      task: ffff939546d2d880 task.stack: ffffbd9b82ac4000
      RIP: 0010:complete_execlist_workload+0x2c9/0x3e0 [i915]
      RSP: 0018:ffffbd9b82ac7dd8 EFLAGS: 00010202
      RAX: 0000000000000000 RBX: ffff9393c725b540 RCX: 0000000000000006
      RDX: 0000000000000007 RSI: 0000000000000202 RDI: ffff939559c8dd00
      RBP: ffffbd9b82ac7e18 R08: 0000000000000001 R09: 000000000120dd8f
      R10: 0000000000000000 R11: 000000000120dd8f R12: ffff9393c725b540
      R13: ffff9393c725b618 R14: ffffbd9b81f0d000 R15: ffff939520e0e000
      FS:  0000000000000000(0000) GS:ffff939559c80000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000000001a0 CR3: 000000043d664000 CR4: 00000000003426e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       workload_thread+0x312/0xd70 [i915]
       ? __wake_up_sync+0x20/0x20
       ? wake_atomic_t_function+0x60/0x60
       kthread+0x101/0x140
      Signed-off-by: NChangbin Du <changbin.du@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      7e5f3d30
  14. 25 1月, 2017 1 次提交
  15. 17 1月, 2017 1 次提交
  16. 14 11月, 2016 1 次提交
    • D
      drm/i915/gvt: fix crash in vgpu_reset_execlist · 0427f06a
      Du, Changbin 提交于
      We initiate vgpu->workload_q_head via for_each_engine
      macro which may skip unavailable engines. So we should
      follow this rule anywhere. The function
      intel_vgpu_reset_execlist is not aware of this. Kernel
      crash when touch a uninitiated vgpu->workload_q_head[x].
      Let's fix it by using for_each_engine_masked and skip
      unavailable engine ID. Meanwhile rename ring_bitmap to
      general name engine_mask.
      
      v2: remove unnecessary engine activation check (zhenyu)
      Signed-off-by: NDu, Changbin <changbin.du@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      0427f06a
  17. 20 10月, 2016 9 次提交
  18. 18 10月, 2016 1 次提交
  19. 14 10月, 2016 2 次提交