Re: [PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing
From: Thomas Gleixner
Date: Wed Jun 21 2017 - 14:53:02 EST
On Wed, 21 Jun 2017, Tom Lendacky wrote:
> On 6/21/2017 10:38 AM, Thomas Gleixner wrote:
> > /*
> > * Sanitize CPU configuration and retrieve the modifier
> > * for the initial pgdir entry which will be programmed
> > * into CR3. Depends on enabled SME encryption, normally 0.
> > */
> > call __startup_secondary_64
> >
> > addq $(init_top_pgt - __START_KERNEL_map), %rax
> >
> > You can hide that stuff in C-code nicely without adding any cruft to the
> > ASM code.
> >
>
> Moving the call to verify_cpu into the C-code might be quite a bit of
> change. Currently, the verify_cpu code is included code and not a
> global function.
Ah. Ok. I missed that.
> I can still do the __startup_secondary_64() function and then look to
> incorporate verify_cpu into both __startup_64() and
> __startup_secondary_64() as a post-patch to this series.
Yes, just having __startup_secondary_64() for now and there the extra bits
for that encryption stuff is fine.
> At least the secondary path will have a base C routine to which
> modifications can be made in the future if needed. How does that sound?
Sounds like a plan.