linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Early init for few crypto modules for Secure Guests
@ 2022-10-04  4:41 Nikunj A. Dadhania
  2022-10-04  8:24 ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Nikunj A. Dadhania @ 2022-10-04  4:41 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto, Tom Lendacky, ketanch

Hi!

We are trying to implement Secure TSC feature for AMD SNP guests [1]. During the boot-up of the 
secondary cpus, SecureTSC enabled guests need to query TSC info from Security processor (PSP). 
This communication channel is encrypted between the security processor and the guest, 
hypervisor is just the conduit to deliver the guest messages to the security processor. 
Each message is protected with an AEAD (AES-256 GCM). 

As the TSC info is needed during the smpboot phase, few crypto modules need to be loaded early
to use the crypto api for encryption/decryption of SNP Guest messages.

I was able to get the SNP Guest messages working with initializing few crypto modules using 
early_initcall() instead of subsys_initcall().

Require suggestion/inputs if this is acceptable. List of modules that was changed 
to early_initcall:

early_initcall(aes_init);
early_initcall(cryptomgr_init);
early_initcall(crypto_ctr_module_init);
early_initcall(crypto_gcm_module_init);
early_initcall(ghash_mod_init);

Thanks,
Nikunj


1. AMD APM Vol-2 (15.36.18 Secure TSC): https://www.amd.com/system/files/TechDocs/24593.pdf
2. SNP ABI Spec (7.9 TSC Info): https://www.amd.com/system/files/TechDocs/56860.pdf

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

end of thread, other threads:[~2022-10-06 12:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  4:41 Early init for few crypto modules for Secure Guests Nikunj A. Dadhania
2022-10-04  8:24 ` Ard Biesheuvel
2022-10-04  8:28   ` Ard Biesheuvel
2022-10-04  9:50     ` Nikunj A. Dadhania
2022-10-04 17:17       ` Ard Biesheuvel
2022-10-06 11:50         ` Nikunj A. Dadhania
2022-10-06 12:10           ` Ard Biesheuvel

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).