Skip to content

Commit bf04b24

Browse files
committed
crypto: ccp - Move message about TSME being enabled later in init
JIRA: https://issues.redhat.com/browse/RHEL-85131 Upstream Status: merged into the linux.git commit 059b135 Author: Mario Limonciello <[email protected]> Date: Tue May 28 16:07:12 2024 -0500 crypto: ccp - Move message about TSME being enabled later in init Some of the security attributes data is now populated from an HSTI command on some processors, so show the message after it has been populated. Signed-off-by: Mario Limonciello <[email protected]> Acked-by: Tom Lendacky <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Vladis Dronov <[email protected]>
1 parent 1ab7470 commit bf04b24

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

drivers/crypto/ccp/hsti.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,20 @@ int psp_init_hsti(struct psp_device *psp)
119119
return ret;
120120
}
121121

122+
/*
123+
* At this stage, if security information hasn't been populated by
124+
* either the PSP or by the driver through the platform command,
125+
* then there is nothing more to do.
126+
*/
127+
if (!psp->capability.security_reporting)
128+
return 0;
129+
130+
if (psp->capability.tsme_status) {
131+
if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
132+
dev_notice(psp->dev, "psp: Both TSME and SME are active, SME is unnecessary when TSME is active.\n");
133+
else
134+
dev_notice(psp->dev, "psp: TSME enabled\n");
135+
}
136+
122137
return 0;
123138
}

drivers/crypto/ccp/psp-dev.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,6 @@ static unsigned int psp_get_capability(struct psp_device *psp)
157157
}
158158
psp->capability.raw = val;
159159

160-
/* Detect TSME and/or SME status */
161-
if (psp->capability.security_reporting && psp->capability.tsme_status) {
162-
if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
163-
dev_notice(psp->dev, "psp: Both TSME and SME are active, SME is unnecessary when TSME is active.\n");
164-
else
165-
dev_notice(psp->dev, "psp: TSME enabled\n");
166-
}
167-
168160
return 0;
169161
}
170162

0 commit comments

Comments
 (0)