From: sashiko-bot@kernel.org
To: "Jonathan Cavitt" <jonathan.cavitt@intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v6 1/2] drm/xe/pagefault: Add SRCID to pagefault struct
Date: Wed, 02 Sep 2026 21:44:28 +0000 [thread overview]
Message-ID: <20260902214429.53C0E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260902212549.347805-2-jonathan.cavitt@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Logical OR (||) used instead of bitwise OR (|) when packing ASID and SRCID into pf.consumer.id.
--
commit 1788c2503016dd2829d88985880f0d679983c0b4
Author: Jonathan Cavitt <jonathan.cavitt@intel.com>
drm/xe/pagefault: Add SRCID to pagefault struct
This commit adds SRCID information to the pagefault struct to report the
hardware unit that caused the pagefault, folding it into the same field as
ASID to keep the struct compact.
> diff --git a/drivers/gpu/drm/xe/xe_guc_pagefault.c b/drivers/gpu/drm/xe/xe_guc_pagefault.c
> index 8f8210a732e98..036175faadd4a 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pagefault.c
> @@ -108,7 +108,13 @@ int xe_guc_pagefault_handler(struct xe_guc *guc, u32 *msg, u32 len)
> << PFD_VIRTUAL_ADDR_HI_SHIFT) |
> (FIELD_GET(PFD_VIRTUAL_ADDR_LO, msg[2]) <<
> PFD_VIRTUAL_ADDR_LO_SHIFT);
> - pf.consumer.asid = FIELD_GET(PFD_ASID, msg[1]);
> +
> + BUILD_BUG_ON(XE_MAX_ASID > XE_PAGEFAULT_ASID_MASK);
> +
> + pf.consumer.id = FIELD_PREP(XE_PAGEFAULT_ASID_MASK,
> + FIELD_GET(PFD_ASID, msg[1])) ||
> + FIELD_PREP(XE_PAGEFAULT_SRCID_MASK,
> + FIELD_GET(PFD_SRC_ID, msg[0]));
[Severity: High]
Is this intended to be a bitwise OR (|) rather than a logical OR (||)?
Using a logical OR will result in pf.consumer.id being assigned a boolean
value (1 or 0) rather than the packed ASID and SRCID bits. When
xe_pagefault_service() extracts the ASID using FIELD_GET, it will likely
read 1 rather than the true ASID of the faulting VM. This misroutes page
faults and breaks virtual memory management.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260902212549.347805-1-jonathan.cavitt@intel.com?part=1
next prev parent reply other threads:[~2026-09-02 21:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 21:25 [PATCH v6 0/2] drm/xe/pagefault: Add SRCID to pagefault reporting Jonathan Cavitt
2026-09-02 21:25 ` [PATCH v6 1/2] drm/xe/pagefault: Add SRCID to pagefault struct Jonathan Cavitt
2026-09-02 21:44 ` sashiko-bot [this message]
2026-09-02 21:25 ` [PATCH v6 2/2] drm/xe/vm: Add srcid to xe_vm_get_property_ioctl fault report Jonathan Cavitt
2026-09-02 21:37 ` sashiko-bot
2026-09-02 21:39 ` ✓ CI.KUnit: success for drm/xe/pagefault: Add SRCID to pagefault reporting (rev6) Patchwork
2026-09-02 22:48 ` ✗ Xe.CI.BAT: 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=20260902214429.53C0E1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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