drm/xe/xe_vm: Implement xe_vm_get_property_ioctl
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v39 Latest4 patches 0 repliesNew
- v384 patches 0 repliesSuperseded
- v374 patches 1 replySuperseded
Earlier versions · 37
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v36 | 4 patches | 3 replies | Superseded | |
| v35 | 4 patches | 0 replies | Superseded | |
| v34 | 6 patches | 3 replies | Superseded | |
| v33 | 5 patches | 5 replies | Superseded | |
| v32 | 5 patches | 0 replies | Superseded | |
| v31 | 5 patches | 0 replies | Superseded | |
| v30 | 5 patches | 1 reply | Superseded | |
| v29 | 5 patches | 7 replies | Superseded | |
| v28 | 4 patches | 6 replies | Superseded | |
| v27 | 4 patches | 5 replies | Superseded | |
| v26 | 4 patches | 2 replies | Superseded | |
| v25 | 5 patches | 0 replies | Superseded | |
| v24 posting 2/2 | 5 patches | 5 replies | Superseded | |
| v24 posting 1/2 | 5 patches | 0 replies | Superseded | |
| v23 | 5 patches | 11 replies | Superseded | |
| v22 | 5 patches | 4 replies | Superseded | |
| v21 | 5 patches | 6 replies | Superseded | |
| v20 | 5 patches | 2 replies | Superseded | |
| v19 | 5 patches | 0 replies | Superseded | |
| v18 | 5 patches | 2 replies | Superseded | |
| v17 | 5 patches | 0 replies | Superseded | |
| v16 | 5 patches | 6 replies | Superseded | |
| v15 | 6 patches | 2 replies | Superseded | |
| v14 | 6 patches | 1 reply | Superseded | |
| v13 | 6 patches | 1 reply | Superseded | |
| v12 | 5 patches | 6 replies | Superseded | |
| v11 | 5 patches | 0 replies | Superseded | |
| v10 | 5 patches | 7 replies | Superseded | |
| v9 | 6 patches | 9 replies | Superseded | |
| v8 | 6 patches | 12 replies | Superseded | |
| v7 | 6 patches | 10 replies | Superseded | |
| v6 | 6 patches | 4 replies | Superseded | |
| v5 | 6 patches | 9 replies | Superseded | |
| v4 | 6 patches | 1 reply | Superseded | |
| v3 | 6 patches | 3 replies | Superseded | |
| v2 | 8 patches | 0 replies | Superseded | |
| v1 | 6 patches | 3 replies | Superseded |
Changes in v39 from the cover letter
- s/uAPI/Link in the commit log links
- Use kzalloc_obj
- Fix debug parameter alignment
Patches in v39 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | drm/xe/xe_pagefault: Disallow writes to read-only VMAsdrivers/ | +6 | 0 replies | |
| 2/4 | drm/xe/uapi: Define drm_xe_vm_get_propertyinclude/ | +86 | 0 replies | |
| 3/4 | drm/xe/xe_vm: Add per VM fault infodrivers/ drivers/ drivers/ +1 more | +138 | 0 replies | |
| 4/4 | drm/xe/xe_vm: Implement xe_vm_get_property_ioctldrivers/ drivers/ drivers/ | +122 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Matthew Brost | Shuicheng Lin | Ivan Briano | José Roberto de Souza | Michal Mrozek |
|---|---|---|---|---|---|
| 1/4 | R-b | ||||
| 2/4 | A-b | R-b | A-b | A-b | |
| 3/4 | R-b | ||||
| 4/4 | R-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v39 0/4] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl
Add additional information to each VM so they can report up to the first 50 seen faults. Only pagefaults are saved this way currently, though in the future, all faults should be tracked by the VM for future reporting.
Additionally, of the pagefaults reported, only failed pagefaults are saved this way, as successful pagefaults should recover silently and not need to be reported to userspace.
To allow userspace to access these faults, a new ioctl - xe_vm_get_property_ioct - was created.
v2: (Matt Brost)
- Break full ban list request into a separate property.
- Reformat drm_xe_vm_get_property struct.
- Remove need for drm_xe_faults helper struct.
- Separate data pointer and scalar return value in ioctl.
- Get address type on pagefault report and save it to the pagefault.
- Correctly reject writes to read-only VMAs.
- Miscellaneous formatting fixes.
v3: (Matt Brost)
- Only allow querying of failed pagefaults
v4:
- Remove unnecessary size parameter from helper function, as it is a property of the arguments. (jcavitt)
- Remove unnecessary copy_from_user (Jainxun)
- Set address_precision to 1 (Jainxun)
- Report max size instead of dynamic size for memory allocation purposes. Total memory usage is reported separately.
v5:
- Return int from xe_vm_get_property_size (Shuicheng)
- Fix memory leak (Shuicheng)
- Remove unnecessary size variable (jcavitt)
v6:
- Free vm after use (Shuicheng)
- Compress pf copy logic (Shuicheng)
- Update fault_unsuccessful before storing (Shuicheng)
- Fix old struct name in comments (Shuicheng)
- Keep first 50 pagefaults instead of last 50 (Jianxun)
- Rename ioctl to xe_vm_get_faults_ioctl (jcavitt)
v7:
- Avoid unnecessary execution by checking MAX_PFS earlier (jcavitt)
- Fix double-locking error (jcavitt)
- Assert kmemdump is successful (Shuicheng)
- Repair and move fill_faults break condition (Dan Carpenter)
- Free vm after use (jcavitt)
- Combine assertions (jcavitt)
- Expand size check in xe_vm_get_faults_ioctl (jcavitt)
- Remove return mask from fill_faults, as return is already -EFAULT or 0 (jcavitt)
v8:
- Revert back to using drm_xe_vm_get_property_ioctl
- s/Migrate/Move (Michal)
- s/xe_pagefault/xe_gt_pagefault (Michal)
- Create new header file, xe_gt_pagefault_types.h (Michal)
- Add and fix kernel docs (Michal)
- Rename xe_vm.pfs to xe_vm.faults (jcavitt)
- Store fault data and not pagefault in xe_vm faults list (jcavitt)
- Store address, address type, and address precision per fault (jcavitt)
- Store engine class and instance data per fault (Jianxun)
- Properly handle kzalloc error (Michal W)
- s/MAX_PFS/MAX_FAULTS_SAVED_PER_VM (Michal W)
- Store fault level per fault (Micahl M)
- Apply better copy_to_user logic (jcavitt)
v9:
- More kernel doc fixes (Michal W, Jianxun)
- Better error handling (jcavitt)
v10:
- Convert enums to defines in regs folder (Michal W)
- Move xe_guc_pagefault_desc to regs folder (Michal W)
- Future-proof size logic for zero-size properties (jcavitt)
- Replace address type extern with access type (Jianxun)
- Add fault type to xe_drm_fault (Jianxun)
v11:
- Remove unnecessary switch case logic (Raag)
- Compress size get, size validation, and property fill functions into a single helper function (jcavitt)
- Assert valid size (jcavitt)
- Store pagefaults in non-fault-mode VMs as well (Jianxun)
v12:
- Remove unnecessary else condition
- Correct backwards helper function size logic (jcavitt)
- Fix kernel docs and comments (Michal W)
v13:
- Move xe and user engine class mapping arrays to header (John H)
v14:
- Fix double locking issue (Jianxun)
- Use size_t instead of int (Raag)
- Remove unnecessary includes (jcavitt)
v15:
- Do not report faults from reserved engines (Jianxun)
v16:
- Remove engine class and instance (Ivan)
v17:
- Map access type, fault type, and fault level to user macros (Matt Brost, Ivan)
v18:
- Add uAPI merge request to this cover letter
v19:
- Perform kzalloc outside of lock (Auld)
v20:
- Fix inconsistent use of whitespace in defines
v21:
- Remove unnecessary size assertion (jcavitt)
v22:
- Fix xe_vm_fault_entry kernel docs (Shuicheng)
v23:
- Nit fixes (Matt Brost)
v24:
- s/xe_pagefault_desc.h/xe_guc_pagefault_desc.h (Dafna)
- Move PF_MSG_LEN_DW to regs folder (Dafna)
v25:
- Revert changes from last revision (John H)
- Add missing bspec (Michal W)
v26:
- Rebase on top of latest change to xe_pagefault layer (jcavitt)
v27:
- Apply max line length (Matt Brost)
- Correctly ignore fault mode in save_pagefault_to_vm (jcavitt)
v28:
- Do not copy_to_user in critical section (Matt Brost)
- Assert args->size is multiple of sizeof(struct xe_vm_fault) (Matt Brost)
- s/save_pagefault_to_vm/xe_pagefault_save_to_vm (Matt Brost)
- Use guard instead of spin_lock/unlock (Matt Brost)
- GT was added to xe_pagefault struct. Use xe_gt_hw_engine instead of creating a new helper function (Matt Brost)
v29:
- Track address precision separately and report it accurately (Matt Brost)
- Remove unnecessary memset (Matt Brost)
v30:
- Keep u8 values together (Matt Brost)
v31:
- Rebase (jcavitt)
v32:
- Rebase (jcavitt)
v33:
- Rebase (jcavitt)
v34:
- Rebase (jcavitt)
- Save space for future expansion in pagefault struct (Matt Brost)
v35:
- Revert v34
- Rebase (jcavitt)
- Remove fixed value addr_precision (Matt Brost)
- Since address precision is fixed, remove debug print statement as well (jcavitt)
v36:
- Rebase (jcavitt)
- s/Refactor/Rebase where needed in cover letter (jcavitt)
v37:
- Report canonicalized address (Jose)
- Mask out prefetch data from access type (Jose, jcavitt)
v38:
- Clarify address is canonical (José)
v39:
- s/uAPI/Link in the commit log links
- Use kzalloc_obj
- Fix debug parameter alignment
Jonathan Cavitt (4):
drm/xe/xe_pagefault: Disallow writes to read-only VMAs drm/xe/uapi: Define drm_xe_vm_get_property drm/xe/xe_vm: Add per VM fault info drm/xe/xe_vm: Implement xe_vm_get_property_ioctl
drivers/gpu/drm/xe/xe_device.c | 2 + drivers/gpu/drm/xe/xe_pagefault.c | 32 +++++ drivers/gpu/drm/xe/xe_vm.c | 191 ++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_vm.h | 12 ++ drivers/gpu/drm/xe/xe_vm_types.h | 29 +++++ include/uapi/drm/xe_drm.h | 86 ++++++++++++++ 6 files changed, 352 insertions(+)
Signature · 1 line
2.43.0