Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-04 Thread Christoph Hellwig
On Wed, Oct 04, 2017 at 11:21:53AM +0200, Borislav Petkov wrote: > On Wed, Oct 04, 2017 at 12:26:11PM +0530, P J P wrote: > > Each return above needs to be on its own line. > > ... because? It's actually readable by humanѕ that way.

Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-04 Thread Borislav Petkov
On Wed, Oct 04, 2017 at 04:12:37PM +0530, P J P wrote: > Quick glance would work if it is readable. Currently it is not if > one is viewing it in 80 cols screen/window. They do that. Writing > return on the same line does not add specific value IMO. Then you'll have to scroll to the right like y

Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-04 Thread P J P
+-- On Wed, 4 Oct 2017, Borislav Petkov wrote --+ | This is a function which maps commands to buffer lengths and it should be | obvious at a *very* quick glance what it does. And that is best done if it | is written in a tabular manner as we do such things in other places in the | kernel too.

Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-04 Thread Borislav Petkov
On Wed, Oct 04, 2017 at 03:24:36PM +0530, P J P wrote: > It appears to cross 80 columns limit, checkpatch.pl throws warnings. Adding > new line would be consistent with coding style. The 80 cols rule is not a hard one and checkpatch should not override common sense. This is a function which maps

Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-04 Thread P J P
+-- On Wed, 4 Oct 2017, Borislav Petkov wrote --+ | On Wed, Oct 04, 2017 at 12:26:11PM +0530, P J P wrote: | > Each return above needs to be on its own line. | | ... because? It appears to cross 80 columns limit, checkpatch.pl throws warnings. Adding new line would be consistent with coding style

Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-04 Thread Borislav Petkov
On Wed, Oct 04, 2017 at 12:26:11PM +0530, P J P wrote: > Each return above needs to be on its own line. ... because? -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --

Re: [Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-03 Thread P J P
+-- On Mon, 2 Oct 2017, Brijesh Singh wrote --+ | +static int sev_cmd_buffer_len(int cmd) | +{ | + switch (cmd) { | + case SEV_CMD_INIT: return sizeof(struct sev_data_init); | + case SEV_CMD_PLATFORM_STATUS: return sizeof(struct sev_data_status); | + case SEV_CMD_PEK_

[Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-02 Thread Brijesh Singh
AMDs new Secure Encrypted Virtualization (SEV) feature allows the memory contents of a virtual machines to be transparently encrypted with a key unique to the guest VM. The programming and management of the encryption keys are handled by the AMD Secure Processor (AMD-SP), which exposes the commands