diff mbox series

[v4] crypto: ccp: Annotate SEV Firmware file names

Message ID 20210426081748.25419-1-joro@8bytes.org
State New
Headers show
Series [v4] crypto: ccp: Annotate SEV Firmware file names | expand

Commit Message

Joerg Roedel April 26, 2021, 8:17 a.m. UTC
From: Joerg Roedel <jroedel@suse.de>

Annotate the firmware files CCP might need using MODULE_FIRMWARE().
This will get them included into an initrd when CCP is also included
there. Otherwise the CCP module will not find its firmware when loaded
before the root-fs is mounted.
This can cause problems when the pre-loaded SEV firmware is too old to
support current SEV and SEV-ES virtualization features.

Fixes: e93720606efd ("crypto: ccp - Allow SEV firmware to be chosen based on Family and Model")
Cc: stable@vger.kernel.org # v4.20+
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/crypto/ccp/sev-dev.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Herbert Xu May 14, 2021, 11:34 a.m. UTC | #1
On Mon, Apr 26, 2021 at 10:17:48AM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Annotate the firmware files CCP might need using MODULE_FIRMWARE().
> This will get them included into an initrd when CCP is also included
> there. Otherwise the CCP module will not find its firmware when loaded
> before the root-fs is mounted.
> This can cause problems when the pre-loaded SEV firmware is too old to
> support current SEV and SEV-ES virtualization features.
> 
> Fixes: e93720606efd ("crypto: ccp - Allow SEV firmware to be chosen based on Family and Model")
> Cc: stable@vger.kernel.org # v4.20+
> Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  drivers/crypto/ccp/sev-dev.c | 4 ++++
>  1 file changed, 4 insertions(+)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c
index cb9b4c4e371e..675ff925a59d 100644
--- a/drivers/crypto/ccp/sev-dev.c
+++ b/drivers/crypto/ccp/sev-dev.c
@@ -42,6 +42,10 @@  static int psp_probe_timeout = 5;
 module_param(psp_probe_timeout, int, 0644);
 MODULE_PARM_DESC(psp_probe_timeout, " default timeout value, in seconds, during PSP device probe");
 
+MODULE_FIRMWARE("amd/amd_sev_fam17h_model0xh.sbin"); /* 1st gen EPYC */
+MODULE_FIRMWARE("amd/amd_sev_fam17h_model3xh.sbin"); /* 2nd gen EPYC */
+MODULE_FIRMWARE("amd/amd_sev_fam19h_model0xh.sbin"); /* 3rd gen EPYC */
+
 static bool psp_dead;
 static int psp_timeout;