Re: [RFC PATCH v4 28/28] x86: Add support to make use of Secure Memory Encryption

Borislav Petkov
2017-03-08T15:05:20Z

On Tue, Mar 07, 2017 at 10:05:00AM -0600, Tom Lendacky wrote:
> > And then you need to correct the function signature in the
> > !CONFIG_AMD_MEM_ENCRYPT case, at the end of this file, too:
> >
> > unsigned long __init sme_enable(struct boot_params *bp) { return 0; }
>
> Yup, missed that. I'll make it match.

Or, you can do this:

unsigned long __init sme_enable(void *boot_data)
{
#ifdef CONFIG_AMD_MEM_ENCRYPT
struct boot_params *bp = boot_data;
unsigned int eax, ebx, ecx, edx;
unsigned long cmdline_ptr;

...

out:
#endif /* CONFIG_AMD_MEM_ENCRYPT */
return sme_me_mask;
}

and never worry for function headers going out of whack.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: email@kvack.org