public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/9] x86: Confine early 1:1 mapped startup code
@ 2024-02-27 15:19 Ard Biesheuvel
  2024-02-27 15:19 ` [PATCH v7 1/9] x86/startup_64: Simplify CR4 handling in " Ard Biesheuvel
                   ` (9 more replies)
  0 siblings, 10 replies; 46+ messages in thread
From: Ard Biesheuvel @ 2024-02-27 15:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, Kevin Loughlin, Tom Lendacky, Dionna Glaze,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	Andy Lutomirski, Brian Gerst

From: Ard Biesheuvel <ardb@kernel.org>

This is resend #2 of v5 [0] with some touchups applied. 

Changes since v6:
- Drop flawed patch to move some SME/SEV related calls out of the early
  boot path to avoid the potential need for backporting patches #6/#7
  to kernels where SEV support may not be crucial. This problem will be
  dealt with if/when it arises while doing those backports.

Changes since v5:
- drop patches that have been merged
- rebase onto latest tip/x86/boot
- fix comment regarding CR4.PGE wrt flushing of global TLB entries
- avoid adding startup code to .noinstr.text as it triggers objtool
  warnings

[0] https://lore.kernel.org/all/20240221113506.2565718-18-ardb+git@google.com/

Cc: Kevin Loughlin <kevinloughlin@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Dionna Glaze <dionnaglaze@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>

Ard Biesheuvel (9):
  x86/startup_64: Simplify CR4 handling in startup code
  x86/startup_64: Defer assignment of 5-level paging global variables
  x86/startup_64: Simplify calculation of initial page table address
  x86/startup_64: Simplify virtual switch on primary boot
  efi/libstub: Add generic support for parsing mem_encrypt=
  x86/boot: Move mem_encrypt= parsing to the decompressor
  x86/sme: Move early SME kernel encryption handling into .head.text
  x86/sev: Move early startup code into .head.text section
  x86/startup_64: Drop global variables keeping track of LA57 state

 arch/x86/boot/compressed/misc.c                | 15 ++++
 arch/x86/boot/compressed/misc.h                |  4 -
 arch/x86/boot/compressed/pgtable_64.c          | 12 ---
 arch/x86/boot/compressed/sev.c                 |  3 +
 arch/x86/boot/compressed/vmlinux.lds.S         |  1 +
 arch/x86/include/asm/mem_encrypt.h             |  8 +-
 arch/x86/include/asm/pgtable_64_types.h        | 43 ++++-----
 arch/x86/include/asm/sev.h                     | 10 +--
 arch/x86/include/uapi/asm/bootparam.h          |  1 +
 arch/x86/kernel/cpu/common.c                   |  2 -
 arch/x86/kernel/head64.c                       | 61 ++-----------
 arch/x86/kernel/head_64.S                      | 93 ++++++++------------
 arch/x86/kernel/sev-shared.c                   | 23 +++--
 arch/x86/kernel/sev.c                          | 14 +--
 arch/x86/lib/Makefile                          | 13 ---
 arch/x86/mm/kasan_init_64.c                    |  3 -
 arch/x86/mm/mem_encrypt_identity.c             | 83 +++++------------
 drivers/firmware/efi/libstub/efi-stub-helper.c |  8 ++
 drivers/firmware/efi/libstub/efistub.h         |  2 +-
 drivers/firmware/efi/libstub/x86-stub.c        |  3 +
 20 files changed, 147 insertions(+), 255 deletions(-)

-- 
2.44.0.rc1.240.g4c46232300-goog


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

end of thread, other threads:[~2024-03-05  8:46 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 15:19 [PATCH v7 0/9] x86: Confine early 1:1 mapped startup code Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 1/9] x86/startup_64: Simplify CR4 handling in " Ard Biesheuvel
2024-02-28 13:45   ` Borislav Petkov
2024-02-29 22:36     ` Ard Biesheuvel
2024-03-04 22:09   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 2/9] x86/startup_64: Defer assignment of 5-level paging global variables Ard Biesheuvel
2024-02-28 20:55   ` Borislav Petkov
2024-03-01 10:01     ` Ard Biesheuvel
2024-03-01 16:09       ` Borislav Petkov
2024-03-01 17:09         ` Ard Biesheuvel
2024-03-01 17:33           ` Borislav Petkov
2024-03-01 19:13             ` Tom Lendacky
2024-03-03 19:26             ` Borislav Petkov
2024-03-03 21:56               ` Ard Biesheuvel
2024-03-03 22:10                 ` Borislav Petkov
2024-03-04 22:09   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 3/9] x86/startup_64: Simplify calculation of initial page table address Ard Biesheuvel
2024-02-28 21:27   ` Borislav Petkov
2024-03-04 22:09   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 4/9] x86/startup_64: Simplify virtual switch on primary boot Ard Biesheuvel
2024-02-29 10:37   ` Borislav Petkov
2024-02-29 22:36     ` Ard Biesheuvel
2024-03-01 16:12       ` Borislav Petkov
2024-03-04 22:09   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 5/9] efi/libstub: Add generic support for parsing mem_encrypt= Ard Biesheuvel
2024-03-01 16:16   ` Borislav Petkov
2024-03-04 22:09   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 6/9] x86/boot: Move mem_encrypt= parsing to the decompressor Ard Biesheuvel
2024-03-01 19:16   ` Borislav Petkov
2024-03-01 23:46     ` Ard Biesheuvel
2024-03-02 14:51       ` Borislav Petkov
2024-03-04 22:09   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 7/9] x86/sme: Move early SME kernel encryption handling into .head.text Ard Biesheuvel
2024-03-04 22:08   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 8/9] x86/sev: Move early startup code into .head.text section Ard Biesheuvel
2024-03-04 22:08   ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
2024-02-27 15:19 ` [PATCH v7 9/9] x86/startup_64: Drop global variables keeping track of LA57 state Ard Biesheuvel
2024-03-01 19:20   ` Borislav Petkov
2024-03-01 23:55     ` Ard Biesheuvel
2024-03-02 15:17       ` Borislav Petkov
2024-03-02 15:32         ` Ard Biesheuvel
2024-03-02 18:22           ` Borislav Petkov
2024-03-04 17:07 ` [PATCH v7 0/9] x86: Confine early 1:1 mapped startup code Tom Lendacky
2024-03-04 19:13   ` Ard Biesheuvel
2024-03-04 22:41     ` Tom Lendacky
2024-03-05  8:46       ` Ard Biesheuvel

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