All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentine Burley <valentine.burley@collabora.com>
To: "Daniele Ceraolo Spurio" <daniele.ceraolospurio@intel.com>
Cc: "intel-gfx" <intel-gfx@lists.freedesktop.org>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Alexander Usyskin" <alexander.usyskin@intel.com>,
	"Alan Previn" <alan.previn.teres.alexis@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/pxp: Do not support PXP if CSME is not available
Date: Wed, 16 Jul 2025 13:34:08 +0200	[thread overview]
Message-ID: <19813036e03.546c166b2607290.4657211250310977639@collabora.com> (raw)
In-Reply-To: <20250715225959.488109-6-daniele.ceraolospurio@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2960 bytes --]

Thank you for the fix! This worked around the issue and disabled PXP,
which allowed our virtual machine to boot.

Tested-by: Valentine Burley < mailto:valentine.burley@collabora.com >







---- On Wed, 16 Jul 2025 01:00:02 +0200 Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> wrote ---



The PXP flow requires us to communicate with CSME, which we do via a 
mei component. Since the mei component binding is async and can take 
a bit to complete, we don't wait for it during i915 load. If userspace 
queries the state before the async binding is complete, we return an 
"init in progress" state, with the expectation that it will eventually 
transition to "init complete" if the CSME device is functional. 
 
Mesa CI is flashing a custom coreboot on their Chromebooks that hides 
the CSME device, which means that we never transition to the "init 
complete" state. While from an interface POV it is not incorrect to not 
end up in "init complete" if the CSME is missing, we can mitigate the 
impact of this by simply checking if the CSME device is available at 
all before attempting to initialize PXP. 
 
Reported-by: Valentine Burley < mailto:valentine.burley@collabora.com > 
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14516  
Signed-off-by: Daniele Ceraolo Spurio < mailto:daniele.ceraolospurio@intel.com > 
Cc: Rodrigo Vivi < mailto:rodrigo.vivi@intel.com > 
Cc: Alexander Usyskin < mailto:alexander.usyskin@intel.com > 
Cc: Alan Previn < mailto:alan.previn.teres.alexis@intel.com > 
--- 
 drivers/gpu/drm/i915/i915_module.c   | 1 + 
 drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 +++++ 
 2 files changed, 6 insertions(+) 
 
diff --git a/drivers/gpu/drm/i915/i915_module.c b/drivers/gpu/drm/i915/i915_module.c 
index 5862754c662c..07118a1ea14d 100644 
--- a/drivers/gpu/drm/i915/i915_module.c 
+++ b/drivers/gpu/drm/i915/i915_module.c 
@@ -126,3 +126,4 @@ MODULE_AUTHOR("Intel Corporation"); 
 
 MODULE_DESCRIPTION(DRIVER_DESC); 
 MODULE_LICENSE("GPL and additional rights"); 
+ 
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c 
index c077a1c464cf..e476c1d82c2f 100644 
--- a/drivers/gpu/drm/i915/pxp/intel_pxp.c 
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c 
@@ -2,6 +2,7 @@ 
 /* 
 * Copyright(c) 2020 Intel Corporation. 
 */ 
+#include <linux/mei_me.h> 
 #include <linux/workqueue.h> 
 
 #include "gem/i915_gem_context.h" 
@@ -203,6 +204,10 @@ int intel_pxp_init(struct drm_i915_private *i915) 
     if (intel_gt_is_wedged(to_gt(i915))) 
         return -ENOTCONN; 
 
+    /* iGPUs require CSME to be available to use PXP */ 
+    if (!IS_DGFX(i915) && !mei_me_device_present()) 
+        return -ENODEV; 
+ 
     /* 
      * NOTE: Get the ctrl_gt before checking intel_pxp_is_supported since 
      * we still need it if PXP's backend tee transport is needed. 
-- 
2.43.0

[-- Attachment #2: Type: text/html, Size: 4404 bytes --]

  reply	other threads:[~2025-07-17 14:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 23:00 [PATCH 0/2] Check if CSME is available before initializing PXP Daniele Ceraolo Spurio
2025-07-15 23:00 ` [PATCH 1/2] mei: me: Add exported function to check ME device availabiliy Daniele Ceraolo Spurio
2025-07-16  5:10   ` Greg Kroah-Hartman
2025-07-16 16:38     ` Daniele Ceraolo Spurio
2025-07-16 16:49       ` Greg Kroah-Hartman
2025-07-16 17:57         ` Daniele Ceraolo Spurio
2025-07-30 15:57           ` Daniele Ceraolo Spurio
2025-07-15 23:00 ` [PATCH 2/2] drm/i915/pxp: Do not support PXP if CSME is not available Daniele Ceraolo Spurio
2025-07-16 11:34   ` Valentine Burley [this message]
2025-07-15 23:53 ` ✓ i915.CI.BAT: success for Check if CSME is available before initializing PXP Patchwork
2025-07-16 17:45 ` ✗ 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=19813036e03.546c166b2607290.4657211250310977639@collabora.com \
    --to=valentine.burley@collabora.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=alexander.usyskin@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.