lkml.org 
[lkml]   [2017]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/2] acpi, x86: Remove encryption mask from ACPI page protection type

* Tom Lendacky <thomas.lendacky@amd.com> wrote:

> > > + * in memory in an encrypted state so return a protection attribute
> > > + * that does not have the encryption bit set.
> > > */
> > > - return PAGE_KERNEL;
> > > + return sme_active() ? PAGE_KERNEL_IO : PAGE_KERNEL;
> >
> > Why isn't there a PAGE_KERNEL_NOENC define which you can simply return
> > instead of testing?
>
> Sounds like something I should add to pgtable_types.h (which has a
> #define for PAGE_KERNEL_EXEC_NOENC, but not PAGE_KERNEL_NOENC). I'll
> create that #define.
>
> As for the sme_active() check I was getting ahead of myself since
> under SEV the encryption mask is needed. I'll change it to just
> return PAGE_KERNEL_NOENC and then worry about the SEV change in
> the SEV patches.

Ok, that works for me too, as we at least don't sprinke the code with repeated
sme_active() toggles.

Thanks,

Ingo

\
 
 \ /
  Last update: 2017-07-28 08:29    [W:0.076 / U:2.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site