Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH v2 3/3] drm/xe/vf: Don't expose privileged GT debugfs files if VF
Date: Thu, 3 Apr 2025 14:30:45 -0700	[thread overview]
Message-ID: <Z+7+BWPhD72Gulua@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <83f0a79d-3eba-4e87-8e53-6b5767dd92fd@intel.com>

On Thu, Apr 03, 2025 at 10:56:10PM +0200, Michal Wajdeczko wrote:
> 
> 
> On 03.04.2025 22:28, Matthew Brost wrote:
> > On Thu, Apr 03, 2025 at 04:26:35PM +0200, Michal Wajdeczko wrote:
> >> Some of the debugfs files require access to the registers that are
> >> not accessible to the VFs. Don't expose those files on VF drivers.
> >>
> >> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> >> Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
> >> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> >> ---
> >> v2: avoid "privileged" word, make it clear it's about VF/PF (Lucas)
> >>     add hint for developers where to add new files (Lucas)
> >> ---
> >>  drivers/gpu/drm/xe/xe_gt_debugfs.c | 30 ++++++++++++++++++++++--------
> >>  1 file changed, 22 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> >> index 2d63a69cbfa3..a88076e9cc7d 100644
> >> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> >> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> >> @@ -299,20 +299,20 @@ static int hwconfig(struct xe_gt *gt, struct drm_printer *p)
> >>  	return 0;
> >>  }
> >>  
> >> -static const struct drm_info_list debugfs_list[] = {
> >> -	{"hw_engines", .show = xe_gt_debugfs_simple_show, .data = hw_engines},
> >> +/*
> >> + * only for GT debugfs files which can be safely used on the VF as well:
> >> + * - without access to the GT privileged registers
> >> + * - without access to the PF specific data
> >> + */
> >> +static const struct drm_info_list vf_safe_debugfs_list[] = {
> >>  	{"force_reset", .show = xe_gt_debugfs_simple_show, .data = force_reset},
> >>  	{"force_reset_sync", .show = xe_gt_debugfs_simple_show, .data = force_reset_sync},
> > 
> > Probably don't expose the reset ones to VF either.
> 
> why not? from commit 459777724d30 ("drm/xe/vf: Don't try to trigger a
> full GT reset if VF") we just use H2G action VF_RESET(0x5507) to
> exercise the reset flow as applicable method for the VF
>

Ah, yes. The above commit will ensure a VF can't clobber other VFs.
Sorry the noise.

Matt 

  reply	other threads:[~2025-04-03 21:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 14:26 [PATCH v2 0/3] VF: debugfs fixes Michal Wajdeczko
2025-04-03 14:26 ` [PATCH v2 1/3] drm/xe/guc: Refactor GuC debugfs initialization Michal Wajdeczko
2025-04-10 17:20   ` Lucas De Marchi
2025-04-03 14:26 ` [PATCH v2 2/3] drm/xe/guc: Don't expose GuC privileged debugfs files if VF Michal Wajdeczko
2025-04-10 17:21   ` Lucas De Marchi
2025-04-03 14:26 ` [PATCH v2 3/3] drm/xe/vf: Don't expose privileged GT " Michal Wajdeczko
2025-04-03 20:28   ` Matthew Brost
2025-04-03 20:56     ` Michal Wajdeczko
2025-04-03 21:30       ` Matthew Brost [this message]
2025-04-09 10:29   ` Bernatowicz, Marcin
2025-04-10 17:22   ` Lucas De Marchi
2025-04-03 18:43 ` ✓ CI.Patch_applied: success for VF: debugfs fixes (rev2) Patchwork
2025-04-03 18:44 ` ✓ CI.checkpatch: " Patchwork
2025-04-03 18:45 ` ✓ CI.KUnit: " Patchwork
2025-04-03 19:01 ` ✓ CI.Build: " Patchwork
2025-04-03 19:04 ` ✓ CI.Hooks: " Patchwork
2025-04-03 19:05 ` ✓ CI.checksparse: " Patchwork
2025-04-04  0:24 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-04  4:52 ` ✓ Xe.CI.BAT: success " Patchwork
2025-04-04 10:53 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-11 10:12   ` Michal Wajdeczko

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=Z+7+BWPhD72Gulua@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=marcin.bernatowicz@linux.intel.com \
    --cc=michal.wajdeczko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox