From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com>
Cc: <dri-devel@lists.freedesktop.org>, <netdev@vger.kernel.org>,
<riana.tauro@intel.com>, <aravind.iddamsetty@linux.intel.com>,
<raag.jadav@intel.com>, <simona.vetter@ffwll.ch>,
<airlied@gmail.com>, <kuba@kernel.org>, <ogabbay@kernel.org>,
<lizhi.hou@amd.com>, <karol.wachowski@linux.intel.com>,
<jeff.hugo@oss.qualcomm.com>, <carl.vanderlip@oss.qualcomm.com>,
<troy.hanson@oss.qualcomm.com>,
<youssef.abdulrahman@oss.qualcomm.com>
Subject: Re: [PATCH v5 0/4] Extend drm_ras for qaic telemetry
Date: Tue, 24 Nov 2026 15:19:52 -0500 [thread overview]
Message-ID: <awXxaNid-CQkl2dW@intel.com> (raw)
In-Reply-To: <20261124180137.616249-1-zachary.mckevitt@oss.qualcomm.com>
On Tue, Nov 24, 2026 at 10:01:28AM -0800, Zack McKevitt wrote:
> This patch series extends the drm_ras netlink interface to include a new
> node type for telemetry nodes. Telemetry nodes support three operations:
> getting, setting (optional), and listing telemetry fields. Drivers may
> specify an optional predoit function to validate get and set operations.
>
> Telemetry get operations take the drm_ras node id and telemetry field to
> be read and return the field's value and any status reported by the driver.
> Telemetry set operations take the node id, telemetry field, and value,
> and return only the status reported by the driver.
>
> Before adding telemetry nodes, a new patch is introduced to add refcounts
> to drm_ras nodes stored in the xarray. This protects the nodes, which are
> owned by the device, from being unregistered and freed in the middle of
> a netlink doit such as getting an error counter.
>
> This extension also removes the admin requirement on the list-nodes
> operation. This allows drm_ras nodes to be discovered by userspace programs
> for drivers that do not necessarily require admin privileges, like qaic.
>
> The new drm_ras telemetry interface is implemented by the qaic driver,
> which exposes the telemetry fields to userspace and enforces filesystem-
> esque permission checks on telemetry operations in its telemetry_pre
> callback.
>
> Claude Opus 5.5 was used to assist in the development of these patches and
> to address Sashiko feedback.
Pushed to drm-misc-next, thank you for the patches.
Thanks,
Rodrigo.
>
> Changes in v5:
> - Address Sashiko comments:
> - Convert mode from u8 to uint in drm_ras netlink spec.
> - Add check for qdev->dev_state != QAIC_ONLINE in telemetry_request().
> - Flush the tele_wq workqueue after mhi_unprepare_from_transfer in
> qaic_telemetry_mhi_remove.
> - Small formatting fixes.
>
> Link to v4: https://lore.kernel.org/all/20261117233442.407877-1-zachary.mckevitt@oss.qualcomm.com/
>
> Changes in v4:
> - Add refcounts to track drm_ras node lifetimes.
> - Address Sashiko comments:
> - Fix status field population when HW returns an error.
> - Add refcounts for telemetry nodes.
> - Update outdated commit messages.
> - Add static to private functions in qaic_telemetry.c, and remove them
> from qaic_telemetry.h.
> - Stop returning remaining jiffies when device status is nonzero in
> telemetry_request().
> - Add mhi_unprepare_from_transfer if drm_ras node registration fails
> in qaic_telemetry_mhi_probe().
> - Consolidate get/set dumpits into a single dump operation.
> - Pin telemetry node to context in pre-doit and unpin in post-doit.
> This ensures the same node is used between pre-doit and doit calls.
> - Change field attribute to uint and status to sint.
> - Added NL_SET_BAD_ATTR calls to telemetry netlink functions.
> - Reject non-telemetry nodes in telemetry get/set/list-fields.
> - Updated qaic Kconfig to depend on DRM_RAS.
>
> Link to v3: https://lore.kernel.org/all/20261106181225.3333260-1-zachary.mckevitt@oss.qualcomm.com/#t
>
> Changes in v3:
> - Address Sashiko comments:
> - Properly return status when telemetry request is successful but a
> hardware error occurs.
> - Validate telemetry fields against their gettable/settable fields
> lists when invoking the predoit.
> - Update documentation in include/drm/drm_ras.h.
> - Moved calls to qaic_drm_ras_register/unregister to mhi_probe/remove
> instead of pci_probe/remove.
> - Added srcu read locks around calls to telemetry_request() in get
> and set callbacks in qaic_telemetry.c.
> - Added a tele_ch check to telemetry_request().
> - Properly handle a -ERESTARTSYS return from
> wait_for_completion_interrputable in telemetry_request().
> - Ensure field can be truncated to a u8 in qaic's telemetry get and
> set callbacks.
> - Minor code cleanups (typos, header ordering, etc).
>
> Link to v2: https://lore.kernel.org/all/20261029203000.1763447-1-zachary.mckevitt@oss.qualcomm.com/
>
> Changes in v2:
> - Address Sashiko comments:
> - Initialize certain stack variables in drm_ras.c.
> - Added attribute guards (GENL_REQ_ATTR_CHECK) in telemetry doits.
> - Added a valid node check in drm_ras_nl_pre_telemetry.
> - Fixed improper node callback in telemetry_set.
> - Now registering drm_ras node after MHI initialization.
> - Now removing drm_ras node before freeing MHI controller.
> - Added scoped_with_init_fs guard to qaic_telemetry_pre's inode check.
> - Fixed improper kfree in qaic_drm_ras_register_node.
> - Changed telemetry value attribute to sint and dropped padding attribute.
> - Updated documentation in drm_ras.yaml.
> - Renamed telemetry read/write to get/set.
> - Added dumpit for gettable and settable telemetry values.
> - Made telemetry_set optional and added admin-perm for it.
> - Specified ynl file regeneration in commit message for patch 2.
>
> Link to v1: https://lore.kernel.org/all/20261009173152.2436195-1-zachary.mckevitt@oss.qualcomm.com/
>
> Zack McKevitt (4):
> drm/drm_ras: Reference-count nodes across netlink handlers
> drm/drm_ras: Remove admin-perm flag from list-nodes operation
> drm/drm_ras: Extend DRM RAS interface to include telemetry nodes
> accel/qaic: Add callbacks for DRM RAS netlink telemetry
>
> Documentation/netlink/specs/drm_ras.yaml | 98 +++-
> drivers/accel/qaic/Kconfig | 1 +
> drivers/accel/qaic/Makefile | 1 +
> drivers/accel/qaic/qaic.h | 19 +
> drivers/accel/qaic/qaic_drv.c | 15 +
> drivers/accel/qaic/qaic_telemetry.c | 564 +++++++++++++++++++++
> drivers/accel/qaic/qaic_telemetry.h | 14 +
> drivers/gpu/drm/drm_ras.c | 611 ++++++++++++++++++++---
> drivers/gpu/drm/drm_ras_nl.c | 45 +-
> drivers/gpu/drm/drm_ras_nl.h | 10 +
> include/drm/drm_ras.h | 98 ++++
> include/uapi/drm/drm_ras.h | 29 +-
> include/uapi/drm/qaic_accel.h | 28 ++
> 13 files changed, 1462 insertions(+), 71 deletions(-)
> create mode 100644 drivers/accel/qaic/qaic_telemetry.c
> create mode 100644 drivers/accel/qaic/qaic_telemetry.h
>
> --
> 2.43.0
>
prev parent reply other threads:[~2026-11-24 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 18:01 [PATCH v5 0/4] Extend drm_ras for qaic telemetry Zack McKevitt
2026-11-24 18:01 ` [PATCH v5 1/4] drm/drm_ras: Reference-count nodes across netlink handlers Zack McKevitt
2026-11-24 18:01 ` [PATCH v5 2/4] drm/drm_ras: Remove admin-perm flag from list-nodes operation Zack McKevitt
2026-11-24 18:01 ` [PATCH v5 3/4] drm/drm_ras: Extend DRM RAS interface to include telemetry nodes Zack McKevitt
2026-11-24 18:01 ` [PATCH v5 4/4] accel/qaic: Add callbacks for DRM RAS netlink telemetry Zack McKevitt
2026-11-24 20:19 ` Rodrigo Vivi [this message]
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=awXxaNid-CQkl2dW@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=carl.vanderlip@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=karol.wachowski@linux.intel.com \
--cc=kuba@kernel.org \
--cc=lizhi.hou@amd.com \
--cc=netdev@vger.kernel.org \
--cc=ogabbay@kernel.org \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=simona.vetter@ffwll.ch \
--cc=troy.hanson@oss.qualcomm.com \
--cc=youssef.abdulrahman@oss.qualcomm.com \
--cc=zachary.mckevitt@oss.qualcomm.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