1. 11 9月, 2018 2 次提交
  2. 06 9月, 2018 1 次提交
  3. 04 9月, 2018 4 次提交
  4. 03 9月, 2018 1 次提交
    • Z
      drm/i915/gvt: Give new born vGPU higher scheduling chance · 54ff01fd
      Zhenyu Wang 提交于
      This trys to give new born vGPU with higher scheduling chance
      not only with adding to sched list head and also have higher
      priority for workload sched for 2 seconds after starting to
      schedule it. In order for fast GPU execution during VM boot,
      and ensure guest driver setup with required state given in time.
      
      This fixes recent failure seen on one VM with multiple linux VMs
      running on kernel with commit 2621cefa("drm/i915: Provide a timeout to i915_gem_wait_for_idle() on setup"),
      which had shorter setup timeout that caused context state init failed.
      
      v2: change to 2s for higher scheduling period
      
      Cc: Yuan Hang <hang.yuan@intel.com>
      Reviewed-by: NHang Yuan <hang.yuan@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      54ff01fd
  5. 30 8月, 2018 8 次提交
    • Z
      drm/i915/gvt: Fix drm_format_mod value for vGPU plane · b244ffa1
      Zhenyu Wang 提交于
      Physical plane's tiling mode value is given directly as
      drm_format_mod for plane query, which is not correct fourcc
      code. Fix it by using correct intel tiling fourcc mod definition.
      
      Current qemu seems also doesn't correctly utilize drm_format_mod
      for plane object setting. Anyway this is required to fix the usage.
      
      v3: use DRM_FORMAT_MOD_LINEAR, fix comment
      
      v2: Fix missed old 'tiled' use for stride calculation
      
      Fixes: e546e281 ("drm/i915/gvt: Dmabuf support for GVT-g")
      Cc: Tina Zhang <tina.zhang@intel.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Colin Xu <Colin.Xu@intel.com>
      Reviewed-by: NColin Xu <Colin.Xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      b244ffa1
    • H
      drm/i915/gvt: move intel_runtime_pm_get out of spin_lock in stop_schedule · b2b599fb
      Hang Yuan 提交于
      pm_runtime_get_sync in intel_runtime_pm_get might sleep if i915
      device is not active. When stop vgpu schedule, the device may be
      inactive. So need to move runtime_pm_get out of spin_lock/unlock.
      
      Fixes: b24881e0("drm/i915/gvt: Add runtime_pm_get/put into gvt_switch_mmio
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHang Yuan <hang.yuan@linux.intel.com>
      Signed-off-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      b2b599fb
    • C
      drm/i915/gvt: Handle GEN9_WM_CHICKEN3 with F_CMD_ACCESS. · b9b824a5
      Colin Xu 提交于
      Recent patch introduce strict check on scanning cmd:
      Commit 8d458ea0 ("drm/i915/gvt: return error on cmd access")
      
      Before 8d458ea0, if cmd_reg_handler() checks that a cmd access a mmio
      that not marked as F_CMD_ACCESS, it simply returns 0 and log an error.
      Now it will return -EBADRQC which will cause the workload fail to submit.
      
      On BXT, i915 applies WaClearHIZ_WM_CHICKEN3 which will program
      GEN9_WM_CHICKEN3 by LRI when init wa ctx. If it has no F_CMD_ACCESS flag,
      vgpu will fail to start. Also add F_MODE_MASK since it's mode mask reg.
      
      v2: Refresh commit message to elaborate issue symptom in detail.
      v3: Make SKL_PLUS share same handling since GEN9_WM_CHICKEN3 should be
          F_CMD_ACCESS from HW aspect. (yan, zhenyu)
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Acked-by: NZhao Yan <yan.y.zhao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      b9b824a5
    • C
      drm/i915/gvt: Make correct handling to vreg BXT_PHY_CTL_FAMILY · c8ab5ac3
      Colin Xu 提交于
      Guest kernel will write to BXT_PHY_CTL_FAMILY to reset DDI PHY
      and pull BXT_PHY_CTL to check PHY status. Previous handling will
      set/reset BXT_PHY_CTL of all PHYs at same time on receiving vreg
      write to some BXT_PHY_CTL_FAMILY. If some BXT_PHY_CTL is already
      enabled, following reset to another BXT_PHY_CTL_FAMILY will clear
      the enabled BXT_PHY_CTL, which result in guest kernel print:
      
      -----------------------------------
      [drm:intel_ddi_get_hw_state [i915]]
      *ERROR* Port B enabled but PHY powered down? (PHY_CTL 00000000)
      -----------------------------------
      
      The correct handling should operate BXT_PHY_CTL_FAMILY and
      BXT_PHY_CTL on the same DDI.
      
      v2: Use correct reg define. The naming looks confusing, however
          current i915_reg.h bind DPIO_PHY0 to _PHY_CTL_FAMILY_DDI and
          bind DPIO_PHY1 to _PHY_CTL_FAMILY_EDP, pairing to
          _BXT_PHY_CTL_DDI_A and _BXT_PHY_CTL_DDI_B respectively.
      v3: v2 incorrectly map _PHY_CTL_FAMILY_EDP to _BXT_PHY_CTL_DDI_A.
          BXT_PHY_CTL() looks up DDI using PORTx but not PHYx. Based on
          DPIO_PHY to DDI mapping, make correct vreg handle to BXT_PHY_CTL
          on receiving vreg write to BXT_PHY_CTL_FAMILY. (He, Min)
      
      Current mapping according to bxt_power_wells:
      dpio-common-a:
          >>> DPIO_PHY1
          >>> BXT_DPIO_CMN_A_POWER_DOMAINS
          >>> POWER_DOMAIN_PORT_DDI_A_LANES
          >>> PORT_A
      
      dpio-common-bc:
          >>> DPIO_PHY0
          >>> BXT_DPIO_CMN_BC_POWER_DOMAINS
          >>> POWER_DOMAIN_PORT_DDI_B_LANES | POWER_DOMAIN_PORT_DDI_C_LANES
          >>> PORT_B or PORT_C
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Reviewed-by: NHe, Min <min.he@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      c8ab5ac3
    • X
      drm/i915/gvt: emulate gen9 dbuf ctl register access · 9174c1d6
      Xiaolin Zhang 提交于
      there is below call track at boot time when booting guest
      with kabylake vgpu with specifal configuration and this try to fix it.
      
      [drm:gen9_dbuf_enable [i915]] *ERROR* DBuf power enable timeout
      ------------[ cut here ]------------
      WARNING: gen9_dc_off_power_well_enable+0x224/0x230 [i915]
      Unexpected DBuf power power state (0x8000000a)
      Hardware name: Red Hat KVM, BIOS 1.11.0-2.el7 04/01/2014
      Call Trace:
       [<ffffffff99d24408>] dump_stack+0x19/0x1b
       [<ffffffff996926d8>] __warn+0xd8/0x100
       [<ffffffff9969275f>] warn_slowpath_fmt+0x5f/0x80
       [<ffffffffc07bbae4>] gen9_dc_off_power_well_enable+0x224/0x230 [i915]
       [<ffffffffc07ba9d2>] intel_power_well_enable+0x42/0x50 [i915]
       [<ffffffffc07baa6a>] __intel_display_power_get_domain+0x8a/0xb0 [i915]
       [<ffffffffc07bdb93>] intel_display_power_get+0x33/0x50 [i915]
       [<ffffffffc07bdf95>] intel_display_set_init_power+0x45/0x50 [i915]
       [<ffffffffc07be003>] intel_power_domains_init_hw+0x63/0x8a0 [i915]
       [<ffffffffc07995c3>] i915_driver_load+0xae3/0x1760 [i915]
       [<ffffffff99bd6580>] ? nvmem_register+0x500/0x500
       [<ffffffffc07a476c>] i915_pci_probe+0x2c/0x50 [i915]
       [<ffffffff9999cfea>] local_pci_probe+0x4a/0xb0
       [<ffffffff9999e729>] pci_device_probe+0x109/0x160
       [<ffffffff99a79aa5>] driver_probe_device+0xc5/0x3e0
       [<ffffffff99a79ea3>] __driver_attach+0x93/0xa0
       [<ffffffff99a79e10>] ? __device_attach+0x50/0x50
       [<ffffffff99a77645>] bus_for_each_dev+0x75/0xc0
       [<ffffffff99a7941e>] driver_attach+0x1e/0x20
       [<ffffffff99a78ec0>] bus_add_driver+0x200/0x2d0
       [<ffffffff99a7a534>] driver_register+0x64/0xf0
       [<ffffffff9999df65>] __pci_register_driver+0xa5/0xc0
       [<ffffffffc0929000>] ? 0xffffffffc0928fff
       [<ffffffffc0929059>] i915_init+0x59/0x5c [i915]
       [<ffffffff9960210a>] do_one_initcall+0xba/0x240
       [<ffffffff9971108c>] load_module+0x272c/0x2bc0
       [<ffffffff9997b990>] ? ddebug_proc_write+0xf0/0xf0
       [<ffffffff997115e5>] SyS_init_module+0xc5/0x110
       [<ffffffff99d36795>] system_call_fastpath+0x1c/0x21
      Signed-off-by: NXiaolin Zhang <xiaolin.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      9174c1d6
    • C
      drm/i915/audio: Hook up component bindings even if displays are disabled · 80ab3169
      Chris Wilson 提交于
      If the display has been disabled by modparam, we still want to connect
      together the HW bits and bobs with the associated drivers so that we can
      continue to manage their runtime power gating.
      
      Fixes: 10810944 ("drm/i915: Check num_pipes before initializing audio component")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Elaine Wang <elaine.wang@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180817100241.4628-1-chris@chris-wilson.co.uk
      (cherry picked from commit 35a5fd9e)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      80ab3169
    • F
      drm/i915: Increase LSPCON timeout · 299c2a90
      Fredrik Schön 提交于
      100 ms is not enough time for the LSPCON adapter on Intel NUC devices to
      settle. This causes dropped display modes at boot or screen reconfiguration.
      Empirical testing can reproduce the error up to a timeout of 190 ms. Basic
      boot and stress testing at 200 ms has not (yet) failed.
      
      Increase timeout to 400 ms to get some margin of error.
      
      Changes from v1:
      The initial suggestion of 1000 ms was lowered due to concerns about delaying
      valid timeout cases.
      Update patch metadata.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107503
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1570392
      Fixes: 357c0ae9 ("drm/i915/lspcon: Wait for expected LSPCON mode to settle")
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: <stable@vger.kernel.org> # v4.11+
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NShashank Sharma <shashank.sharma@intel.com>
      Signed-off-by: NFredrik Schön <fredrik.schon@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180817200728.8154-1-fredrik.schon@gmail.com
      (cherry picked from commit 59f1c8ab30d6f9042562949f42cbd3f3cf69de94)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      299c2a90
    • C
      drm/i915: Stop holding a ref to the ppgtt from each vma · f013027e
      Chris Wilson 提交于
      The context owns both the ppgtt and the vma within it, and our activity
      tracking on the context ensures that we do not release active ppgtt. As
      the context fulfils our obligations for active memory tracking, we can
      relinquish the reference from the vma.
      
      This fixes a silly transient refleak from closed vma being kept alive
      until the entire system was idle, keeping all vm alive as well.
      Reported-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Testcase: igt/gem_ctx_create/files
      Fixes: 3365e226 ("drm/i915: Lazily unbind vma on close")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Tested-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180816073448.19396-1-chris@chris-wilson.co.uk
      (cherry picked from commit a4417b7b419a68540ad7945ac4efbb39d19afa63)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      f013027e
  6. 29 8月, 2018 2 次提交
  7. 23 8月, 2018 2 次提交
    • N
      include/linux/compiler*.h: make compiler-*.h mutually exclusive · 815f0ddb
      Nick Desaulniers 提交于
      Commit cafa0010 ("Raise the minimum required gcc version to 4.6")
      recently exposed a brittle part of the build for supporting non-gcc
      compilers.
      
      Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and
      __GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't
      added compiler specific checks for __clang__ or __INTEL_COMPILER.
      
      This is brittle, as they happened to get compatibility by posing as a
      certain version of GCC.  This broke when upgrading the minimal version
      of GCC required to build the kernel, to a version above what ICC and
      Clang claim to be.
      
      Rather than always including compiler-gcc.h then undefining or
      redefining macros in compiler-intel.h or compiler-clang.h, let's
      separate out the compiler specific macro definitions into mutually
      exclusive headers, do more proper compiler detection, and keep shared
      definitions in compiler_types.h.
      
      Fixes: cafa0010 ("Raise the minimum required gcc version to 4.6")
      Reported-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Suggested-by: NEli Friedman <efriedma@codeaurora.org>
      Suggested-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      815f0ddb
    • M
      mm, oom: distinguish blockable mode for mmu notifiers · 93065ac7
      Michal Hocko 提交于
      There are several blockable mmu notifiers which might sleep in
      mmu_notifier_invalidate_range_start and that is a problem for the
      oom_reaper because it needs to guarantee a forward progress so it cannot
      depend on any sleepable locks.
      
      Currently we simply back off and mark an oom victim with blockable mmu
      notifiers as done after a short sleep.  That can result in selecting a new
      oom victim prematurely because the previous one still hasn't torn its
      memory down yet.
      
      We can do much better though.  Even if mmu notifiers use sleepable locks
      there is no reason to automatically assume those locks are held.  Moreover
      majority of notifiers only care about a portion of the address space and
      there is absolutely zero reason to fail when we are unmapping an unrelated
      range.  Many notifiers do really block and wait for HW which is harder to
      handle and we have to bail out though.
      
      This patch handles the low hanging fruit.
      __mmu_notifier_invalidate_range_start gets a blockable flag and callbacks
      are not allowed to sleep if the flag is set to false.  This is achieved by
      using trylock instead of the sleepable lock for most callbacks and
      continue as long as we do not block down the call chain.
      
      I think we can improve that even further because there is a common pattern
      to do a range lookup first and then do something about that.  The first
      part can be done without a sleeping lock in most cases AFAICS.
      
      The oom_reaper end then simply retries if there is at least one notifier
      which couldn't make any progress in !blockable mode.  A retry loop is
      already implemented to wait for the mmap_sem and this is basically the
      same thing.
      
      The simplest way for driver developers to test this code path is to wrap
      userspace code which uses these notifiers into a memcg and set the hard
      limit to hit the oom.  This can be done e.g.  after the test faults in all
      the mmu notifier managed memory and set the hard limit to something really
      small.  Then we are looking for a proper process tear down.
      
      [akpm@linux-foundation.org: coding style fixes]
      [akpm@linux-foundation.org: minor code simplification]
      Link: http://lkml.kernel.org/r/20180716115058.5559-1-mhocko@kernel.orgSigned-off-by: NMichal Hocko <mhocko@suse.com>
      Acked-by: Christian König <christian.koenig@amd.com> # AMD notifiers
      Acked-by: Leon Romanovsky <leonro@mellanox.com> # mlx and umem_odp
      Reported-by: NDavid Rientjes <rientjes@google.com>
      Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>
      Cc: Dennis Dalessandro <dennis.dalessandro@intel.com>
      Cc: Sudeep Dutt <sudeep.dutt@intel.com>
      Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Felix Kuehling <felix.kuehling@amd.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      93065ac7
  8. 16 8月, 2018 4 次提交
  9. 14 8月, 2018 6 次提交
    • Y
      drm/i915/gvt: fix memory leak in intel_vgpu_ioctl() · 7590ebb8
      Yi Wang 提交于
      The 'sparse' variable may leak when return in function
      intel_vgpu_ioctl(), and this patch fix this.
      Signed-off-by: NYi Wang <wang.yi59@zte.com.cn>
      Reviewed-by: NJiang Biao <jiang.biao2@zte.com.cn>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      7590ebb8
    • D
      drm/i915/gvt: Off by one in intel_vgpu_write_fence() · 4b25e737
      Dan Carpenter 提交于
      The > should be >= here so that we don't read one element beyond the
      end of the array.
      
      Fixes: 28a60dee ("drm/i915/gvt: vGPU HW resource management")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      4b25e737
    • G
      drm/i915/kvmgt: Fix potential Spectre v1 · de5372da
      Gustavo A. R. Silva 提交于
      info.index can be indirectly controlled by user-space, hence leading
      to a potential exploitation of the Spectre variant 1 vulnerability.
      
      This issue was detected with the help of Smatch:
      
      drivers/gpu/drm/i915/gvt/kvmgt.c:1232 intel_vgpu_ioctl() warn:
      potential spectre issue 'vgpu->vdev.region' [r]
      
      Fix this by sanitizing info.index before indirectly using it to index
      vgpu->vdev.region
      
      Notice that given that speculation windows are large, the policy is
      to kill the speculation on the first load and not worry if it can be
      completed with a dependent load/store [1].
      
      [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      de5372da
    • Z
      drm/i915/gvt: return error on cmd access · 8d458ea0
      Zhao Yan 提交于
      If a register is not cmd accessible, should not just print error
      message. Return error here so as not to deliver this cmd.
      
      v2: return -EBADRQC to align with return value elsewhere. (kevin tian)
      Signed-off-by: NZhao Yan <yan.y.zhao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      8d458ea0
    • H
      drm/i915/gvt: initialize dmabuf mutex in vgpu_create · d6c6113b
      Hang Yuan 提交于
      Currently, the mutex used in GVT dmabuf support is not initialized until
      vgpu device is opened. If one vgpu device is opened and then removed, the
      mutex will be used in vgpu remove operation without initialization. This
      patch initializes the mutex in vgpu create operation to avoid the problem.
      
      Fixes: e546e281("drm/i915/gvt: Dmabuf support for GVT-g")
      Signed-off-by: NHang Yuan <hang.yuan@linux.intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      d6c6113b
    • H
      drm/i915/gvt: fix cleanup sequence in intel_gvt_clean_device · 3fd34ac0
      Hang Yuan 提交于
      Create one vGPU and then unbind IGD device from i915 driver. The following
      oops will happen. This patch will free vgpu resource first and then gvt
      resource to remove these oops.
      
      BUG: unable to handle kernel NULL pointer dereference at       00000000000000a8
        PGD 80000003c9d2c067 P4D 80000003c9d2c067 PUD 3c817c067 P      MD 0
        Oops: 0002 [#1] SMP PTI
        RIP: 0010:down_write+0x1b/0x40
      Call Trace:
        debugfs_remove_recursive+0x46/0x1a0
        intel_gvt_debugfs_remove_vgpu+0x15/0x30 [i915]
        intel_gvt_destroy_vgpu+0x2d/0xf0 [i915]
        intel_vgpu_remove+0x2c/0x30 [kvmgt]
        mdev_device_remove_ops+0x23/0x50 [mdev]
        mdev_device_remove+0xdb/0x190 [mdev]
        mdev_device_remove+0x190/0x190 [mdev]
        device_for_each_child+0x47/0x90
        mdev_unregister_device+0xd5/0x120 [mdev]
        intel_gvt_clean_device+0x91/0x120 [i915]
        i915_driver_unload+0x9d/0x120 [i915]
        i915_pci_remove+0x15/0x20 [i915]
        pci_device_remove+0x3b/0xc0
        device_release_driver_internal+0x157/0x230
        unbind_store+0xfc/0x150
        kernfs_fop_write+0x10f/0x180
        __vfs_write+0x36/0x180
        ? common_file_perm+0x41/0x130
        ? _cond_resched+0x16/0x40
        vfs_write+0xb3/0x1a0
        ksys_write+0x52/0xc0
        do_syscall_64+0x55/0x100
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      BUG: unable to handle kernel NULL pointer dereference at 0      000000000000038
        PGD 8000000405bce067 P4D 8000000405bce067 PUD 405bcd067 PM      D 0
        Oops: 0000 [#1] SMP PTI
        RIP: 0010:hrtimer_active+0x5/0x40
      Call Trace:
        hrtimer_try_to_cancel+0x25/0x120
        ? tbs_sched_clean_vgpu+0x1f/0x50 [i915]
        hrtimer_cancel+0x15/0x20
        intel_gvt_destroy_vgpu+0x4c/0xf0 [i915]
        intel_vgpu_remove+0x2c/0x30 [kvmgt]
        mdev_device_remove_ops+0x23/0x50 [mdev]
        mdev_device_remove+0xdb/0x190 [mdev]
        ? mdev_device_remove+0x190/0x190 [mdev]
        device_for_each_child+0x47/0x90
        mdev_unregister_device+0xd5/0x120 [mdev]
        intel_gvt_clean_device+0x89/0x120 [i915]
        i915_driver_unload+0x9d/0x120 [i915]
        i915_pci_remove+0x15/0x20 [i915]
        pci_device_remove+0x3b/0xc0
        device_release_driver_internal+0x157/0x230
        unbind_store+0xfc/0x150
        kernfs_fop_write+0x10f/0x180
        __vfs_write+0x36/0x180
        ? common_file_perm+0x41/0x130
        ? _cond_resched+0x16/0x40
        vfs_write+0xb3/0x1a0
        ksys_write+0x52/0xc0
        do_syscall_64+0x55/0x100
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: bc7b0be3("drm/i915/gvt: Add basic debugfs infrastructure")
      Fixes: afe04fbe("drm/i915/gvt: create an idle vGPU")
      Signed-off-by: NHang Yuan <hang.yuan@linux.intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      3fd34ac0
  10. 13 8月, 2018 1 次提交
  11. 07 8月, 2018 6 次提交
  12. 05 8月, 2018 1 次提交
    • N
      x86: Don't include linux/irq.h from asm/hardirq.h · 447ae316
      Nicolai Stange 提交于
      The next patch in this series will have to make the definition of
      irq_cpustat_t available to entering_irq().
      
      Inclusion of asm/hardirq.h into asm/apic.h would cause circular header
      dependencies like
      
        asm/smp.h
          asm/apic.h
            asm/hardirq.h
              linux/irq.h
                linux/topology.h
                  linux/smp.h
                    asm/smp.h
      
      or
      
        linux/gfp.h
          linux/mmzone.h
            asm/mmzone.h
              asm/mmzone_64.h
                asm/smp.h
                  asm/apic.h
                    asm/hardirq.h
                      linux/irq.h
                        linux/irqdesc.h
                          linux/kobject.h
                            linux/sysfs.h
                              linux/kernfs.h
                                linux/idr.h
                                  linux/gfp.h
      
      and others.
      
      This causes compilation errors because of the header guards becoming
      effective in the second inclusion: symbols/macros that had been defined
      before wouldn't be available to intermediate headers in the #include chain
      anymore.
      
      A possible workaround would be to move the definition of irq_cpustat_t
      into its own header and include that from both, asm/hardirq.h and
      asm/apic.h.
      
      However, this wouldn't solve the real problem, namely asm/harirq.h
      unnecessarily pulling in all the linux/irq.h cruft: nothing in
      asm/hardirq.h itself requires it. Also, note that there are some other
      archs, like e.g. arm64, which don't have that #include in their
      asm/hardirq.h.
      
      Remove the linux/irq.h #include from x86' asm/hardirq.h.
      
      Fix resulting compilation errors by adding appropriate #includes to *.c
      files as needed.
      
      Note that some of these *.c files could be cleaned up a bit wrt. to their
      set of #includes, but that should better be done from separate patches, if
      at all.
      Signed-off-by: NNicolai Stange <nstange@suse.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      447ae316
  13. 30 7月, 2018 1 次提交
  14. 26 7月, 2018 1 次提交