From nobody Fri Dec 19 06:31:12 2025 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+79525+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+79525+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1629321686; cv=none; d=zohomail.com; s=zohoarc; b=ZlceBHnd12cFy9Rd9Jt5V7A96Ew0pjlyr6FUmN8IyIN8z/Fe2DyJ3iqOqwmQG7dAP2GhSYn3P3C4uRGshJANPD5y27IbJiOE1hDyXqHc5QYBAs0iP4O1jT+mBlf/AovpEXEJKk19NCAz01/Ox34YssRF+sz9vAhFkHbwTEmip9Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629321686; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=duDapJEy6p0JXWigaDrIgtk8JE2UuF3BgrSTGlOrzas=; b=bqP2emeEowBTPb8WmvUNM018YQg0gUWIdOYUv4B3VjbusGK1q5o/Rep6wlEJr+BAf1PFFqoVphspEGv4Kud9U1CJMgr1yJBQMMbxuThQJlV7DcePDm9Qr+SRVIHJM0vgD+lZ3QoXzncHdvd/3ORsymTQE8RauZv/LdgP08UGDfU= 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+79525+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1629321686365482.7368264235579; Wed, 18 Aug 2021 14:21:26 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id GJvxYY1788612xRkuqDLc3d0; Wed, 18 Aug 2021 14:21:26 -0700 X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by mx.groups.io with SMTP id smtpd.web11.60780.1629321685346028647 for ; Wed, 18 Aug 2021 14:21:25 -0700 X-Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17IL34kE193862; Wed, 18 Aug 2021 17:21:20 -0400 X-Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ah56hg0y4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Aug 2021 17:21:20 -0400 X-Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 17ILBvmS039028; Wed, 18 Aug 2021 17:21:19 -0400 X-Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ah56hg0xr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Aug 2021 17:21:19 -0400 X-Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17ILIOPp022468; Wed, 18 Aug 2021 21:21:18 GMT X-Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma02wdc.us.ibm.com with ESMTP id 3ae5fe591h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Aug 2021 21:21:18 +0000 X-Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17ILLGr314745920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Aug 2021 21:21:16 GMT X-Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B7246BE059; Wed, 18 Aug 2021 21:21:16 +0000 (GMT) X-Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A3DB2BE051; Wed, 18 Aug 2021 21:21:15 +0000 (GMT) X-Received: from amdrome1.watson.ibm.com (unknown [9.2.130.16]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 18 Aug 2021 21:21:15 +0000 (GMT) From: "Tobin Feldman-Fitzthum" To: tobin@ibm.com, dovmurik@linux.vnet.ibm.com, jejb@linux.ibm.com, frankeh@us.ibm.com, pbonzini@redhat.com, ashish.kalra@amd.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, dgilbert@redhat.com, srutherford@google.com, devel@edk2.groups.io, ard.biesheuvel@arm.com, jiewen.yao@intel.com Subject: [edk2-devel] [RFC PATCH 9/9] OvmfPkg/ResetVector: Expose Migration Handler Entry Addresses Date: Wed, 18 Aug 2021 17:20:48 -0400 Message-Id: <20210818212048.162626-10-tobin@linux.ibm.com> In-Reply-To: <20210818212048.162626-1-tobin@linux.ibm.com> References: <20210818212048.162626-1-tobin@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: dEPqVn2caAmAV_gFfYjwBXKQGll7Fdb6 X-Proofpoint-GUID: 7G3vU1krPSmwMwlKUAlTE3rKOlFQQcgw Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,tobin@linux.ibm.com X-Gm-Message-State: TQ6kip8f58moi3Y5OUIWw46Vx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1629321686; bh=j67x332GZM7mMX2r3FSsT74ty3fM9VBeaz+bywt2R54=; h=Date:From:Reply-To:Subject:To; b=rCtq6fNaOIWLl2PzCtdPvtM30byK+1Bw+HwO0cixsdZrOxP1A27TfOPK05SHeb8xhFR Qn7Fo9NU3N28c8CAAShIuKP7uq/oPI6m5o7Pb4nUsjbLbkfWGoAMwdn4vC0iIG/2CM0ti A/S2nLDMAN3shGtrU6ONu10xr1rIQBRT9RI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1629321686976100002 Content-Type: text/plain; charset="utf-8" Exposes the address of the Migration Handler entry point via a GUIDed struct. To support migration, the HV should find this struct and start one vCPU at the entry point address. Signed-off-by: Tobin Feldman-Fitzthum --- OvmfPkg/ResetVector/ResetVector.inf | 1 + OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm | 13 +++++++++++++ OvmfPkg/ResetVector/ResetVector.nasmb | 1 + 3 files changed, 15 insertions(+) diff --git a/OvmfPkg/ResetVector/ResetVector.inf b/OvmfPkg/ResetVector/Rese= tVector.inf index d028c92d8c..642757796c 100644 --- a/OvmfPkg/ResetVector/ResetVector.inf +++ b/OvmfPkg/ResetVector/ResetVector.inf @@ -49,3 +49,4 @@ gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretSize gUefiOvmfPkgTokenSpaceGuid.PcdQemuHashTableBase gUefiOvmfPkgTokenSpaceGuid.PcdQemuHashTableSize + gUefiOvmfPkgTokenSpaceGuid.PcdConfidentialMigrationEntryBase diff --git a/OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm b/OvmfPkg/ResetVe= ctor/Ia16/ResetVectorVtf0.asm index 7ec3c6e980..fc38bd927d 100644 --- a/OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm +++ b/OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm @@ -86,6 +86,19 @@ sevSecretBlockStart: DB 0x80, 0x81, 0x12, 0x7C, 0x90, 0xD3, 0xD2, 0x94 sevSecretBlockEnd: =20 +; +; The IP of the migration handler. The hypervisor should start +; the mirror with this address. +; +; GUID =3D 5c7db037-ab87-4282-b33c-7894f01471ec +; +sevMigrationBlockStart: + DD SEV_MIGRATION_ENTRY_IP + DW sevMigrationBlockStart - sevMigrationBlockEnd + DB 0x5C, 0x7D, 0xB0, 0x37, 0x87, 0xAB, 0x82, 0x42 + DB 0xB3, 0x3C, 0x78, 0x94, 0xF0, 0x14, 0x71, 0xEC +sevMigrationBlockEnd: + ; ; SEV-ES Processor Reset support ; diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb b/OvmfPkg/ResetVector/Re= setVector.nasmb index acec46a324..344713bfbb 100644 --- a/OvmfPkg/ResetVector/ResetVector.nasmb +++ b/OvmfPkg/ResetVector/ResetVector.nasmb @@ -91,5 +91,6 @@ %define SEV_LAUNCH_SECRET_SIZE FixedPcdGet32 (PcdSevLaunchSecretSize) %define SEV_FW_HASH_BLOCK_BASE FixedPcdGet32 (PcdQemuHashTableBase) %define SEV_FW_HASH_BLOCK_SIZE FixedPcdGet32 (PcdQemuHashTableSize) + %define SEV_MIGRATION_ENTRY_IP FixedPcdGet32 (PcdConfidentialMigrationE= ntryBase) %include "Ia16/ResetVectorVtf0.asm" =20 --=20 2.20.1 -=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 (#79525): https://edk2.groups.io/g/devel/message/79525 Mute This Topic: https://groups.io/mt/84982990/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-