From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: <himanshu.girotra@intel.com>
Cc: <matthew.d.roper@intel.com>, <x.wang@intel.com>,
<igt-dev@lists.freedesktop.org>, <nishit.sharma@intel.com>
Subject: Re: [PATCH v4 i-g-t] lib/intel_pat: Cache PAT config for unprivileged processes
Date: Sat, 07 Mar 2026 13:22:18 -0800 [thread overview]
Message-ID: <87ldg3s5bp.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <87qzpyroy5.wl-ashutosh.dixit@intel.com>
On Thu, 05 Mar 2026 12:39:14 -0800, Dixit, Ashutosh wrote:
>
> On Thu, 05 Mar 2026 10:54:31 -0800, <himanshu.girotra@intel.com> wrote:
> >
> > From: Himanshu Girotra <himanshu.girotra@intel.com>
> >
> > Commit 4e59b8e7779b ("lib/intel_pat: use kernel debugfs as
> > authoritative PAT source for Xe") changed the Xe PAT lookup to
> > read from debugfs, which requires root access. Some xe_oa subtests
> > fork a child process that drops root privileges before performing
> > GPU operations that internally need the PAT write-back index.
> > After dropping root, the debugfs read fails.
> >
> > Fix this by caching the PAT configuration in struct xe_device at
> > xe_device_get() time. Since xe_device_get() is called while still
> > root, the cache is available to forked children even after
> > igt_drop_root(). Tests that open a new fd after forking must call
> > xe_device_get() explicitly before dropping root to populate the
> > cache for that fd.
> >
> > v2: Cache PAT in struct xe_device instead of a global static;
> > drop the intel_pat_precache() helper — xe_device_get() already
> > populates the cache, so call it directly in xe_oa before
> > igt_drop_root() (Ashutosh Dixit)
> >
> > v3: Use pat_cache pointer, NULL indicates unpopulated cache;
> > remove redundant xe_oa.c change (Ashutosh Dixit)
> >
> > Add FIXME for multi-GPU (Zbigniew Kempczyński)
> >
> > v4: nit fixes and use forward declaration in xe_query.h (Ashutosh Dixit)
>
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Thanks for the quick turnaround on the fix. The patch is now merged!
next prev parent reply other threads:[~2026-03-07 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 18:54 [PATCH v4 i-g-t] lib/intel_pat: Cache PAT config for unprivileged processes himanshu.girotra
2026-03-05 20:39 ` Dixit, Ashutosh
2026-03-07 21:22 ` Dixit, Ashutosh [this message]
2026-03-06 0:44 ` ✓ i915.CI.BAT: success for lib/intel_pat: Cache PAT config for unprivileged processes (rev4) Patchwork
2026-03-06 1:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-06 19:53 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-07 4:53 ` ✗ i915.CI.Full: failure " 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=87ldg3s5bp.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=himanshu.girotra@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=nishit.sharma@intel.com \
--cc=x.wang@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