From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/vf: Catch all unexpected register reads
Date: Tue, 11 Mar 2025 19:53:44 +0530 [thread overview]
Message-ID: <437269cc-69d9-40be-89a2-450d0ede1983@intel.com> (raw)
In-Reply-To: <20250311135726.1998-3-michal.wajdeczko@intel.com>
On 11-03-2025 19:27, Michal Wajdeczko wrote:
> While we can only mimic read32 for a few GT registers for which
> the PF shared the values, we shouldn't avoid calling helper code
> if we try to access non-GT register, as then we miss to trigger
> a debug warning. For cases where sriov_vf_gt was not set, just
> use primary_gt instead.
Under what scenario sriov_vf_gt can be not set for VF ?
Isn't this initialized for each gt during probe for VF ?
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/xe/xe_mmio.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index 70a36e777546..13e06a956ceb 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -204,8 +204,9 @@ void xe_mmio_write32(struct xe_mmio *mmio, struct xe_reg reg, u32 val)
>
> trace_xe_reg_rw(mmio, true, addr, val, sizeof(val));
>
> - if (!reg.vf && mmio->sriov_vf_gt)
> - xe_gt_sriov_vf_write32(mmio->sriov_vf_gt, reg, val);
> + if (!reg.vf && IS_SRIOV_VF(mmio->tile->xe))
> + xe_gt_sriov_vf_write32(mmio->sriov_vf_gt ?:
> + mmio->tile->primary_gt, reg, val);
> else
> writel(val, mmio->regs + addr);
> }
> @@ -218,8 +219,9 @@ u32 xe_mmio_read32(struct xe_mmio *mmio, struct xe_reg reg)
> /* Wa_15015404425 */
> mmio_flush_pending_writes(mmio);
>
> - if (!reg.vf && mmio->sriov_vf_gt)
> - val = xe_gt_sriov_vf_read32(mmio->sriov_vf_gt, reg);
> + if (!reg.vf && IS_SRIOV_VF(mmio->tile->xe))
> + val = xe_gt_sriov_vf_read32(mmio->sriov_vf_gt ?:
> + mmio->tile->primary_gt, reg);
> else
> val = readl(mmio->regs + addr);
>
next prev parent reply other threads:[~2025-03-11 14:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 13:57 [PATCH 0/2] VF: Catch all unexpected registers accesses Michal Wajdeczko
2025-03-11 13:57 ` [PATCH 1/2] drm/xe/vf: Don't try Driver-FLR if VF Michal Wajdeczko
2025-03-11 14:25 ` Ghimiray, Himal Prasad
2025-03-11 15:15 ` Michal Wajdeczko
2025-03-11 18:02 ` Matt Roper
2025-03-11 13:57 ` [PATCH 2/2] drm/xe/vf: Catch all unexpected register reads Michal Wajdeczko
2025-03-11 14:23 ` Ghimiray, Himal Prasad [this message]
2025-03-11 15:27 ` Michal Wajdeczko
2025-03-11 18:08 ` Matt Roper
2025-03-11 15:20 ` ✓ CI.Patch_applied: success for VF: Catch all unexpected registers accesses Patchwork
2025-03-11 15:20 ` ✓ CI.checkpatch: " Patchwork
2025-03-11 15:21 ` ✓ CI.KUnit: " Patchwork
2025-03-11 15:38 ` ✓ CI.Build: " Patchwork
2025-03-11 15:40 ` ✓ CI.Hooks: " Patchwork
2025-03-11 15:42 ` ✓ CI.checksparse: " Patchwork
2025-03-11 16:02 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-12 7:41 ` ✓ Xe.CI.Full: " 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=437269cc-69d9-40be-89a2-450d0ede1983@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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