]> asedeno.scripts.mit.edu Git - linux.git/commit
x86/kexec: Set the C-bit in the identity map page table when SEV is active
authorLianbo Jiang <lijiang@redhat.com>
Tue, 30 Apr 2019 07:44:20 +0000 (15:44 +0800)
committerBorislav Petkov <bp@suse.de>
Thu, 20 Jun 2019 08:07:12 +0000 (10:07 +0200)
commit85784d16c2cf172cf1ebaf2390d6b7c4045d659c
treea7b8c64ae08e42e470c2bec23b8a9916b760f629
parent1a79c1b8a04153c4c387518967ce851f89e22733
x86/kexec: Set the C-bit in the identity map page table when SEV is active

When SEV is active, the second kernel image is loaded into encrypted
memory. For that, make sure that when kexec builds the identity mapping
page table, the memory is encrypted (i.e., _PAGE_ENC is set).

 [ bp: Sort local args and OR in _PAGE_ENC for more clarity. ]

Co-developed-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: bhe@redhat.com
Cc: dyoung@redhat.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: kexec@lists.infradead.org
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190430074421.7852-3-lijiang@redhat.com
arch/x86/kernel/machine_kexec_64.c