On 5/20/26 10:07, Mikhail Gavrilov wrote: > On Wed, May 20, 2026 at 12:08 PM Christian König > <[email protected]> wrote: >> >> That whole infrastructure is superflous. You just need to modify >> amdgpu_vm_lock_by_pasid() to take a drm_exec object to lock the root BO. >> > > Christian, modifying amdgpu_vm_lock_by_pasid() to take a drm_exec turns > out to also require converting its other caller, amdgpu_vm_handle_fault(), > to drm_exec — most of the diff is that conversion, not the helper itself. > > I can: > (a) convert both in a 2-patch series (handle_fault becomes > drm_exec_init + drm_exec_until_all_locked + drm_exec_fini, ~30 lines), > or > (b) keep the loop inside amdgpu_vm_lock_by_pasid() so handle_fault stays > a one-liner — but then the devcoredump caller can't add the IB BOs > to the same ticket, which is the whole point. > > (a) seems unavoidable if we want one helper. Is that what you had in mind, > or did you intend something lighter — e.g. a separate > amdgpu_vm_lock_by_pasid_exec() leaving handle_fault untouched? >
Just make that two patches, first switching over amdgpu_vm_lock_by_pasid() to using drm_exec() on both use cases. And then changing the one for device core dumping to lock all BOs at once. Thanks, Christian.
