Re: [Part2 PATCH v7 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

From: Brijesh Singh
Date: Thu Nov 02 2017 - 13:32:56 EST




On 11/02/2017 12:10 PM, Borislav Petkov wrote:
...

drivers/crypto/ccp/psp-dev.c | 350 +++++++++++++++++++++++++++++++++++++++++++
drivers/crypto/ccp/psp-dev.h | 24 +++
drivers/crypto/ccp/sp-dev.c | 9 ++
drivers/crypto/ccp/sp-dev.h | 4 +
include/linux/psp-sev.h | 143 ++++++++++++++++++
5 files changed, 530 insertions(+)

Some more cleanups:

* If sev_data_init is per psp_device, you can simply embed it in the
struct psp_device and save yourself the complete allocation.

* s/sev_ops_init/sev_misc_init/ because it doesn't do anything ops-like

* save some header lines.



Thanks for the cleanup patch, I will apply these changes. Additionally, I will also embed the sev_user_data_platform_status in per psp_device struct instead of dvmem_kzalloc().


-Brijesh