[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a3b1467-a802-1a34-2f8d-7e4d0098cee6@intel.com>
Date: Wed, 25 Oct 2017 10:34:57 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: arnd@...db.de, aryabinin@...tuozzo.com, dvyukov@...gle.com,
mingo@...nel.org, pbonzini@...hat.com, peterz@...radead.org,
torvalds@...ux-foundation.org, toshi.kani@....com,
matt@...eblueprint.co.uk, corbet@....net, hpa@...or.com,
konrad.wilk@...cle.com, dyoung@...hat.com, tglx@...utronix.de,
linux-kernel@...r.kernel.org, riel@...hat.com, bp@...e.de,
lwoodman@...hat.com, glider@...gle.com, luto@...nel.org,
mst@...hat.com, brijesh.singh@....com, thomas.lendacky@....com,
rkrcmar@...hat.com, bp@...en8.de, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/mm] x86/mm: Add support for early encryption/decryption
of memory
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?
Powered by blists - more mailing lists