From nobody Wed May 15 11:46:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67356+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67356+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1605159141; cv=none; d=zohomail.com; s=zohoarc; b=mkwj+EnHC/QaiF2cjDAsqKcGblq9hTiql6CIBGaTx3Z17eeSJDIL9v5FoZxTFqbb7bGD1HooyBkWIgcu4LRqlkUrM9ANFedzvjDGacHu4z4BbnthDvWRAAxRCbSkpj6rk+Z+ccbAdd7wrJ2BfbxrXJQog4uH2sslBO7R8eX9fKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605159141; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=7Rq6Aumj6lill365tbszPWaYXYoYRx1awREPdBYKRQ8=; b=Q2FpGrALyiwYJjf0f4QVQgeqqRg4FQ4hBKIbkYcYECujZkxzN/aX0yfH3pXNfYeXlkJSlbdpxT9n5N+QY/ab/o9Vr1OTD1Cvp+ilWv3MjOGSX95YOHZArv3q6CRTllm/cI2TzGw7JZ2Gp7T3YurVIiFRUKd9eqfviXME0SQs86c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67356+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1605159141891426.84513000039533; Wed, 11 Nov 2020 21:32:21 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id SmILYY1788612xT8NA5O2c6F; Wed, 11 Nov 2020 21:32:21 -0800 X-Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by mx.groups.io with SMTP id smtpd.web10.355.1605159136138034606 for ; Wed, 11 Nov 2020 21:32:16 -0800 X-Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kd5DT-005NVn-9r; Wed, 11 Nov 2020 22:32:15 -0700 X-Received: from mta5.zcs.xmission.com ([166.70.13.69]) by in02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kd5DR-00HAXK-6M; Wed, 11 Nov 2020 22:32:14 -0700 X-Received: from localhost (localhost [127.0.0.1]) by mta5.zcs.xmission.com (Postfix) with ESMTP id EADB21280B27; Wed, 11 Nov 2020 22:32:12 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta5.zcs.xmission.com X-Received: from mta5.zcs.xmission.com ([127.0.0.1]) by localhost (mta5.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JT5tFyC3jYXb; Wed, 11 Nov 2020 22:32:12 -0700 (MST) X-Received: from photon.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta5.zcs.xmission.com (Postfix) with ESMTPSA id A6A2A1280B66; Wed, 11 Nov 2020 22:32:12 -0700 (MST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Peter Grehan Date: Wed, 11 Nov 2020 22:31:52 -0700 Message-Id: <20201112053153.22038-2-rebecca@bsdio.com> In-Reply-To: <20201112053153.22038-1-rebecca@bsdio.com> References: <20201112053153.22038-1-rebecca@bsdio.com> MIME-Version: 1.0 X-XM-SPF: eid=1kd5DR-00HAXK-6M;;;mid=<20201112053153.22038-2-rebecca@bsdio.com>;;;hst=in02.mta.xmission.com;;;ip=166.70.13.69;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.69 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa01.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,FVGT_m_MULTI_ODD,LotsOfNums_01,T_TooManySym_01, XMSubLong autolearn=disabled version=3.4.2 X-Spam-Virus: No X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * 1.2 LotsOfNums_01 BODY: Lots of long strings of numbers * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa01 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.4 FVGT_m_MULTI_ODD Contains multiple odd letter combinations X-Spam-DCC: XMission; sa01 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;devel@edk2.groups.io X-Spam-Relay-Country: X-Spam-Timing: total 1650 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 4.4 (0.3%), b_tie_ro: 3.0 (0.2%), parse: 1.75 (0.1%), extract_message_metadata: 13 (0.8%), get_uri_detail_list: 3.5 (0.2%), tests_pri_-1000: 10 (0.6%), tests_pri_-950: 0.98 (0.1%), tests_pri_-900: 0.78 (0.0%), tests_pri_-90: 98 (5.9%), check_bayes: 94 (5.7%), b_tokenize: 14 (0.8%), b_tok_get_all: 14 (0.9%), b_comp_prob: 3.3 (0.2%), b_tok_touch_all: 60 (3.6%), b_finish: 0.82 (0.0%), tests_pri_0: 1507 (91.3%), check_dkim_signature: 0.53 (0.0%), check_dkim_adsp: 3.0 (0.2%), poll_dns_idle: 1.34 (0.1%), tests_pri_10: 2.9 (0.2%), tests_pri_500: 8 (0.5%), rewrite_mail: 0.00 (0.0%) Subject: [edk2-devel] [PATCH v2 1/2] OvmfPkg/Bhyve: detach ResetVector from before the SEV-ES changes X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@bsdio.com X-Gm-Message-State: CQbzqLd2Fcuhcupq19yG1GJIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1605159141; bh=owF7/5phV7tNUL7Aj6ejukeoNDhKqUIaWVdsmbC6hp4=; h=Cc:Date:From:Reply-To:Subject:To; b=K2RvxSLTubxtCA35TwhGBlHyR0wHtfnWGtRCT6Mwpx1FC96WsWC8DAAvOr+vEPYfRRw 8SoCDxfluU7Zb+rXCNsl7VsSfivhcNBa9pQP5LKAEK2zG5tHhOATBAJliGG/MbVMaQwTn QGSTN2XYnuO235ZCP1gwsmJ+D0HIrVxl22A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Commits 6995a1b79bab, 8a2732186a53 and 30937f2f98c4 modified all four regular files under "OvmfPkg/ResetVector" with SEV-ES dependencies. These are not relevant for Bhyve. Detach the pre-SEV-ES version of ResetVector for Bhyve. Signed-off-by: Rebecca Cran Acked-by: Peter Grehan Reviewed-by: Laszlo Ersek --- OvmfPkg/Bhyve/ResetVector/ResetVector.inf | 38 +++++ .../Bhyve/ResetVector/Ia32/PageTables64.asm | 149 ++++++++++++++++++ OvmfPkg/Bhyve/ResetVector/ResetVector.nasmb | 68 ++++++++ 3 files changed, 255 insertions(+) create mode 100644 OvmfPkg/Bhyve/ResetVector/ResetVector.inf create mode 100644 OvmfPkg/Bhyve/ResetVector/Ia32/PageTables64.asm create mode 100644 OvmfPkg/Bhyve/ResetVector/ResetVector.nasmb diff --git a/OvmfPkg/Bhyve/ResetVector/ResetVector.inf b/OvmfPkg/Bhyve/Rese= tVector/ResetVector.inf new file mode 100644 index 000000000000..772dda540490 --- /dev/null +++ b/OvmfPkg/Bhyve/ResetVector/ResetVector.inf @@ -0,0 +1,38 @@ +## @file +# Reset Vector +# +# Copyright (c) 2020, Rebecca Cran +# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 1.29 + BASE_NAME =3D ResetVector + FILE_GUID =3D 1BA0062E-C779-4582-8566-336AE8F78F09 + MODULE_TYPE =3D SEC + VERSION_STRING =3D 1.1 + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources] + ResetVector.nasmb + +[Packages] + OvmfPkg/OvmfPkg.dec + MdePkg/MdePkg.dec + UefiCpuPkg/UefiCpuPkg.dec + +[BuildOptions] + *_*_IA32_NASMB_FLAGS =3D -I$(WORKSPACE)/UefiCpuPkg/ResetVector/Vtf0/ + *_*_X64_NASMB_FLAGS =3D -I$(WORKSPACE)/UefiCpuPkg/ResetVector/Vtf0/ + +[Pcd] + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize diff --git a/OvmfPkg/Bhyve/ResetVector/Ia32/PageTables64.asm b/OvmfPkg/Bhyv= e/ResetVector/Ia32/PageTables64.asm new file mode 100644 index 000000000000..d60cbfd8a30c --- /dev/null +++ b/OvmfPkg/Bhyve/ResetVector/Ia32/PageTables64.asm @@ -0,0 +1,149 @@ +;-------------------------------------------------------------------------= ----- +; @file +; Sets the CR3 register for 64-bit paging +; +; Copyright (c) 2020, Rebecca Cran +; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +;-------------------------------------------------------------------------= ----- + +BITS 32 + +%define PAGE_PRESENT 0x01 +%define PAGE_READ_WRITE 0x02 +%define PAGE_USER_SUPERVISOR 0x04 +%define PAGE_WRITE_THROUGH 0x08 +%define PAGE_CACHE_DISABLE 0x010 +%define PAGE_ACCESSED 0x020 +%define PAGE_DIRTY 0x040 +%define PAGE_PAT 0x080 +%define PAGE_GLOBAL 0x0100 +%define PAGE_2M_MBO 0x080 +%define PAGE_2M_PAT 0x01000 + +%define PAGE_2M_PDE_ATTR (PAGE_2M_MBO + \ + PAGE_ACCESSED + \ + PAGE_DIRTY + \ + PAGE_READ_WRITE + \ + PAGE_PRESENT) + +%define PAGE_PDP_ATTR (PAGE_ACCESSED + \ + PAGE_READ_WRITE + \ + PAGE_PRESENT) + +; Check if Secure Encrypted Virtualization (SEV) feature is enabled +; +; If SEV is enabled then EAX will be at least 32 +; If SEV is disabled then EAX will be zero. +; +CheckSevFeature: + ; Check if we have a valid (0x8000_001F) CPUID leaf + mov eax, 0x80000000 + cpuid + + ; This check should fail on Intel or Non SEV AMD CPUs. In future if + ; Intel CPUs supports this CPUID leaf then we are guranteed to have ex= act + ; same bit definition. + cmp eax, 0x8000001f + jl NoSev + + ; Check for memory encryption feature: + ; CPUID Fn8000_001F[EAX] - Bit 1 + ; + mov eax, 0x8000001f + cpuid + bt eax, 1 + jnc NoSev + + ; Check if memory encryption is enabled + ; MSR_0xC0010131 - Bit 0 (SEV enabled) + mov ecx, 0xc0010131 + rdmsr + bt eax, 0 + jnc NoSev + + ; Get pte bit position to enable memory encryption + ; CPUID Fn8000_001F[EBX] - Bits 5:0 + ; + mov eax, ebx + and eax, 0x3f + jmp SevExit + +NoSev: + xor eax, eax + +SevExit: + OneTimeCallRet CheckSevFeature + +; +; Modified: EAX, EBX, ECX, EDX +; +SetCr3ForPageTables64: + + OneTimeCall CheckSevFeature + xor edx, edx + test eax, eax + jz SevNotActive + + ; If SEV is enabled, C-bit is always above 31 + sub eax, 32 + bts edx, eax + +SevNotActive: + + ; + ; For OVMF, build some initial page tables at + ; PcdOvmfSecPageTablesBase - (PcdOvmfSecPageTablesBase + 0x6000). + ; + ; This range should match with PcdOvmfSecPageTablesSize which is + ; declared in the FDF files. + ; + ; At the end of PEI, the pages tables will be rebuilt into a + ; more permanent location by DxeIpl. + ; + + mov ecx, 6 * 0x1000 / 4 + xor eax, eax +clearPageTablesMemoryLoop: + mov dword[ecx * 4 + PT_ADDR (0) - 4], eax + loop clearPageTablesMemoryLoop + + ; + ; Top level Page Directory Pointers (1 * 512GB entry) + ; + mov dword[PT_ADDR (0)], PT_ADDR (0x1000) + PAGE_PDP_ATTR + mov dword[PT_ADDR (4)], edx + + ; + ; Next level Page Directory Pointers (4 * 1GB entries =3D> 4GB) + ; + mov dword[PT_ADDR (0x1000)], PT_ADDR (0x2000) + PAGE_PDP_ATTR + mov dword[PT_ADDR (0x1004)], edx + mov dword[PT_ADDR (0x1008)], PT_ADDR (0x3000) + PAGE_PDP_ATTR + mov dword[PT_ADDR (0x100C)], edx + mov dword[PT_ADDR (0x1010)], PT_ADDR (0x4000) + PAGE_PDP_ATTR + mov dword[PT_ADDR (0x1014)], edx + mov dword[PT_ADDR (0x1018)], PT_ADDR (0x5000) + PAGE_PDP_ATTR + mov dword[PT_ADDR (0x101C)], edx + + ; + ; Page Table Entries (2048 * 2MB entries =3D> 4GB) + ; + mov ecx, 0x800 +pageTableEntriesLoop: + mov eax, ecx + dec eax + shl eax, 21 + add eax, PAGE_2M_PDE_ATTR + mov [ecx * 8 + PT_ADDR (0x2000 - 8)], eax + mov [(ecx * 8 + PT_ADDR (0x2000 - 8)) + 4], edx + loop pageTableEntriesLoop + + ; + ; Set CR3 now that the paging structures are available + ; + mov eax, PT_ADDR (0) + mov cr3, eax + + OneTimeCallRet SetCr3ForPageTables64 diff --git a/OvmfPkg/Bhyve/ResetVector/ResetVector.nasmb b/OvmfPkg/Bhyve/Re= setVector/ResetVector.nasmb new file mode 100644 index 000000000000..ec869e84099b --- /dev/null +++ b/OvmfPkg/Bhyve/ResetVector/ResetVector.nasmb @@ -0,0 +1,68 @@ +;-------------------------------------------------------------------------= ----- +; @file +; This file includes all other code files to assemble the reset vector code +; +; Copyright (c) 2020, Rebecca Cran . +; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +;-------------------------------------------------------------------------= ----- + +; +; If neither ARCH_IA32 nor ARCH_X64 are defined, then try to include +; Base.h to use the C pre-processor to determine the architecture. +; +%ifndef ARCH_IA32 + %ifndef ARCH_X64 + #include + #if defined (MDE_CPU_IA32) + %define ARCH_IA32 + #elif defined (MDE_CPU_X64) + %define ARCH_X64 + #endif + %endif +%endif + +%ifdef ARCH_IA32 + %ifdef ARCH_X64 + %error "Only one of ARCH_IA32 or ARCH_X64 can be defined." + %endif +%elifdef ARCH_X64 +%else + %error "Either ARCH_IA32 or ARCH_X64 must be defined." +%endif + +%include "CommonMacros.inc" + +%include "PostCodes.inc" + +%ifdef DEBUG_PORT80 + %include "Port80Debug.asm" +%elifdef DEBUG_SERIAL + %include "SerialDebug.asm" +%else + %include "DebugDisabled.asm" +%endif + +%include "Ia32/SearchForBfvBase.asm" +%include "Ia32/SearchForSecEntry.asm" + +%ifdef ARCH_X64 + #include + + %if (FixedPcdGet32 (PcdOvmfSecPageTablesSize) !=3D 0x6000) + %error "This implementation inherently depends on PcdOvmfSecPageTables= Size" + %endif + + %define PT_ADDR(Offset) (FixedPcdGet32 (PcdOvmfSecPageTablesBase) + (Off= set)) +%include "Ia32/Flat32ToFlat64.asm" +%include "Ia32/PageTables64.asm" +%endif + +%include "Ia16/Real16ToFlat32.asm" +%include "Ia16/Init16.asm" + +%include "Main.asm" + +%include "Ia16/ResetVectorVtf0.asm" + --=20 2.29.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#67356): https://edk2.groups.io/g/devel/message/67356 Mute This Topic: https://groups.io/mt/78200871/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 15 11:46:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67357+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67357+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1605159136; cv=none; d=zohomail.com; s=zohoarc; b=HIEC5mYNV2gHUNpnTTAYPeH2JqNazcZHBCwJlkbsIUemNzmjPhctmrBqcucDDwBtFC66zpTe5uwLbKgWpiuauiOKRJqwGx6DDwrGXF66acQjKbmZvDPRWXG2h+VLo8yd7qH0n0baNx/zDlTSELHvUo+ICmpEBi9RyQM2nr6MxgA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605159136; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=DVnremifJi1EqGwP3Yt2lFUwoHuykC4S/e3tzJfporU=; b=k7xORYJ0To4W8maF9vt781XwgyFFYil0H2diqSdY8H/xY/2i9cZO8mxSYN3IHsn7aN/Eb/h+RblGbYjD+7vkTYWq23NIbb2YKM/2BWxirkIILZ1ZJlb4KjuMIktIqgkMjHYkdMtRn0sP0r+g62eeUFcRR/u7D2cV1qLiJAkT5Zs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67357+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1605159136989661.2582239187706; Wed, 11 Nov 2020 21:32:16 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id FClkYY1788612xOurST9Gq2Y; Wed, 11 Nov 2020 21:32:16 -0800 X-Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by mx.groups.io with SMTP id smtpd.web09.336.1605159136241965608 for ; Wed, 11 Nov 2020 21:32:16 -0800 X-Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kd5DT-005NVp-Fl; Wed, 11 Nov 2020 22:32:15 -0700 X-Received: from mta5.zcs.xmission.com ([166.70.13.69]) by in01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1kd5DR-0000bQ-U6; Wed, 11 Nov 2020 22:32:15 -0700 X-Received: from localhost (localhost [127.0.0.1]) by mta5.zcs.xmission.com (Postfix) with ESMTP id C6A4F1280B78; Wed, 11 Nov 2020 22:32:13 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta5.zcs.xmission.com X-Received: from mta5.zcs.xmission.com ([127.0.0.1]) by localhost (mta5.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3IViMhBpgKhX; Wed, 11 Nov 2020 22:32:13 -0700 (MST) X-Received: from photon.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta5.zcs.xmission.com (Postfix) with ESMTPSA id 8061A1280B66; Wed, 11 Nov 2020 22:32:13 -0700 (MST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Peter Grehan Date: Wed, 11 Nov 2020 22:31:53 -0700 Message-Id: <20201112053153.22038-3-rebecca@bsdio.com> In-Reply-To: <20201112053153.22038-1-rebecca@bsdio.com> References: <20201112053153.22038-1-rebecca@bsdio.com> MIME-Version: 1.0 X-XM-SPF: eid=1kd5DR-0000bQ-U6;;;mid=<20201112053153.22038-3-rebecca@bsdio.com>;;;hst=in01.mta.xmission.com;;;ip=166.70.13.69;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.69 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa02.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TooManySym_01,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Virus: No X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa02 1397; IP=ok Body=1 Fuz1=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa02 1397; IP=ok Body=1 Fuz1=1 X-Spam-Combo: ;devel@edk2.groups.io X-Spam-Relay-Country: X-Spam-Timing: total 1342 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 4.6 (0.3%), b_tie_ro: 3.2 (0.2%), parse: 1.26 (0.1%), extract_message_metadata: 12 (0.9%), get_uri_detail_list: 1.35 (0.1%), tests_pri_-1000: 11 (0.8%), tests_pri_-950: 0.99 (0.1%), tests_pri_-900: 0.78 (0.1%), tests_pri_-90: 52 (3.8%), check_bayes: 50 (3.8%), b_tokenize: 6 (0.4%), b_tok_get_all: 6 (0.4%), b_comp_prob: 1.26 (0.1%), b_tok_touch_all: 35 (2.6%), b_finish: 0.71 (0.1%), tests_pri_0: 1247 (92.9%), check_dkim_signature: 0.41 (0.0%), check_dkim_adsp: 46 (3.5%), poll_dns_idle: 44 (3.3%), tests_pri_10: 2.9 (0.2%), tests_pri_500: 8 (0.6%), rewrite_mail: 0.00 (0.0%) Subject: [edk2-devel] [PATCH v2 2/2] OvmfPkg/Bhyve: fix build breakage after SEV-ES changes X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@bsdio.com X-Gm-Message-State: XmXW2Nh8z85S3ucm8GzydLBOx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1605159136; bh=vs+W3NaYLSKBlGY/80U1s/XsLKbRtWLB9kfqm7WckJ0=; h=Cc:Date:From:Reply-To:Subject:To; b=NtBaBSRr5gfhZICBUc6hFpSBI1hr0RH8+9mhBCrsOFf4SI/o2OUyewKRmek2YEs/3Uf 2nscbmUp/ICjyPqvrxCSQEkWgN9qYLlzWEl6VHrxnrPXaAqg9c6QUPsc+++E56TmwmllD uWVHywUJecSKBTJqrjqjzMN9atR8pgCY5eg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Consume the SEV-ES-independent reset vector restored in the previous patch. Use the Null instance of VmgExitLib. Signed-off-by: Rebecca Cran Acked-by: Peter Grehan Reviewed-by: Laszlo Ersek --- OvmfPkg/Bhyve/BhyveX64.dsc | 3 ++- OvmfPkg/Bhyve/BhyveX64.fdf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index 16d2233d7788..ba79ceef5563 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -225,6 +225,7 @@ [LibraryClasses] =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf =20 [LibraryClasses.common.SEC] !ifdef $(DEBUG_ON_SERIAL_PORT) @@ -571,7 +572,7 @@ [PcdsDynamicHii] # ##########################################################################= ###### [Components] - OvmfPkg/ResetVector/ResetVector.inf + OvmfPkg/Bhyve/ResetVector/ResetVector.inf =20 # # SEC Phase modules diff --git a/OvmfPkg/Bhyve/BhyveX64.fdf b/OvmfPkg/Bhyve/BhyveX64.fdf index 5d2586ae141a..f4050c4934b7 100644 --- a/OvmfPkg/Bhyve/BhyveX64.fdf +++ b/OvmfPkg/Bhyve/BhyveX64.fdf @@ -117,7 +117,7 @@ [FV.SECFV] # INF OvmfPkg/Sec/SecMain.inf =20 -INF RuleOverride=3DRESET_VECTOR OvmfPkg/ResetVector/ResetVector.inf +INF RuleOverride=3DRESET_VECTOR OvmfPkg/Bhyve/ResetVector/ResetVector.inf =20 ##########################################################################= ###### [FV.PEIFV] --=20 2.29.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#67357): https://edk2.groups.io/g/devel/message/67357 Mute This Topic: https://groups.io/mt/78200872/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-