mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Tom Lendacky <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, bp@alien8.de, peterz@infradead.org,
	thomas.lendacky@amd.com, mingo@kernel.org,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	torvalds@linux-foundation.org, dave.hansen@intel.com, bp@suse.de
Subject: [tip:x86/mm] x86/mm: Remove unnecessary TLB flush for SME in-place encryption
Date: Tue, 7 Nov 2017 03:21:36 -0800	[thread overview]
Message-ID: <tip-c5e260890d5fd6687287f2b532c738a359a61a82@git.kernel.org> (raw)
In-Reply-To: <20171101165426.1388.24866.stgit@tlendack-t1.amdoffice.net>

Commit-ID:  c5e260890d5fd6687287f2b532c738a359a61a82
Gitweb:     https://git.kernel.org/tip/c5e260890d5fd6687287f2b532c738a359a61a82
Author:     Tom Lendacky <thomas.lendacky@amd.com>
AuthorDate: Wed, 1 Nov 2017 11:54:26 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 7 Nov 2017 12:16:14 +0100

x86/mm: Remove unnecessary TLB flush for SME 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>
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 | 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();
 
 	/*

  parent reply	other threads:[~2017-11-07 11:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 16:54 [PATCH] x86/mm: Remove unneeded TLB flush for " Tom Lendacky
2017-11-02 11:53 ` Borislav Petkov
2017-11-07 11:21 ` tip-bot for Tom Lendacky [this message]
2017-11-07 12:18 ` [tip:x86/urgent] " tip-bot for Tom Lendacky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c5e260890d5fd6687287f2b532c738a359a61a82@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome