From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: [RFC PATCH v1 14/28] x86: Don't set the SME MSR bit when SEV is active Date: Mon, 22 Aug 2016 19:26:28 -0400 Message-ID: <147190838870.9523.7536164067495140361.stgit__24029.4303432622$1471910389$gmane$org@brijesh-build-machine> References: <147190820782.9523.4967724730957229273.stgit@brijesh-build-machine> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:37218 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932424AbcHVX7K (ORCPT ); Mon, 22 Aug 2016 19:59:10 -0400 In-Reply-To: <147190820782.9523.4967724730957229273.stgit@brijesh-build-machine> Sender: linux-crypto-owner@vger.kernel.org List-ID: From: Tom Lendacky When SEV is active the virtual machine cannot set the MSR for SME, so don't set the trampoline flag for SME. Signed-off-by: Tom Lendacky --- arch/x86/realmode/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c index f3207e5..391d8ba 100644 --- a/arch/x86/realmode/init.c +++ b/arch/x86/realmode/init.c @@ -102,7 +102,7 @@ static void __init setup_real_mode(void) *trampoline_cr4_features = mmu_cr4_features; trampoline_header->flags = 0; - if (sme_me_mask) + if (sme_me_mask && !sev_active) trampoline_header->flags |= TH_FLAGS_SME_ENABLE; trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);