From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.71]) by mx.groups.io with SMTP id smtpd.web08.69841.1629381833646601298 for ; Thu, 19 Aug 2021 07:03:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=hQdj3C6y; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.93.71, mailfrom: ashish.kalra@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mg0jiPJJPmPNQNSF5HZSH3vyEQtQJvN/24UfQyEzXTCNKCAkDEwmxlqBDvkFsA8GTNb18mEQDQa+oJNoCEilQOUUiAf8vVrkKNCLm5aETjrR5RkK8d6lWnoeZmdu4VYtABbPHBrHQbmdvJ9bE+fXxN0v9ApBq+lDPr2MO9JGBQSQtDZWU1LHo6uqyXXKFZJsUzRhuNK/tlQ/KcJienpAB6grZf0GG1PniB3geat0fjvd84NO0GYPYxeJ3gk3G5s35jKxg7T1rY++lH/cGN+RdRu8stBJ47qTYnO7ZLm1xm/Hu3icshSaPbqI1wBfXKvGKdK4YJ3+KGfxsabE4UrH9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1PJinaNnsxDYmUAWRLURAqlfJCQQP6sbkA4/f3fxxME=; b=Qc0mIfaSngAEp1Hnp6Xfx0MtItp9eMms0ZNOufJwWGQS2asQSlvnJYxW8lqlr9ZFxUyRJK3O3aGmDH+xoDmMxFxpMS0bM5jxete5adeyfVIciu3xVzIm29qh5/XFctG12dlyfW2HN1A/Kzs0Ymp8MmE3xtwGN6psR1DI6l9bC82Vs7qiR24Pri174WqON9eYljd05gQM2r96h0xCCMIhEatSIsIvJiA9cBYdHtkil/O0exJ5oXRuKzTOuFkcoUUdnjza3LjpK4BodGkjeCHt5vjmAcJihVFMXhsC18fkrV1S7K4gKIjLOl8gjCpdQxE+IajC6Chkfxpucw0Z7Eulaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1PJinaNnsxDYmUAWRLURAqlfJCQQP6sbkA4/f3fxxME=; b=hQdj3C6ykcM/xsQ7IjKZ792LQQCQcd/OSrwG3HxmNC++9ELLvjp/uVbX2JPcMQp+ScXa/6a65iiOA0rSt7JX7xI6i8UUtnGVlLsP1WtXAY+JX1LaM1qbFEobJrRn7v7jXnS8AODHiP/MtLNMqouNYFee4iCTgUhZPM8alEp0O4A= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) by SA0PR12MB4512.namprd12.prod.outlook.com (2603:10b6:806:71::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Thu, 19 Aug 2021 14:03:52 +0000 Received: from SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::491e:2642:bae2:8b73]) by SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::491e:2642:bae2:8b73%7]) with mapi id 15.20.4415.024; Thu, 19 Aug 2021 14:03:52 +0000 From: "Ashish Kalra" To: devel@edk2.groups.io Cc: dovmurik@linux.vnet.ibm.com, brijesh.singh@amd.com, tobin@ibm.com, Thomas.Lendacky@amd.com, jejb@linux.ibm.com, erdemaktas@google.com, jiewen.yao@intel.com, min.m.xu@intel.com, jordan.l.justen@intel.com, ard.biesheuvel@arm.com Subject: [PATCH v7 1/6] OvmfPkg/BaseMemEncryptLib: Detect SEV live migration feature. Date: Thu, 19 Aug 2021 14:03:41 +0000 Message-Id: <13ca7f08816f8aca6cd015879282249415eae79d.1629380011.git.ashish.kalra@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: SA9PR13CA0025.namprd13.prod.outlook.com (2603:10b6:806:21::30) To SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) Return-Path: Ashish.Kalra@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ashkalra_ubuntu_server.amd.com (165.204.77.1) by SA9PR13CA0025.namprd13.prod.outlook.com (2603:10b6:806:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.5 via Frontend Transport; Thu, 19 Aug 2021 14:03:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24425d6c-5440-4c4d-2693-08d9631a2c73 X-MS-TrafficTypeDiagnostic: SA0PR12MB4512: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 61HStdKoqRLeum8dW8m1jMtYgyuh7BjSrfGz8Xb622McBJi3XTlVScCLuVeuYDN0DHY7jScRyf/IMxrpX4MdnOzrssYVEMNwIM9uz+IoXUO0vZSmAPutit2dzGpbBYDXjRgpA8jJadYwZC1hZHsm8mslnExYC2jM20a0viBYhPMn7hn3d/GFg2u3SpgQImTVM3Bg6RMsEy/u/bLIbiDe8zP+RPEHUmvrj1tMOuLiJpuAbi7BFPBHLhE5KKVJREQSEZNVUpNPRKH1VjMIKjhreN1rk6Ch8rofi4DNjDcYWbltfvrERDOBWJdFIXyK0HOjO/R+RFoLI6EfVK4ODVLDgULX6LYJi2W5kNx7VaCSxKmBXA/zSneTOOarmOxHQL7VkZmOBAYniTQEzoAW6M6D3Nu+nNvAQypXTk+NWzmd0EgMfAAnXsEoJXsXR1EofANFqm5IENDkYF2zmywyzuq4k+vVLoIKKCARP/c6LEd6yZkhPiq2cEUN59MpPzad8gs/dCMCpIT9bj//TfjXkeIUqCQBJ1YC/UK/5UrVI6Kgg89lPjyJrJ0+/gND7aVDzpYsCp805Jb4QG2kjWvyMP1yTpb8BzGS1n3nFSfB7WzklGCRynkZURfB1/VT1pOrve2OCIyfe5yFKHPX7hdy2QlV3hyv36QX0eQzXzeCO/TLFdajAAGCB2W3SGVZ9tAsQ1yYih5OMf36N7XDjLYEladP5A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2767.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(346002)(136003)(366004)(39860400002)(376002)(6486002)(316002)(52116002)(186003)(38100700002)(66476007)(36756003)(86362001)(66946007)(2616005)(7696005)(83380400001)(38350700002)(66556008)(26005)(956004)(8936002)(6666004)(2906002)(4326008)(5660300002)(6916009)(8676002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PbeJlVn7f/Yu22h7o2L1+g2RO9gYmtVV8Gp/QLHc7evBicP5eaLfc8b6GATL?= =?us-ascii?Q?LDZeuk2BThXsVREtSQJx7SMCRdZHEW+Vv/ZR7kvK2UQGhTgWRbCYFTHpadaU?= =?us-ascii?Q?qBJPvd+F1CNSHow6o3CX/9+XrIAefK80kHXVC33g41lwDxKGrqQL4j5/CzQo?= =?us-ascii?Q?Sb/flyA0usDrPKFDXrAv5a7qIOP5nJyV1A2/SoeD/3sOu9e4Qy11XiOu0IV2?= =?us-ascii?Q?FG9x8xmXhMIHx6fCK4CLNKPbJjPqzUmh2NisikSWMXolJiLmREp4nzWmNgQM?= =?us-ascii?Q?Q6yr56CY5KxZAuCZ4ZBg8pk2LdzDOe99P4ReXiXyBQ/vyGDyjpNbQVeUplUy?= =?us-ascii?Q?TzGIf14yzwwn7YWmsprZCsmIq9Q0cA8wU4+gNhin/FQIbUju9sUzjfcRoP30?= =?us-ascii?Q?E6rdgVCu42Lh5An3UOnNGrt8kag0lK7TU5k1LVOXyogqdjDND218V/fmS4Av?= =?us-ascii?Q?QxW/oW421RzpeZSzGytcWbGlw8NrveB34tJ2xczIGR5/1nLL/YT+83tuIGYv?= =?us-ascii?Q?w/+d3fxAeoXwMYXAAGCiOotFXw1nmSXc//wWBco410KD0VoSNPC0QFTc4cIA?= =?us-ascii?Q?S9BKb4YYZVc5EP0XROgx9YSkw3gmHxTTH9NHSYjXr6ySg/ad/4HJM4tNKbjg?= =?us-ascii?Q?Qi62wgCzL3hcQf9SqO2bgibkLjUi/LnoVjSDWHNaogxrGMihK69ack5RXQg6?= =?us-ascii?Q?cpH/U0ZtxSLLVBJX1GnWJ7PuDhXOE/NCfXMKzvScBdoi9wCFLWPzRI1ViGfF?= =?us-ascii?Q?bUt6Qtz4heSMDlLNmS3zeHrq3af5xPYGjue/GY8uFWwPqs0zxAfwhqRDF2mE?= =?us-ascii?Q?NO0RsNL3X0RdoMmoo7+/c6wbCOwm8lhmwyPEhVbq/P+Sieyeayv/effIG1Az?= =?us-ascii?Q?9lIO6ZtvV5dKuJbmAt5gj30OqzEGe5exPYY0t1nuKrgF17fQjdxLN9mIeGQP?= =?us-ascii?Q?VMIF1MClsYNv6sQvA+h5SnovEnmNkKjs2908QNxrRm4YZJAwUISvh/3P4qF/?= =?us-ascii?Q?UnjhjUY2kOUymBFaizD1HMGlVnzaR4hx9pyHWmVrR21S6abMSXtVh49GJS9e?= =?us-ascii?Q?bZIgpArPEcS5pShvfS5KUQR5fWni8AhuJu9wSXnHCY+BSpsfEzcMqss+iwj2?= =?us-ascii?Q?vPf343Z73aw0Uk4h3+NjE/lS6Iol0M7Mt7TV1qbEhpC6VT1JCTNbhaUd3kh+?= =?us-ascii?Q?6d4LeVqJv3ZxvO4aTITciqC17rEwxtyWQL8Mux1YvLOD32e9GXWNYpJ4R1yM?= =?us-ascii?Q?REslK+aN4FEaKcH4qxdliqYwAd2cKGUL8r9P2e4IjqWIXQ+nqboACev9+BLB?= =?us-ascii?Q?LaU9PZjB8vSS+PlX7kY9rWbF?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24425d6c-5440-4c4d-2693-08d9631a2c73 X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2767.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2021 14:03:51.8827 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KHdyA+Nl/SdDI9vXy3QcaHE9WuLEymlWNRSgA4N6GxUTf7BSpfEdupMdDuh6nqNVgKJwkVQ6R+EKFqsNarYiSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4512 Content-Type: text/plain From: Ashish Kalra Add support to check if we are running inside KVM HVM and KVM HVM supports SEV Live Migration feature. Cc: Jordan Justen Cc: Ard Biesheuvel Signed-off-by: Ashish Kalra --- OvmfPkg/Include/Library/MemEncryptSevLib.h | 12 +++++ OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c | 41 ++++++++++++++ OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c | 57 ++++++++++++++++++++ OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.h | 31 +++++++++++ OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c | 41 ++++++++++++++ OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | 18 +++++++ 6 files changed, 200 insertions(+) diff --git a/OvmfPkg/Include/Library/MemEncryptSevLib.h b/OvmfPkg/Include/Library/MemEncryptSevLib.h index 76d06c206c..b619cadf51 100644 --- a/OvmfPkg/Include/Library/MemEncryptSevLib.h +++ b/OvmfPkg/Include/Library/MemEncryptSevLib.h @@ -90,6 +90,18 @@ MemEncryptSevIsEnabled ( VOID ); +/** + Returns a boolean to indicate whether SEV live migration is enabled. + + @retval TRUE SEV live migration is enabled + @retval FALSE SEV live migration is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevLiveMigrationIsEnabled ( + VOID + ); + /** This function clears memory encryption bit for the memory region specified by BaseAddress and NumPages from the current page table context. diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c index 2816f859a0..1a99d38866 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c @@ -17,9 +17,13 @@ #include #include +#include "PeiDxeMemEncryptSevLibInternal.h" + STATIC BOOLEAN mSevStatus = FALSE; STATIC BOOLEAN mSevEsStatus = FALSE; STATIC BOOLEAN mSevStatusChecked = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatus = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatusChecked = FALSE; STATIC UINT64 mSevEncryptionMask = 0; STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE; @@ -87,6 +91,24 @@ InternalMemEncryptSevStatus ( mSevStatusChecked = TRUE; } +/** + Figures out if we are running inside KVM HVM and + KVM HVM supports SEV Live Migration feature. +**/ +STATIC +VOID +EFIAPI +InternalDetectSevLiveMigrationFeature ( + VOID + ) +{ + if (KvmDetectSevLiveMigrationFeature ()) { + mSevLiveMigrationStatus = TRUE; + } + + mSevLiveMigrationStatusChecked = TRUE; +} + /** Returns a boolean to indicate whether SEV-ES is enabled. @@ -125,6 +147,25 @@ MemEncryptSevIsEnabled ( return mSevStatus; } +/** + Returns a boolean to indicate whether SEV live migration is enabled. + + @retval TRUE SEV live migration is enabled + @retval FALSE SEV live migration is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevLiveMigrationIsEnabled ( + VOID + ) +{ + if (!mSevLiveMigrationStatusChecked) { + InternalDetectSevLiveMigrationFeature (); + } + + return mSevLiveMigrationStatus; +} + /** Returns the SEV encryption mask. diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c index b4a9f464e2..30f2d90889 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c @@ -16,6 +16,8 @@ #include #include +#include "PeiDxeMemEncryptSevLibInternal.h" + /** Locate the page range that covers the initial (pre-SMBASE-relocation) SMRAM Save State Map. @@ -61,3 +63,58 @@ MemEncryptSevLocateInitialSmramSaveStateMapPages ( return RETURN_SUCCESS; } + +/** + Figures out if we are running inside KVM HVM and + KVM HVM supports SEV Live Migration feature. + + @retval TRUE SEV live migration is supported. + @retval FALSE SEV live migration is not supported. +**/ +BOOLEAN +EFIAPI +KvmDetectSevLiveMigrationFeature ( + VOID + ) +{ + CHAR8 Signature[13]; + UINT32 mKvmLeaf; + UINT32 RegEax; + UINT32 RegEbx; + UINT32 RegEcx; + UINT32 RegEdx; + + Signature[12] = '\0'; + for (mKvmLeaf = 0x40000000; mKvmLeaf < 0x40010000; mKvmLeaf += 0x100) { + AsmCpuid ( + mKvmLeaf, + NULL, + (UINT32 *) &Signature[0], + (UINT32 *) &Signature[4], + (UINT32 *) &Signature[8]); + + if (AsciiStrCmp (Signature, "KVMKVMKVM") == 0) { + DEBUG (( + DEBUG_INFO, + "%a: KVM Detected, signature = %a\n", + __FUNCTION__, + Signature + )); + + RegEax = mKvmLeaf + 1; + RegEcx = 0; + AsmCpuid (mKvmLeaf + 1, &RegEax, &RegEbx, &RegEcx, &RegEdx); + if ((RegEax & KVM_FEATURE_MIGRATION_CONTROL) != 0) { + DEBUG (( + DEBUG_INFO, + "%a: SEV Live Migration feature supported\n", + __FUNCTION__ + )); + + return TRUE; + } + } + } + + return FALSE; +} diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.h b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.h new file mode 100644 index 0000000000..30cf5de995 --- /dev/null +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.h @@ -0,0 +1,31 @@ +/** @file + + Secure Encrypted Virtualization (SEV) library helper function + + Copyright (c) 2021, AMD Incorporated. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef PEI_DXE_MEM_ENCRYPT_SEV_LIB_INTERNAL_H_ +#define PEI_DXE_MEM_ENCRYPT_SEV_LIB_INTERNAL_H_ + +#include + +#define KVM_FEATURE_MIGRATION_CONTROL BIT17 + +/** + Figures out if we are running inside KVM HVM and + KVM HVM supports SEV Live Migration feature. + + @retval TRUE SEV live migration is supported. + @retval FALSE SEV live migration is not supported. +**/ +BOOLEAN +EFIAPI +KvmDetectSevLiveMigrationFeature( + VOID + ); + +#endif // PEI_DXE_MEM_ENCRYPT_SEV_LIB_INTERNAL_H_ diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c index e2fd109d12..9293b5652d 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c @@ -17,9 +17,13 @@ #include #include +#include "PeiDxeMemEncryptSevLibInternal.h" + STATIC BOOLEAN mSevStatus = FALSE; STATIC BOOLEAN mSevEsStatus = FALSE; STATIC BOOLEAN mSevStatusChecked = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatus = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatusChecked = FALSE; STATIC UINT64 mSevEncryptionMask = 0; STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE; @@ -87,6 +91,24 @@ InternalMemEncryptSevStatus ( mSevStatusChecked = TRUE; } +/** + Figures out if we are running inside KVM HVM and + KVM HVM supports SEV Live Migration feature. +**/ +STATIC +VOID +EFIAPI +InternalDetectSevLiveMigrationFeature ( + VOID + ) +{ + if (KvmDetectSevLiveMigrationFeature ()) { + mSevLiveMigrationStatus = TRUE; + } + + mSevLiveMigrationStatusChecked = TRUE; +} + /** Returns a boolean to indicate whether SEV-ES is enabled. @@ -125,6 +147,25 @@ MemEncryptSevIsEnabled ( return mSevStatus; } +/** + Returns a boolean to indicate whether SEV live migration is enabled. + + @retval TRUE SEV live migration is enabled + @retval FALSE SEV live migration is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevLiveMigrationIsEnabled ( + VOID + ) +{ + if (!mSevLiveMigrationStatusChecked) { + InternalDetectSevLiveMigrationFeature (); + } + + return mSevLiveMigrationStatus; +} + /** Returns the SEV encryption mask. diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c index 56d8f3f318..d9f7befcd2 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c @@ -100,6 +100,24 @@ MemEncryptSevIsEnabled ( return Msr.Bits.SevBit ? TRUE : FALSE; } +/** + Returns a boolean to indicate whether SEV live migration is enabled. + + @retval TRUE SEV live migration is enabled + @retval FALSE SEV live migration is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevLiveMigrationIsEnabled ( + VOID + ) +{ + // + // Not used in SEC phase. + // + return FALSE; +} + /** Returns the SEV encryption mask. -- 2.17.1