From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.67]) by mx.groups.io with SMTP id smtpd.web12.13279.1595945644591001936 for ; Tue, 28 Jul 2020 07:14:04 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=pzB9s2O2; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.223.67, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KapaZ0NduCoK+1y8W0PXNFdXaKW3OdYpT+DuHetVKR8mEqgHoojirB4IOL7vzqTXalDCsZRRJmzYpJiYq6p469ldtyWqjJeMy8ymz1p5OSSilYmkIgKAKk58xlY1/95OqMdrKGbrjVWidIN5NgjESOLI8T1yUli/jXm4xGvyzpxzAMDacsH0g8VyJrtUNR95BHXrd0I+xWVVTbmQNwMbZ09daGyFoFUqehjPZjxLaqDAIFannIi0UWPWZia5CIhG5kb7uYJtcC+qZtD4tPS0k1y1e9Yvnr/T9ErBz98i4ZheBRZ3NP52lLnxeTuYCreSTINT12q92/J+rmrfAFrOSw== 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=bbJWTYocTobqJLHTW5cpe2ZDgsIKthnAO4U0xKf4xjs=; b=fO38QFLfGeeE0JrrCi2LHHNwLuuRL3RuEUB/GYiZa6LuOhLjongO3mB0J4SGNyqbFv6AHpHQi0F58FLIt1cyR8hzqnEvafzwsKxgxAmqSHyIrf/Y81TuE7p9ruOaoQ44P2A7I9Q0VbcYbFvJ/hlwQepqmHc+mHU3ojF7NLi/kkKzECUspCoL6Tn/dlDoDFTBTJkKSFgTJpzPvvmFce+gHROUa/0RLDoiWQdYIItB61tE2x88clXjRzH0nraY3fMDO2o8yro5w8sSyaLEWYCPAnG7/QeWm0zYBJaAGHfa+C0Mju1E3YexyUnHooFEnzMKQIRx0FRDOoaBPb127kFcuQ== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bbJWTYocTobqJLHTW5cpe2ZDgsIKthnAO4U0xKf4xjs=; b=pzB9s2O2YowsegtjmaW5RFEu5WYJ7aOFehj+BdfUtLRwJoIZ4VtP4IZ4AxBfBfSJoXpoQtRXiMBlq4XY+ywGOCIJ7Bw851v81S+oT3GPETHtkR7cjWimJ4UqfMXj/NRAixWIbWGNoGwzpiaiaXILG7zdUwx5NBrzCEXQSdhvqko= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM6PR12MB3868.namprd12.prod.outlook.com (2603:10b6:5:1c8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Tue, 28 Jul 2020 14:14:01 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::25ec:e6ba:197c:4eb0]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::25ec:e6ba:197c:4eb0%8]) with mapi id 15.20.3216.034; Tue, 28 Jul 2020 14:14:01 +0000 Subject: Re: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction To: Laszlo Ersek , "Gao, Liming" , "devel@edk2.groups.io" CC: Brijesh Singh , Ard Biesheuvel , "Dong, Eric" , "Justen, Jordan L" , "Kinney, Michael D" , "Ni, Ray" References: <57cfa8bb-f683-08c4-7262-5762a9e0a4c1@amd.com> <1d539df5-142e-7ab1-faa6-0d0f6eea1608@redhat.com> From: "Lendacky, Thomas" Message-ID: <674ee9db-7295-cbab-19a3-495c1bcc0487@amd.com> Date: Tue, 28 Jul 2020 09:13:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <1d539df5-142e-7ab1-faa6-0d0f6eea1608@redhat.com> X-ClientProxiedBy: SN4PR0701CA0048.namprd07.prod.outlook.com (2603:10b6:803:2d::19) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.236.30.118] (165.204.77.1) by SN4PR0701CA0048.namprd07.prod.outlook.com (2603:10b6:803:2d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Tue, 28 Jul 2020 14:14:00 +0000 X-Originating-IP: [165.204.77.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 48195e7e-89e4-472c-b5b4-08d8330079b7 X-MS-TrafficTypeDiagnostic: DM6PR12MB3868: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d9bleG/pZWIiskTy08GiqpObc6MoIAvORrQGbu6/eGpRWYIKUcgT0FBvx/WNBYAlhoT7CZEEEXYm5kTtRbZHhGI64eQtj+HxdkF0W8mBR3/mcDn6MKzF5Q9ITLqavNToT5NO0DPXmdkRExGdBFfXJmfA3wPfFwauDg9g8icxvjoYa1EOVKQj6nQKmz3g0KJmIA56fT+uVVt3mbHJts++WyVGg5KgxufMPJB0jtEDSqAuH34+PI4oBY1EWsrDl9ptJ03Lvf+OuLGtzlLV1cWx3Qe28EsU5Hk/e/WVUZcENWIlVC1BMu90iIXzuFh1+hpKHj0QQoH1E3fZP4T40yBckcGAxDDEg5PSSE0RZHn3suVLTH21C+6wW0OQU6ygxDZn/5QTvcMpvIc2U9QZcXe5gQKz8FBmXWXYJDqBWq1ig1pVfZnGXA0HfrXV2dvebEOQxGAPATNgWWngBMnq7kwLuw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1355.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(136003)(39860400002)(376002)(346002)(366004)(31696002)(6486002)(5660300002)(19627235002)(54906003)(2616005)(86362001)(83080400001)(8676002)(8936002)(956004)(186003)(966005)(66946007)(30864003)(26005)(4326008)(66556008)(36756003)(110136005)(83380400001)(2906002)(16576012)(45080400002)(31686004)(53546011)(52116002)(16526019)(316002)(66476007)(478600001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: aV5cY4YeGOgFlYhgvxDadFV+m4stEBKSet1qMNrjt96D8VjEfLHHDp4ZjvvIjoTjKy4vtpxOjM6DEHA1B5knPCTG8t/xymbqxiYHqOkAXkJg7k04vMl/NQX5QU1/R7SWgYvgKw8UHGL5tD+7uufK8vybwQUZLIybqiuHdS/i+roGE3ixf4XxQn2Usgy3+s64kD7qWoBKFeonuWw8AC6RO23qJCz6HY6HBc2z0KgorR37kVIjz5KAnU/pa+qlIQ++gttT7N06hKjTXaf1FJjrqGVEEGCsRoObGT0HF4rA97qWgHIBsyyLSoWv6JU0g6Xe70wcIH49dJI5V53rwAc5BEj28uzcl7EkzWMqZYr3xB2RcoktXV7Z5Qj7SD6oUICiPCU5YPV9BN+WOdLx3uc1Tise0ujJftlWlcvv3JuC3LUpcFZsaR9dijFftHyC+qnZSSdSiue8CzHhQJlUl6oypbKSDs0wdFuRUsjrAZyEQyE= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48195e7e-89e4-472c-b5b4-08d8330079b7 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2020 14:14:01.0213 (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: ITypR4WImAD1jNQnj7FwCt8eLn31DnWa5XcuCR1jFdgh3au1Bom2aS14vm0xVWM12nsJOZgBOGmStX3zNIRt8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3868 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 7/28/20 7:04 AM, Laszlo Ersek wrote: > On 07/28/20 09:39, Gao, Liming wrote: >> This error is reported from nasm compiler. My nasm compiler version is >> 2.11.08. It may be a little old. 2.12 should be fine. I have 2.13.02. >> >> This change also requires to update >> edk2\BaseTools\Conf\tools_def.template and mention nasm compiler >> version. >=20 > "tools_def.template" says: >=20 > NASM 2.10 or later for use with the GCC toolchain family >=20 > Bumping the NASM requirement from 2.10 to 2.12 will rule out: >=20 > - Debian "jessie" (oldoldstable), > - Ubuntu "xenial" (16.04 LTS), > - and RHEL7, >=20 > as build hosts. >=20 > Debian "jessie" is no longer supported (LTS ended in June 2020), but > Ubuntu "xenial" and RHEL7 are still supported by their vendors. >=20 > I seem to recall that it was me to recommend "BITS 64" in front of "rep > vmmcall" in the IA32 NASM source file: >=20 > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk= 2.groups.io%2Fg%2Fdevel%2Fmessage%2F48292&data=3D02%7C01%7Cthomas.lenda= cky%40amd.com%7Ca8b0f66286b745e78b1d08d832ee6f95%7C3dd8961fe4884e608e11a82d= 994e183d%7C0%7C0%7C637315346944536242&sdata=3D4DBhHd2WYgoEx%2F76YaNRalJ= lSvd0rAIWxrN1qOFR9Tw%3D&reserved=3D0 > https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fmid.= mail-archive.com%2Fe8a8e21e-4045-1b2b-f959-13fbe00132d9%40redhat.com&da= ta=3D02%7C01%7Cthomas.lendacky%40amd.com%7Ca8b0f66286b745e78b1d08d832ee6f95= %7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637315346944536242&sdata= =3DAV5lDCYWOm2cTOzlaI7OwMjcK9TknVGBNFAkNJhahuM%3D&reserved=3D0 >=20 > I don't understand why my testing worked back then, and now it doesn't. > (IOW, I can also reproduce the error that Liming reported!) It's likely > because I didn't specify the elf32 output format back then. >=20 > Indeed: the following command fails: >=20 >> "nasm" \ >> -I"$WORKSPACE"/MdePkg/Library/BaseLib/Ia32/ \ >> -I"$WORKSPACE"/MdePkg/Library/BaseLib/Ia32/ \ >> -I"$WORKSPACE"/MdePkg/Library/BaseLib/ \ >> -I"$WORKSPACE"/Build/OvmfIa32/NOOPT_GCC48/IA32/MdePkg/Library/BaseLib/= BaseLib/DEBUG/ \ >> -I"$WORKSPACE"/MdePkg/ \ >> -I"$WORKSPACE"/MdePkg/Include/ \ >> -I"$WORKSPACE"/MdePkg/Test/UnitTest/Include/ \ >> -I"$WORKSPACE"/MdePkg/Include/Ia32/ \ >> -f elf32 \ >> -o "$WORKSPACE"/Build/OvmfIa32/NOOPT_GCC48/IA32/MdePkg/Library/BaseLib= /BaseLib/OUTPUT/Ia32/VmgExit.obj \ >> "$WORKSPACE"/Build/OvmfIa32/NOOPT_GCC48/IA32/MdePkg/Library/BaseLib/Ba= seLib/OUTPUT/Ia32/VmgExit.iii >=20 > but if I remove "-f elf32", it completes fine. :( With version 2.13.02, I can successfully build with '-f elf32', so it seems to be version related. >=20 > The AMD manual says about VMGEXIT: >=20 >> The VMGEXIT opcode is only valid within a guest when run with SEV-ES >> mode active. If the guest is not run with SEV-ES mode active, the >> VMGEXIT opcode will be treated as a VMMCALL opcode and will behave >> exactly like a VMMCALL. >=20 > VMGEXIT is a SEV-ES-only form of guest-host communication. SEV-ES mode > depends on SEV. A SEV guest can only interact with the host (=3D decrypt > its pages for the host to access) if the guest is executing in long > mode. >=20 > So does it even make sense to *attempt* implementing AsmVmgExit() > "correctly" for IA32? We are only enabling SEV-ES support for X64, so this is a valid point. It would be very hard to enable the Ia32X64 combination (because of how long it takes to get into long mode) and impossible for the Ia32 alone. >=20 > I don't want to complicate the build dependencies in this series > further, so I won't suggest that we simply *not* implement AsmVmgExit() > for IA32 at all. (Purely from a BaseLib perspective, this would be a > valid approach, but then call sites would have to be *build-time* > restricted to X64 too. The call sites *are* already restricted to X64, > AIUI, but that happens at runtime (=3D dynamic checks), not at build > time.) >=20 > So here's what I suggest: implement AsmVmgExit() for IA32 in the C > language, namely as a call to CpuBreakpoint(). IIUC, create a VmgExit.c file in MdePkg/Library/BaseLib/Ia32/ that doesn't actually encode the VMGEXIT instruction, just calls CpuBreakpoint(), e.g.: VOID EFIAPI AsmVmgExit ( VOID ) { CpuBreakpoint(); } The other alternative is to use a DB-encoded instruction, though I know that isn't the most popular approach. The BITS 64 method to generate the instruction bytes is also used in OvmfPkg/ResetVector/Ia32/PageTables64.asm, but that file is only included when ARCH_X64 is defined, so there shouldn't be an issue there, plus the nasm file format is bin (-f bin). Thanks, Tom >=20 > I wouldn't like to tighten the NASM version requirement for *all* of > edk2, for the sake of building a BaseLib primitive for IA32 that we > never *call* on IA32. >=20 > Thanks, > Laszlo >=20 >> >> Thanks >> Liming >> -----Original Message----- >> From: Tom Lendacky >> Sent: 2020t7=0828=C3=A5 12:08 >> To: Gao, Liming ; devel@edk2.groups.io >> Cc: Brijesh Singh ; Ard Biesheuvel ; Dong, Eric ; Justen, Jordan L ; Laszlo Ersek ; Kinney, Michael D ; Ni, Ray >> Subject: Re: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEX= IT instruction >> >> On 7/27/20 8:34 PM, Gao, Liming wrote: >>> Tom: >> >> Hi Liming, >> >>> I meet with GCC failure on this patch. Can you help check it? If nas= m doesn't support the vmmcall instruction in 32-bit mode, you have to use i= nline assembly to support it. >> >> What version of GCC are you using. I was able to successfully build the >> Ia32 version with my GCC level. The Ia32 version uses a trick to do swit= ch to 64-bit just to encode the instruction. Looks like that doesn't work w= ith your version of GCC. >> >> I can probably switch to defining the instruction as bytes. Let me look = into that and possibly send you a patch to test. >> >> Thanks, >> Tom >> >>> >>> Edk2/Build/IntelFsp2Pkg/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib >>> /OUTPUT/Ia32/VmgExit.iii:33: error: elf32 output format does not >>> support 64-bit code >>> GNUmakefile:741: recipe for target >>> >>> Thanks >>> Liming >>> -----Original Message----- >>> From: Tom Lendacky >>> Sent: 2020t7=0827=C3=A5 23:26 >>> To: devel@edk2.groups.io >>> Cc: Brijesh Singh ; Ard Biesheuvel >>> ; Dong, Eric ; Justen, >>> Jordan L ; Laszlo Ersek >>> ; Gao, Liming ; Kinney, >>> Michael D ; Ni, Ray >>> Subject: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT >>> instruction >>> >>> From: Tom Lendacky >>> >>> BZ: >>> https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbug= z >>> illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198&data=3D02%7C01%7Cthom= a >>> s.lendacky%40amd.com%7C77c8250cd9e14f2929a008d832965726%7C3dd8961fe488 >>> 4e608e11a82d994e183d%7C0%7C0%7C637314968570901400&sdata=3D6zqseI3tV= m >>> aw351w9mfEymMnDcjDzjvcBrhARU6r3Ho%3D&reserved=3D0 >>> >>> VMGEXIT is a new instruction used for Hypervisor/Guest communication wh= en running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) = to occur, resulting in a #VMEXIT with an exit code value of 0x403. >>> >>> Provide the necessary support to execute the VMGEXIT instruction, which= is "rep; vmmcall". >>> >>> Cc: Michael D Kinney >>> Cc: Liming Gao >>> Signed-off-by: Tom Lendacky >>> --- >>> MdePkg/Library/BaseLib/BaseLib.inf | 2 ++ >>> MdePkg/Include/Library/BaseLib.h | 14 +++++++++ >>> MdePkg/Library/BaseLib/Ia32/VmgExit.nasm | 37 +++++++++++++++++++++++= + MdePkg/Library/BaseLib/X64/VmgExit.nasm | 32 ++++++++++++++++++++ >>> 4 files changed, 85 insertions(+) >>> create mode 100644 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm >>> create mode 100644 MdePkg/Library/BaseLib/X64/VmgExit.nasm >>> >>> diff --git a/MdePkg/Library/BaseLib/BaseLib.inf >>> b/MdePkg/Library/BaseLib/BaseLib.inf >>> index 3b93b5db8d24..3b85c56c3c03 100644 >>> --- a/MdePkg/Library/BaseLib/BaseLib.inf >>> +++ b/MdePkg/Library/BaseLib/BaseLib.inf >>> @@ -184,6 +184,7 @@ [Sources.Ia32] >>> Ia32/DisableCache.nasm| GCC >>> Ia32/RdRand.nasm >>> Ia32/XGetBv.nasm >>> + Ia32/VmgExit.nasm >>> >>> Ia32/DivS64x64Remainder.c >>> Ia32/InternalSwitchStack.c | MSFT >>> @@ -317,6 +318,7 @@ [Sources.X64] >>> X64/DisablePaging64.nasm >>> X64/RdRand.nasm >>> X64/XGetBv.nasm >>> + X64/VmgExit.nasm >>> ChkStkGcc.c | GCC >>> >>> [Sources.EBC] >>> diff --git a/MdePkg/Include/Library/BaseLib.h >>> b/MdePkg/Include/Library/BaseLib.h >>> index 7edf0051a0a0..04fb329eaabb 100644 >>> --- a/MdePkg/Include/Library/BaseLib.h >>> +++ b/MdePkg/Include/Library/BaseLib.h >>> @@ -7848,6 +7848,20 @@ AsmXGetBv ( >>> ); >>> >>> >>> +/** >>> + Executes a VMGEXIT instruction (VMMCALL with a REP prefix) >>> + >>> + Executes a VMGEXIT instruction. This function is only available on >>> + IA-32 and x64. >>> + >>> +**/ >>> +VOID >>> +EFIAPI >>> +AsmVmgExit ( >>> + VOID >>> + ); >>> + >>> + >>> /** >>> Patch the immediate operand of an IA32 or X64 instruction such that= the byte, >>> word, dword or qword operand is encoded at the end of the >>> instruction's diff --git a/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm >>> b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm >>> new file mode 100644 >>> index 000000000000..a4b37385cc7a >>> --- /dev/null >>> +++ b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm >>> @@ -0,0 +1,37 @@ >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> +; >>> +; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights >>> +reserved.
; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; >>> +Module >>> +Name: >>> +; >>> +; VmgExit.Asm >>> +; >>> +; Abstract: >>> +; >>> +; AsmVmgExit function >>> +; >>> +; Notes: >>> +; >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> + >>> + SECTION .text >>> + >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> +; VOID >>> +; EFIAPI >>> +; AsmVmgExit ( >>> +; VOID >>> +; ); >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> +global ASM_PFX(AsmVmgExit) >>> +ASM_PFX(AsmVmgExit): >>> +; >>> +; NASM doesn't support the vmmcall instruction in 32-bit mode, so >>> +work around ; this by temporarily switching to 64-bit mode. >>> +; >>> +BITS 64 >>> + rep vmmcall >>> +BITS 32 >>> + ret >>> + >>> diff --git a/MdePkg/Library/BaseLib/X64/VmgExit.nasm >>> b/MdePkg/Library/BaseLib/X64/VmgExit.nasm >>> new file mode 100644 >>> index 000000000000..26f034593c67 >>> --- /dev/null >>> +++ b/MdePkg/Library/BaseLib/X64/VmgExit.nasm >>> @@ -0,0 +1,32 @@ >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> +; >>> +; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights >>> +reserved.
; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; >>> +Module >>> +Name: >>> +; >>> +; VmgExit.Asm >>> +; >>> +; Abstract: >>> +; >>> +; AsmVmgExit function >>> +; >>> +; Notes: >>> +; >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> + >>> + DEFAULT REL >>> + SECTION .text >>> + >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> +; VOID >>> +; EFIAPI >>> +; AsmVmgExit ( >>> +; VOID >>> +; ); >>> +;-------------------------------------------------------------------- >>> +-- >>> +-------- >>> +global ASM_PFX(AsmVmgExit) >>> +ASM_PFX(AsmVmgExit): >>> + rep vmmcall >>> + ret >>> + >>> -- >>> 2.27.0 >>> >> >=20