提交 fcdcd6cd 编写于 作者: T Tom Lendacky 提交者: Thomas Gleixner

x86/realmode: Don't decrypt trampoline area under SEV

When SEV is active the trampoline area will need to be in encrypted
memory so only mark the area decrypted if SME is active.
Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Reviewed-by: NBorislav Petkov <bp@suse.de>
Tested-by: NBorislav Petkov <bp@suse.de>
Cc: Laura Abbott <labbott@redhat.com>
Cc: kvm@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Link: https://lkml.kernel.org/r/20171020143059.3291-5-brijesh.singh@amd.com
上级 682af543
...@@ -64,8 +64,9 @@ static void __init setup_real_mode(void) ...@@ -64,8 +64,9 @@ static void __init setup_real_mode(void)
/* /*
* If SME is active, the trampoline area will need to be in * If SME is active, the trampoline area will need to be in
* decrypted memory in order to bring up other processors * decrypted memory in order to bring up other processors
* successfully. * successfully. This is not needed for SEV.
*/ */
if (sme_active())
set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT); set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT);
memcpy(base, real_mode_blob, size); memcpy(base, real_mode_blob, size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册