Skip to content

Commit

Permalink
x86/mm: Remove unnecessary TLB flush for SME in-place encryption
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tom Lendacky <[email protected]>
Reviewed-by: Borislav Petkov <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
tlendacky authored and Ingo Molnar committed Nov 7, 2017
1 parent 629a359 commit c5e2608
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/x86/mm/mem_encrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ static void __init __sme_early_enc_dec(resource_size_t paddr,
if (!sme_me_mask)
return;

local_flush_tlb();
wbinvd();

/*
Expand Down

0 comments on commit c5e2608

Please sign in to comment.