lkml.org 
[lkml]   [2017]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:x86/urgent] x86/mm: Remove unneeded TLB flush for in-place encryption
Commit-ID:  f1f31404c2f7fa168445d9c5ccb6a7caa53e2b78
Gitweb: https://git.kernel.org/tip/f1f31404c2f7fa168445d9c5ccb6a7caa53e2b78
Author: Tom Lendacky <thomas.lendacky@amd.com>
AuthorDate: Wed, 1 Nov 2017 11:54:26 -0500
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 7 Nov 2017 13:13:45 +0100

x86/mm: Remove unneeded TLB flush for in-place encryption

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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/20171101165426.1388.24866.stgit@tlendack-t1.amdoffice.net

---
arch/x86/mm/mem_encrypt.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 16c5f37..53680a9 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -63,7 +63,6 @@ static void __init __sme_early_enc_dec(resource_size_t paddr,
if (!sme_me_mask)
return;

- local_flush_tlb();
wbinvd();

/*
\
 
 \ /
  Last update: 2017-11-08 21:04    [W:0.169 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site