All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tejas Upadhyay" <tejas.upadhyay@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH V17 12/12] drm/xe: Add fault-inject based VRAM page offline injection
Date: Tue, 18 Aug 2026 10:55:42 +0000	[thread overview]
Message-ID: <20260818105542.6719D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818104055.3833974-26-tejas.upadhyay@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing SR-IOV VF check exposes physical VRAM offlining and restricted MMIO access to guest VMs.
--

--- Patch [12]: [PATCH V17 12/12] drm/xe: Add fault-inject based VRAM page offline injection ---
commit 7bef89dbe3ddc0e065bfce2e6d297191374f2aa4
Author: Tejas Upadhyay <tejas.upadhyay@intel.com>

drm/xe: Add fault-inject based VRAM page offline injection

This commit adds a fault-inject based debugfs interface for testing VRAM
page offlining. It exposes standard fault-inject knobs and a custom
trigger file on Crescent Island platforms to simulate VRAM page faults.

> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index 28135f84e2869..95d4dc067b4b8 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c

[ ... ]

> @@ -44,12 +45,18 @@
>  DECLARE_FAULT_ATTR(gt_reset_failure);
>  DECLARE_FAULT_ATTR(inject_csc_hw_error);
>  DECLARE_FAULT_ATTR(wedge_cold_reset);
> +DECLARE_FAULT_ATTR(inject_mempage_offline);
>  
>  static bool csc_hw_error_available(struct xe_device *xe)
>  {
>  	return !IS_SRIOV_VF(xe) && xe->info.platform == XE_BATTLEMAGE;
>  }
>  
> +static bool is_crescent_island(struct xe_device *xe)
> +{
> +	return xe->info.platform == XE_CRESCENTISLAND;

[Severity: High]
Are we unintentionally exposing the VRAM offlining debugfs trigger to SR-IOV
Virtual Functions (VFs)?

The csc_hw_error_available() check right above explicitly restricts its
debugfs entry to the Physical Function (PF) using !IS_SRIOV_VF(xe).

If a guest VM writes to the exposed inject_mempage_offline_trigger file, it
invokes xe_ttm_vram_handle_addr_fault() and xe_ttm_vram_addr_to_region(),
which directly reads the GSMBASE MMIO register.

Could this access of PF-restricted MMIO from a VF cause unsupported requests
or timeouts, and violate the virtualization boundary by allowing a VF to
offline physical VRAM pages?

> +}
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260818104055.3833974-14-tejas.upadhyay@intel.com?part=12

  reply	other threads:[~2026-08-18 10:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 10:40 [PATCH V17 00/12] Add memory page offlining support Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 01/12] drm/xe: Link VRAM object with gpu buddy Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 02/12] drm/xe: Link LRC BO and its execution Queue Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 03/12] drm/xe: Extend BO purge to handle vram pages as well Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 04/12] drm/xe/bo: Make xe_bo_is_user() public Tejas Upadhyay
2026-08-18 10:41 ` [PATCH V17 05/12] drm/xe: Guard teardown paths against purged BOs Tejas Upadhyay
2026-08-18 11:06   ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 06/12] drm/xe/vram: Extract buddy alloc and free helpers Tejas Upadhyay
2026-08-18 10:41 ` [PATCH V17 07/12] drm/xe/vram: Add page offline data structures and lifecycle Tejas Upadhyay
2026-08-18 10:51   ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 08/12] drm/xe/vram: Add VRAM page offline fault handler Tejas Upadhyay
2026-08-18 11:01   ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 09/12] drm/xe/configfs: Add vram bad page reservation policy Tejas Upadhyay
2026-08-18 10:57   ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 10/12] drm/xe: Add sysfs interface for bad gpu vram pages Tejas Upadhyay
2026-08-18 10:54   ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 11/12] drm/xe/uapi: Expose ban reason in EXEC_QUEUE_GET_PROPERTY_BAN Tejas Upadhyay
2026-08-18 10:58   ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 12/12] drm/xe: Add fault-inject based VRAM page offline injection Tejas Upadhyay
2026-08-18 10:55   ` sashiko-bot [this message]
2026-08-18 10:49 ` ✓ CI.KUnit: success for Add memory page offlining support (rev19) Patchwork
2026-08-18 11:47 ` ✓ CI.KUnit: success for Add memory page offlining support (rev20) Patchwork
2026-08-18 12:28 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-18 12:59 ` [PATCH V17 00/12] Add memory page offlining support Rodrigo Vivi
2026-08-18 13:24   ` Upadhyay, Tejas
2026-08-18 13:12 ` ✗ Xe.CI.FULL: failure for Add memory page offlining support (rev20) Patchwork

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=20260818105542.6719D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tejas.upadhyay@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.