lkml.org 
[lkml]   [2017]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tip:x86/mm] x86/mm: Add support for early encryption/decryption of memory
From
Date
On 10/26/2017 06:05 AM, Tom Lendacky wrote:
>>>
>>> +static void __init __sme_early_enc_dec(resource_size_t paddr,
>>> +                       unsigned long size, bool enc)
>>> +{
>>> +    void *src, *dst;
>>> +    size_t len;
>>> +
>>> +    if (!sme_me_mask)
>>> +        return;
>>> +
>>> +    local_flush_tlb();
>>> +    wbinvd();
>>
>> What is this TLB flush for?  WBINVD is mentioned in "Volume 2, Section
>> 7.10.8", but TLB flushes are not.  Is it OK that this does not flush
>> global pages?
>
> The local_flush_tlb() is not needed and can be removed. I had that in
> there from early development and testing and just missed removing it.
> I can queue up a patch to delete it and remove the ambiguity with this
> routine and the APM document.

Cool, I was just doing a little audit of those TLB flushes and this one
stuck out at me. It would be great if it can be removed.

\
 
 \ /
  Last update: 2017-10-26 16:09    [W:0.086 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site