From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v3 23/23] drm/xe/sriov: Disable SR-IOV if primary GT is disabled via configfs
Date: Wed, 1 Oct 2025 13:51:58 +0200 [thread overview]
Message-ID: <ceddfd57-7a33-4b65-9644-e2387cc80544@intel.com> (raw)
In-Reply-To: <20250930225618.140071-48-matthew.d.roper@intel.com>
On 10/1/2025 12:56 AM, Matt Roper wrote:
> SR-IOV operation relies on the primary GT's GuC to operate (in both PF
> and VF mode). If the primary GT is disabled in VF mode, fail the probe.
> If the primary GT is disabled in PF mode, force the device back to
> native (non-sriov) mode.
can we split this into PF and VF specific patch?
>
> v2:
> - Move handling to xe_info_init(). (Michal)
oops, I meant _early variant, see below
>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pci.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 4a792e1037d5..44f99c1a39e0 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -763,6 +763,18 @@ static int xe_info_init(struct xe_device *xe,
> int ret;
> u8 id;
>
> + /* SR-IOV (both PF and VF) relies on the primary GT's GuC */
> + if ((gt_types_allowed & BIT_ULL(XE_GT_TYPE_MAIN)) == 0) {
> + if (IS_SRIOV_PF(xe)) {
> + drm_info(&xe->drm, "Disabling SR-IOV because primary GT is disabled.\n");
> + pci_sriov_set_totalvfs(pdev, 0);
> + xe->sriov.__mode = XE_SRIOV_MODE_NONE;
I was thinking about clearing .has_sriov flag somewhere in the
xe_info_init_early() like:
+ xe->info.allowed_gt_types = xe_configfs_allowed_gt_types();
+ xe->info.has_primary_gt = xe_configfs_primary_gt_supported();
- xe->info.has_sriov = desc->has_sriov;
+ xe->info.has_sriov = xe->info.has_primary_gt ? desc->has_sriov : 0;
then during SRIOV probe PF will always return as native
alternatively, we can add new condition in xe_sriov_pf_readiness():
+ if (!xe_configfs_primary_gt_supported())
+ return pf_continue_as_native(xe, "No primary GT");
> + } else if (IS_SRIOV_VF(xe)) {
> + drm_err(&xe->drm, "Cannot probe device in SR-IOV VF without primary GT enabled.\n");
> + return -ENODEV;
and for the VF case, maybe it is sufficient to properly abort
from the read_gmdid(), which now returns an error ?
nit: we can now use: xe_err(xe, "Cannot probe ...");
> + }
> + }
> +
> /*
> * If this platform supports GMD_ID, we'll detect the proper IP
> * descriptor to use from hardware registers.
next prev parent reply other threads:[~2025-10-01 11:52 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 22:56 [PATCH v3 00/23] Allow configfs to disable specific GT type(s) Matt Roper
2025-09-30 22:56 ` [PATCH v3 01/23] drm/xe/huc: Adjust HuC check on primary GT Matt Roper
2025-09-30 22:56 ` [PATCH v3 02/23] drm/xe: Drop GT parameter to xe_display_irq_postinstall() Matt Roper
2025-09-30 22:56 ` [PATCH v3 03/23] drm/xe: Move 'va_bits' flag back to platform descriptor Matt Roper
2025-10-01 9:44 ` Michal Wajdeczko
2025-09-30 22:56 ` [PATCH v3 04/23] drm/xe: Move 'vm_max_level' " Matt Roper
2025-10-01 21:51 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 05/23] drm/xe: Move 'vram_flags' " Matt Roper
2025-09-30 22:56 ` [PATCH v3 06/23] drm/xe: Move 'has_flatccs' " Matt Roper
2025-09-30 22:56 ` [PATCH v3 07/23] drm/xe: Read VF GMD_ID with a specifically-allocated dummy GT Matt Roper
2025-10-01 10:07 ` Michal Wajdeczko
2025-10-02 12:43 ` Gustavo Sousa
2025-10-07 17:07 ` Matt Roper
2025-10-07 17:14 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 08/23] drm/xe: Move primary GT allocation from xe_tile_init_early to xe_tile_init Matt Roper
2025-09-30 22:56 ` [PATCH v3 09/23] drm/xe: Skip L2 / TDF cache flushes if primary GT is disabled Matt Roper
2025-10-01 6:39 ` Upadhyay, Tejas
2025-09-30 22:56 ` [PATCH v3 10/23] drm/xe/query: Report hwconfig size as 0 " Matt Roper
2025-10-01 6:42 ` Upadhyay, Tejas
2025-09-30 22:56 ` [PATCH v3 11/23] drm/xe/pmu: Initialize PMU event types based on first available GT Matt Roper
2025-10-01 20:59 ` Lucas De Marchi
2025-09-30 22:56 ` [PATCH v3 12/23] drm/xe: Check for primary GT before looking up Wa_22019338487 Matt Roper
2025-10-01 21:10 ` Lucas De Marchi
2025-10-02 13:46 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 13/23] drm/xe: Make display part of Wa_22019338487 a device workaround Matt Roper
2025-10-02 14:26 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 14/23] drm/xe/irq: Don't try to lookup engine masks for non-existent primary GT Matt Roper
2025-09-30 22:56 ` [PATCH v3 15/23] drm/xe: Handle Wa_22010954014 and Wa_14022085890 as device workarounds Matt Roper
2025-10-02 17:49 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 16/23] drm/xe/rtp: Pass xe_device parameter to FUNC matches Matt Roper
2025-10-02 18:24 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 17/23] drm/xe: Bypass Wa_14018094691 when primary GT is disabled Matt Roper
2025-10-03 12:44 ` Gustavo Sousa
2025-10-07 17:39 ` Matt Roper
2025-09-30 22:56 ` [PATCH v3 18/23] drm/xe: Correct lineage for Wa_22014953428 and only check with valid GT Matt Roper
2025-10-03 12:52 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 19/23] drm/xe: Check that GT is not NULL before testing Wa_16023588340 Matt Roper
2025-09-30 22:56 ` [PATCH v3 20/23] drm/xe: Don't check BIOS-disabled FlatCCS if primary GT is disabled Matt Roper
2025-10-03 13:17 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 21/23] drm/xe: Break GT setup out of xe_info_init() Matt Roper
2025-10-03 13:47 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 22/23] drm/xe/configfs: Add attribute to disable GT types Matt Roper
2025-10-03 18:05 ` Gustavo Sousa
2025-09-30 22:56 ` [PATCH v3 23/23] drm/xe/sriov: Disable SR-IOV if primary GT is disabled via configfs Matt Roper
2025-10-01 11:51 ` Michal Wajdeczko [this message]
2025-09-30 23:19 ` ✗ CI.checkpatch: warning for Allow configfs to disable specific GT type(s) (rev3) Patchwork
2025-09-30 23:21 ` ✓ CI.KUnit: success " Patchwork
2025-10-01 0:07 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-01 2:30 ` ✗ 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=ceddfd57-7a33-4b65-9644-e2387cc80544@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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