]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
x86/mm: Remove unnecessary TLB flush for SME in-place encryption
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 1 Nov 2017 16:54:26 +0000 (11:54 -0500)
committerIngo Molnar <mingo@kernel.org>
Tue, 7 Nov 2017 11:16:14 +0000 (12:16 +0100)
A TLB flush is not required when doing in-place encryption or decryption
since the area's pagetable attributes are not being altered.  To avoid
confusion between what the routine is doing and what is documented in
the AMD APM, delete the local_flush_tlb() call.

Suggested-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171101165426.1388.24866.stgit@tlendack-t1.amdoffice.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/mem_encrypt.c

index 16c5f37933a2ae2d120402f1871af93872aebb07..53680a9dfbedb27d8990e3c98de6e37794c8ed3a 100644 (file)
@@ -63,7 +63,6 @@ static void __init __sme_early_enc_dec(resource_size_t paddr,
        if (!sme_me_mask)
                return;
 
-       local_flush_tlb();
        wbinvd();
 
        /*