All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] crypto: ccp: Annotate SEV Firmware file names
@ 2021-04-23 15:00 Joerg Roedel
  2021-04-23 15:52 ` Tom Lendacky
  0 siblings, 1 reply; 2+ messages in thread
From: Joerg Roedel @ 2021-04-23 15:00 UTC (permalink / raw)
  To: Brijesh Singh, Tom Lendacky, John Allen
  Cc: Herbert Xu, davem, linux-crypto, linux-kernel, joro,
	Joerg Roedel, stable

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.

Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/crypto/ccp/sev-dev.c | 4 ++++
 1 file changed, 4 insertions(+)

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;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] crypto: ccp: Annotate SEV Firmware file names
  2021-04-23 15:00 [PATCH v3] crypto: ccp: Annotate SEV Firmware file names Joerg Roedel
@ 2021-04-23 15:52 ` Tom Lendacky
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Lendacky @ 2021-04-23 15:52 UTC (permalink / raw)
  To: Joerg Roedel, Brijesh Singh, John Allen
  Cc: Herbert Xu, davem, linux-crypto, linux-kernel, Joerg Roedel, stable

On 4/23/21 10:00 AM, 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.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Joerg Roedel <jroedel@suse.de>

Do we want a Fixes: tag?

Fixes: e93720606efd ("crypto: ccp - Allow SEV firmware to be chosen based on Family and Model")

No need to go back farther than when that firmware filename format was
introduced.

Otherwise,

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>

> ---
>  drivers/crypto/ccp/sev-dev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 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;
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-23 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 15:00 [PATCH v3] crypto: ccp: Annotate SEV Firmware file names Joerg Roedel
2021-04-23 15:52 ` Tom Lendacky

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.