From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: "Tom Lendacky" <thomas.lendacky@amd.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Rijo Thomas" <Rijo-john.Thomas@amd.com>
Cc: John Allen <john.allen@amd.com>,
"David S . Miller" <davem@davemloft.net>,
Hans de Goede <hansg@kernel.org>,
linux-crypto@vger.kernel.org (open list:AMD CRYPTOGRAPHIC
COPROCESSOR (CCP) DRIVER),
platform-driver-x86@vger.kernel.org (open list:AMD PMF DRIVER),
Lars Francke <lars.francke@gmail.com>,
Yijun Shen <Yijun.Shen@dell.com>,
"Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: [PATCH v3 2/5] crypto: ccp - Declare PSP dead if PSP_CMD_TEE_RING_INIT fails
Date: Sun, 14 Dec 2025 13:12:10 -0600 [thread overview]
Message-ID: <20251214191213.154021-3-superm1@kernel.org> (raw)
In-Reply-To: <20251214191213.154021-1-superm1@kernel.org>
tee_init_ring() only declares PSP dead if the command times out.
If there is any other failure it is still considered fatal though.
Set psp_dead for other failures as well.
Fixes: 949a0c8dd3c2 ("crypto: ccp - Move direct access to some PSP registers out of TEE")
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
drivers/crypto/ccp/tee-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/ccp/tee-dev.c b/drivers/crypto/ccp/tee-dev.c
index 5e1d80724678d..af881daa5855b 100644
--- a/drivers/crypto/ccp/tee-dev.c
+++ b/drivers/crypto/ccp/tee-dev.c
@@ -125,6 +125,7 @@ static int tee_init_ring(struct psp_tee_device *tee)
dev_err(tee->dev, "tee: ring init command failed (%#010lx)\n",
FIELD_GET(PSP_CMDRESP_STS, reg));
tee_free_ring(tee);
+ psp_dead = true;
ret = -EIO;
}
--
2.43.0
next prev parent reply other threads:[~2025-12-14 19:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-14 19:12 [PATCH v3 0/5] Fixes for PMF and CCP drivers after S4 Mario Limonciello (AMD)
2025-12-14 19:12 ` [PATCH v3 1/5] platform/x86/amd/pmf: Prevent TEE errors after hibernate Mario Limonciello (AMD)
2025-12-14 19:12 ` Mario Limonciello (AMD) [this message]
2025-12-14 19:12 ` [PATCH v3 3/5] crypto: ccp - Add an S4 restore flow Mario Limonciello (AMD)
2025-12-15 12:07 ` Ilpo Järvinen
2025-12-14 19:12 ` [PATCH v3 4/5] crypto: ccp - Factor out ring destroy handling to a helper Mario Limonciello (AMD)
2025-12-14 19:12 ` [PATCH v3 5/5] crypto: ccp - Send PSP_CMD_TEE_RING_DESTROY when PSP_CMD_TEE_RING_INIT fails Mario Limonciello (AMD)
2025-12-15 12:01 ` Ilpo Järvinen
2025-12-15 14:57 ` Mario Limonciello
2025-12-15 14:59 ` Ilpo Järvinen
2025-12-15 5:56 ` [PATCH v3 0/5] Fixes for PMF and CCP drivers after S4 Shen, Yijun
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=20251214191213.154021-3-superm1@kernel.org \
--to=superm1@kernel.org \
--cc=Rijo-john.Thomas@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=Yijun.Shen@dell.com \
--cc=davem@davemloft.net \
--cc=hansg@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=john.allen@amd.com \
--cc=lars.francke@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=thomas.lendacky@amd.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;
as well as URLs for NNTP newsgroup(s).