Early init for few crypto modules for Secure Guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux