public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/xe/uapi: Define drm_xe_vm_get_property
Date: Wed, 25 Mar 2026 06:46:43 +1000	[thread overview]
Message-ID: <review-patch2-20260324152935.72444-8-jonathan.cavitt@intel.com> (raw)
In-Reply-To: <20260324152935.72444-8-jonathan.cavitt@intel.com>

Patch Review

**uAPI naming concern:** The `struct xe_vm_fault` does not follow the `drm_xe_` prefix convention used by all other uAPI structs in this header (e.g., `drm_xe_vm_create`, `drm_xe_vm_bind`). Similarly, the `FAULT_ACCESS_TYPE_*`, `FAULT_TYPE_*`, and `FAULT_LEVEL_*` defines lack a `DRM_XE_` prefix, which risks namespace collisions. Every other define in this header uses `DRM_XE_` prefixing. This is a uAPI that will be set in stone once merged — the naming should be consistent.

**Struct padding/alignment:** `struct xe_vm_fault` has `__u64 address`, then `__u32 address_precision`, then three `__u8` fields, then one `__u8 pad`, then `__u64 reserved[4]`. Between `pad` and `reserved` there are 0 bytes of implicit padding since the three u8 + pad = 4 bytes, and address_precision (u32) + 4 bytes of u8s = 8 bytes after the u64, so alignment is fine. Good.

**`data`/`value` union:** The union of `data` and `value` in `drm_xe_vm_get_property` is reasonable for supporting both pointer and scalar property types, though currently only `data` (pointer) is used.

**Size field is `__u32`:** The `size` field is `__u32`, which limits the maximum reportable faults. With `sizeof(struct xe_vm_fault)` being 48 bytes and MAX_FAULTS_SAVED_PER_VM=50, the max is 2400 bytes — well within `__u32` range. Fine, but somewhat inconsistent with other ioctls that use `__u64` for sizes.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-24 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 15:29 [PATCH v39 0/4] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl Jonathan Cavitt
2026-03-24 15:29 ` [PATCH v39 1/4] drm/xe/xe_pagefault: Disallow writes to read-only VMAs Jonathan Cavitt
2026-03-24 20:46   ` Claude review: " Claude Code Review Bot
2026-03-24 15:29 ` [PATCH v39 2/4] drm/xe/uapi: Define drm_xe_vm_get_property Jonathan Cavitt
2026-03-24 20:46   ` Claude Code Review Bot [this message]
2026-03-24 15:29 ` [PATCH v39 3/4] drm/xe/xe_vm: Add per VM fault info Jonathan Cavitt
2026-03-24 20:46   ` Claude review: " Claude Code Review Bot
2026-03-24 15:29 ` [PATCH v39 4/4] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl Jonathan Cavitt
2026-03-24 20:46   ` Claude review: " Claude Code Review Bot
2026-03-24 20:46 ` Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-20 18:35 [PATCH v38 0/4] " Jonathan Cavitt
2026-03-20 18:35 ` [PATCH v38 2/4] drm/xe/uapi: Define drm_xe_vm_get_property Jonathan Cavitt
2026-03-21 17:27   ` Claude review: " Claude Code Review Bot
2026-03-10 14:49 [PATCH v37 0/4] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl Jonathan Cavitt
2026-03-10 14:49 ` [PATCH v37 2/4] drm/xe/uapi: Define drm_xe_vm_get_property Jonathan Cavitt
2026-03-11  3:12   ` Claude review: " Claude Code Review Bot
2026-03-06 15:55 [PATCH v36 0/4] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl Jonathan Cavitt
2026-03-06 15:55 ` [PATCH v36 2/4] drm/xe/uapi: Define drm_xe_vm_get_property Jonathan Cavitt
2026-03-08 22:42   ` Claude review: " Claude Code Review Bot
2026-02-23 17:21 [PATCH v35 0/4] drm/xe/xe_vm: Implement xe_vm_get_property_ioctl Jonathan Cavitt
2026-02-23 17:21 ` [PATCH v35 2/4] drm/xe/uapi: Define drm_xe_vm_get_property Jonathan Cavitt
2026-02-24  0:00   ` Claude review: " Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch2-20260324152935.72444-8-jonathan.cavitt@intel.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox