From nobody Thu Nov 14 05:48:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43300+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1562252295; cv=none; d=zoho.com; s=zohoarc; b=QGV/koFlBuVgl/7a+QeJlB7xuZocT5ENeNqNS8Iss9NrqMB4vzANaxEmR9qptvrQw5ywF6jbDOKmFuoW5cH0Ri8y+kpkmFFOgK4gEe2Tpm305WhB1W2NeOgbHqeJh69h56wkznRWdFrGDrHgB8dZ+GSpKI1d6RsBJXvaO0zHi5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562252295; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=gIbbKk3QNHGPfE7GrYh5brSMQl8AqA6hotA6TWhe7x8=; b=ZT9r8bo30cQEP/5Wgx8Wn7R4nepeReJyLx/qP18JHm6L75kgyKPhGO3zSGXiwe7XjhArrkTasBvAq+XYEfjFyaTtYhoTUlCT3nbf8yt5tlgglp1b3ifpxNQNc0snx4V8fR7aADZZrwhmuly4RRfPrQf6PksNQBZdNOJbPQkx1DU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43300+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1562252295217385.84949369846095; Thu, 4 Jul 2019 07:58:15 -0700 (PDT) Return-Path: X-Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by groups.io with SMTP; Thu, 04 Jul 2019 07:58:14 -0700 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43300+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: AjrJ982ije/yG3O6ggYcbOwxVFQQ7wacJKXpOL2ZR0wudHhR4zEeauCMkomFDRxgEeeMrR50Zo omthIIFfVWQ3xNdOgu5p+CZUuEpgoHXFIdZ7TF5LXxUVNraPZNxPbvr9p3O8gOu1uzyyygq7lh LyXp5A7xhZev1DDO3rbdNdIIe7Sg41CeYXIVHwgjNgrY0kWRX7WRyKZZmmbHhbKNDbYF61nPFe W42QuInPq44T8IsXbDVcWrtgrVup+bZC8rsnWSvS52H0cInekl6hMPp103CuvNA1fiq+Ouh/eL nlU= X-SBRS: 2.7 X-MesageID: 2589148 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,451,1557201600"; d="scan'208";a="2589148" From: "Anthony PERARD" To: CC: , Ard Biesheuvel , Jordan Justen , Laszlo Ersek , Julien Grall , Anthony PERARD Subject: [edk2-devel] [PATCH v3 17/35] OvmfPkg/XenPlatformPei: Reinit XenHypercallLib Date: Thu, 4 Jul 2019 15:42:15 +0100 Message-ID: <20190704144233.27968-18-anthony.perard@citrix.com> In-Reply-To: <20190704144233.27968-1-anthony.perard@citrix.com> References: <20190704144233.27968-1-anthony.perard@citrix.com> MIME-Version: 1.0 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,anthony.perard@citrix.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1562252294; bh=qzUb/+JObsQqHMIb/UHKKTcCRqp415ibzr0tL3MsaYU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vR4WxK9hLS9qqBXIvjdDMnbjv87riVznuJbcie6N43d8+aQxwJOmpT6Y9BDhbham0yR a0XmpSktHP9O+qF9QR5efOByUw6EFJHSPaUYDOshyLC8Kzp3JL23Wk4M/I4QueZTD8MTF XaZiDJ8N8p8X//ommC3tdbC4mjHsY0jH8wA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The XenPlatformPei needs to make hypercalls, but the XenHypercallLib was initialised before the HyperPage was ready. Now that XenPlatformPei has initialised the HyperPage, reinitialise the XenHypercallLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v3: - new patch split from XenHypercallLib: Enable it in PEIM. - check for Lib initialisation failure. OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 1 + OvmfPkg/XenPlatformPei/Xen.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf b/OvmfPkg/XenPlatfor= mPei/XenPlatformPei.inf index 4d00206d09..0ef77db92c 100644 --- a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf +++ b/OvmfPkg/XenPlatformPei/XenPlatformPei.inf @@ -59,6 +59,7 @@ [LibraryClasses] MtrrLib MemEncryptSevLib PcdLib + XenHypercallLib =20 [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index c5293498c4..877d776de8 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -26,6 +26,7 @@ #include #include #include +#include =20 #include "Platform.h" #include "Xen.h" @@ -88,6 +89,7 @@ XenConnect ( EFI_XEN_OVMF_INFO *Info; CHAR8 Sig[sizeof (Info->Signature) + 1]; UINT32 *PVHResetVectorData; + RETURN_STATUS Status; =20 AsmCpuid (XenLeaf + 2, &TransferPages, &TransferReg, NULL, NULL); mXenInfo.HyperPages =3D AllocatePages (TransferPages); @@ -152,6 +154,13 @@ XenConnect ( sizeof(mXenInfo) ); =20 + // + // Initialize the XenHypercall library, now that the XenInfo HOB is + // available + // + Status =3D XenHypercallLibInit (); + ASSERT_RETURN_ERROR (Status); + return EFI_SUCCESS; } =20 --=20 Anthony PERARD -=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 (#43300): https://edk2.groups.io/g/devel/message/43300 Mute This Topic: https://groups.io/mt/32308724/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-