lkml.org 
[lkml]   [2017]   [Oct]   [25]   [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 07/18/2017 03:51 AM, tip-bot for Tom Lendacky wrote:
> +/*
> + * This routine does not change the underlying encryption setting of the
> + * page(s) that map this memory. It assumes that eventually the memory is
> + * meant to be accessed as either encrypted or decrypted but the contents
> + * are currently not in the desired state.
> + *
> + * This routine follows the steps outlined in the AMD64 Architecture
> + * Programmer's Manual Volume 2, Section 7.10.8 Encrypt-in-Place.
> + */
> +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?

\
 
 \ /
  Last update: 2017-10-25 19:35    [W:0.081 / U:14.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site