linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/3] x86/mm/encrypt: Cleanup and switching between paging modes
@ 2018-01-23 17:19 Kirill A. Shutemov
  2018-01-23 17:19 ` [PATCH 1/3] x86/mm/encrypt: Move sme_populate_pgd*() into separate translation unit Kirill A. Shutemov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kirill A. Shutemov @ 2018-01-23 17:19 UTC (permalink / raw)
  To: Ingo Molnar, x86, Thomas Gleixner, H. Peter Anvin, Tom Lendacky
  Cc: Linus Torvalds, Borislav Petkov, linux-mm, linux-kernel,
	Kirill A. Shutemov

This patcheset is a preparation set for boot-time switching between
paging modes. Please review and consider applying.

Code around sme_populate_pgd() is unnecessary complex and hard to modify.

This patchset rewrites it in more stream-lined way to add support of
boot-time switching between paging modes.

I haven't tested the patchset on hardware capable of memory encryption.

v2:
 - Rebased to up-to-date tip

Kirill A. Shutemov (3):
  x86/mm/encrypt: Move sme_populate_pgd*() into separate translation
    unit
  x86/mm/encrypt: Rewrite sme_populate_pgd() and
    sme_populate_pgd_large()
  x86/mm/encrypt: Rewrite sme_pgtable_calc()

 arch/x86/mm/Makefile               |  13 +--
 arch/x86/mm/mem_encrypt.c          | 171 +++----------------------------------
 arch/x86/mm/mem_encrypt_identity.c | 118 +++++++++++++++++++++++++
 arch/x86/mm/mm_internal.h          |  14 +++
 4 files changed, 152 insertions(+), 164 deletions(-)
 create mode 100644 arch/x86/mm/mem_encrypt_identity.c

-- 
2.15.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/3] x86/mm/encrypt: Simplify pgtable helpers
@ 2017-12-12 11:45 Kirill A. Shutemov
  2017-12-12 11:45 ` [PATCH 2/3] x86/mm/encrypt: Rewrite sme_populate_pgd() and sme_populate_pgd_large() Kirill A. Shutemov
  0 siblings, 1 reply; 8+ messages in thread
From: Kirill A. Shutemov @ 2017-12-12 11:45 UTC (permalink / raw)
  To: Tom Lendacky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
  Cc: x86, Borislav Petkov, Brijesh Singh, linux-mm, linux-kernel,
	Kirill A. Shutemov

This patchset simplifies sme_populate_pgd(), sme_populate_pgd_large() and
sme_pgtable_calc() functions.

As a side effect, the patchset makes encryption code ready to boot-time
switching between paging modes.

The patchset is build on top of Tom's "x86: SME: BSP/SME microcode update
fix" patchset.

It was only build-tested. Tom, could you please get it tested properly?

Kirill A. Shutemov (3):
  x86/mm/encrypt: Move sme_populate_pgd*() into separate translation
    unit
  x86/mm/encrypt: Rewrite sme_populate_pgd() and
    sme_populate_pgd_large()
  x86/mm/encrypt: Rewrite sme_pgtable_calc()

 arch/x86/mm/Makefile               |  13 +--
 arch/x86/mm/mem_encrypt.c          | 169 ++++---------------------------------
 arch/x86/mm/mem_encrypt_identity.c | 123 +++++++++++++++++++++++++++
 arch/x86/mm/mm_internal.h          |   4 +
 4 files changed, 150 insertions(+), 159 deletions(-)
 create mode 100644 arch/x86/mm/mem_encrypt_identity.c

-- 
2.15.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-24 15:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 17:19 [PATCHv2 0/3] x86/mm/encrypt: Cleanup and switching between paging modes Kirill A. Shutemov
2018-01-23 17:19 ` [PATCH 1/3] x86/mm/encrypt: Move sme_populate_pgd*() into separate translation unit Kirill A. Shutemov
2018-01-24 10:36   ` Kirill A. Shutemov
2018-01-24 14:59   ` Tom Lendacky
2018-01-24 15:52     ` Kirill A. Shutemov
2018-01-23 17:19 ` [PATCH 2/3] x86/mm/encrypt: Rewrite sme_populate_pgd() and sme_populate_pgd_large() Kirill A. Shutemov
2018-01-23 17:19 ` [PATCH 3/3] x86/mm/encrypt: Rewrite sme_pgtable_calc() Kirill A. Shutemov
  -- strict thread matches above, loose matches on Subject: below --
2017-12-12 11:45 [PATCH 0/3] x86/mm/encrypt: Simplify pgtable helpers Kirill A. Shutemov
2017-12-12 11:45 ` [PATCH 2/3] x86/mm/encrypt: Rewrite sme_populate_pgd() and sme_populate_pgd_large() Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox