Article View: linux.kernel.netdev
Article #99[PATCH v2 0/2] drm/xe: Expose retired VRAM pages via drm-ras
From: Aravind Iddamsetty
Date: Wed, 07 Oct 2026 08:03
Date: Wed, 07 Oct 2026 08:03
97 lines
10942 bytes
10942 bytes
The memory page offlining support tracks bad VRAM pages and currently
only exposes them through debugfs (vram_bad_pages), which is not a
stable ABI. Add a proper userspace interface using the drm-ras
generic netlink family.
Introduce a new node type DRM_RAS_NODE_TYPE_RETIRED_RESOURCES which
enumerates hardware resources that have been permanently taken out of
service. Each node reports a single resource type, identified by its
node-name, so the resource type is implied by the node rather than
carried per entry. The per-entry payload stays extensible: each entry
carries a single type-specific nested attribute, so future resource
types can be added without touching existing consumers. VRAM pages are
the first supported type, reported via the vram-page nest as
{address, size, status} where status is one of retired/pending/failed.
A single operation is added on the node:
- GET_RETIRED_RESOURCES: dump the resources retired on the node. The
dump opens with a leading capacity summary entry (max-pages
inside the vram-page nest, i.e. the maximum number of pages that
can be offlined, with no address/size/status), followed by one
entry per retired resource. Userspace derives the retired/queued
counts by counting entries.
The netlink interface is described by the YAML spec
Documentation/netlink/specs/drm_ras.yaml. The following files are
generated from that spec with tools/net/ynl/ynl-regen.sh and must not
be edited by hand:
- include/uapi/drm/drm_ras.h (uapi attribute/command enums)
- drivers/gpu/drm/drm_ras_nl.c (generated policy and op table)
- drivers/gpu/drm/drm_ras_nl.h (generated declarations)
Eg:
$ sudo ./tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/drm_ras.yaml \
--dump list-nodes
[{'device-name': '0000:03:00.0', 'node-id': 0, 'node-name':'correctable-errors',
'node-type': 'error-counter'},
{'device-name': '0000:03:00.0', 'node-id': 1, 'node-name':'uncorrectable-errors
', 'node-type': 'error-counter'},
{'device-name': '0000:03:00.0', 'node-id': 2, 'node-name':'vram-retired-pages',
'node-type': 'retired-resources'}]
$ sudo ./tools/net/ynl/pyynl/cli.py --spec \
Documentation/netlink/specs/drm_ras.yaml --dump get-retired-resources \
--json '{"node-id": 2}'
[{'node-id': 2, 'vram-page': {'max-pages': 100}},
{'node-id': 2, 'vram-page': {'address': 12807041024, 'size': 4096,
'status': 'retired'}},
{'node-id': 2, 'vram-page': {'address': 12809400320, 'size': 4096,
'status': 'retired'}}]
The first entry is the capacity summary (max-pages); subsequent entries
are the retired pages.
v2:
- Rebase on drm-tip
- Drop the per-entry resource-type discriminator attribute; the type is
now implied by the node (node-name), which reports a single type.
- Fold all VRAM-page fields, including the retirement status, into the
vram-page nested attribute; the top-level entry is just
{node-id, vram-page}. (Rodrigo)
- Drop the separate GET_RETIRED_RESOURCES_INFO operation. The capacity
(max-pages) is now emitted as a leading summary entry inside
GET_RETIRED_RESOURCES (max-pages in the vram-page nest, no status);
offlined/queued counts are derived by counting entries.
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Riana Tauro <riana.tauro@intel.com>
Cc: Raag Jadav <raag.jadav@intel.com>
Cc: Joshua Santhosh Ranjan <joshua.santosh.ranjan@intel.com>
Cc: Ashwin Kumar Kulkarni <ashwin.kumar.kulkarni@intel.com>
Cc: Pratik Bari <pratik.bari@intel.com>
Aravind Iddamsetty (2):
drm/xe: Expose retired VRAM pages via drm-ras
drm/xe: Remove bad VRAM pages debugfs interface
Documentation/netlink/specs/drm_ras.yaml | 91 ++++++++++-
drivers/gpu/drm/drm_ras.c | 174 ++++++++++++++++++++-
drivers/gpu/drm/drm_ras_nl.c | 12 ++
drivers/gpu/drm/drm_ras_nl.h | 2 +
drivers/gpu/drm/xe/xe_debugfs.c | 2 -
drivers/gpu/drm/xe/xe_drm_ras.c | 77 +++++++++
drivers/gpu/drm/xe/xe_drm_ras_types.h | 3 +
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 190 ++++++++++++++---------
drivers/gpu/drm/xe/xe_ttm_vram_mgr.h | 4 +-
include/drm/drm_ras.h | 74 +++++++++
include/uapi/drm/drm_ras.h | 48 +++++-
11 files changed, 592 insertions(+), 85 deletions(-)
--
2.25.1
Technical Details
Message-ID:
<20261007080354.3072751-1-aravind.iddamsetty@linux.intel.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342240-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342240-linux-kernel-netdev=dewy.ru From: aravind.iddamsetty@linux.intel.com (Aravind Iddamsetty) Newsgroups: linux.kernel.netdev Subject: [PATCH v2 0/2] drm/xe: Expose retired VRAM pages via drm-ras Date: Wed, 7 Oct 2026 13:33:52 +0530 Organization: Usenet Network Message-ID: <20261007080354.3072751-1-aravind.iddamsetty@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="605230"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:9Ee2Sb88f+5WwrCHK82gUlTvU6k= sha256:+Xg51926hzUY+WAgXUF0PBbai1t/wQ1GQqqjXqNq2MA= sha1:rv8Yyeof7Djsb5A0LhaS82bfLps= sha256:bbc/Iu8qGFC5YO12icueQEZtZ5/PdsLQCI+WhRb1zSY= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id A1A3510F104; Wed, 7 Oct 2026 11:07:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.891 X-Spam-Status: No, score=-0.891 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QvbHJ9YnnT7s; Wed, 7 Oct 2026 11:07:28 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-342240-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 9EA6810F102; Wed, 7 Oct 2026 11:07:22 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 19CCA256E7; Wed, 7 Oct 2026 08:07:16 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A60941A57D; Wed, 7 Oct 2026 08:07:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Fydh8RXe" X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B32041442C for <netdev@vger.kernel.org>; Wed, 7 Oct 2026 08:07:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791360432; cv=none; b=km4SIr3obc9JrwGI+ucfko/hZxj/zUWeMcfPMngYAqyBo1C0hmtvXYIG2sANUdfqlMl2VZj4pFWNcDJrU0ooFyKptIhsgjYsiVOEmaXMFJwhvB7rRbXaNs9VaW3uo8nrGrEy2XJ34d5mdZkdMpQpw62eAt0nBC77QCO0gI99Tcc= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791360432; c=relaxed/simple; bh=romjlo+9XGi6AHS6ZJhdS/i4Eu/Sc0BFFjJspgHaBRQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tUd1YJAIQZoPPUBceh2TwyB8fREn0eYQLhC60PRA1AStVINpjk5H34YAQGPU9VIkliMpSEAx5C2dzEzLgqsqj4I9n0JD17L9G/+2sOVl+rOAum+HA3NaNiMONS8xf98XUFtTUdyiDIAbe9LLWcVmCBjojF5Nw8zm0rvEFXPTmnA= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Fydh8RXe; arc=none smtp.client-ip=192.198.163.14 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1791360429; x=1822896429; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=romjlo+9XGi6AHS6ZJhdS/i4Eu/Sc0BFFjJspgHaBRQ=; b=Fydh8RXe/cVk2ESxvkcHrTIBLhX8I+YFPJQZ2ceLcRhPNCvg+XGDyXIb abO/mJoRjXmj7ePjXKumkKPKeg7OqXAuQGb9owOtbjvLd0qa3ZGmQIlZM M7poJ5kpn38haUOFPzkaEngt7fdcM312xuv0ztH1RySebnTlpdyfUVNr/ 2et3QAByGDkpx9AO+BIhDUDcWjFk3pssbFYIBK9zatCeZ7qb4Bb2zGiw0 0qgZg09suwbFfWsX0+JXBpcLl2lROZ7fLDNhXk+SfiUYBymSpGPpaW1ci g0rwfucjdK8hYNqFfNcSqWnm6z4R9vcibpymONdGVlchaPrVwk/4AZJZU w==; X-CSE-ConnectionGUID: 3wqRgSIQQVmBXCDMO/Y/EA== X-CSE-MsgGUID: EK5SLvHCSFOkUh0uPuCc+A== X-IronPort-AV: E=McAfee;i="6800,10657,11927"; a="108532" X-IronPort-AV: E=Sophos;i="6.27,144,1787036400"; d="scan'208";a="108532" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2026 01:07:07 -0700 X-CSE-ConnectionGUID: 0Mk0mLUSRr2GF0Bs/rpY/w== X-CSE-MsgGUID: CouYNn0jRoy1mAI6wVYmuA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,144,1787036400"; d="scan'208";a="315405490" X-Received: from aravind-dev.iind.intel.com ([10.190.239.36]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2026 01:07:02 -0700 X-Cc: simona.vetter@ffwll.ch, airlied@gmail.com, tejas.upadhyay@intel.com, himal.prasad.ghimiray@intel.com, rodrigo.vivi@intel.com, riana.tauro@intel.com, raag.jadav@intel.com, joshua.santosh.ranjan@intel.com, ashwin.kumar.kulkarni@intel.com, pratik.bari@intel.com, Hawking.Zhang@amd.com, tao.zhou1@amd.com, YiPeng.Chai@amd.com, jinzhou.su@amd.com, cesun102@amd.com, lijo.lazar@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com X-Mailer: git-send-email 2.25.1 X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>