From nobody Thu Nov 14 17:20:42 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+45560+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1565697512; cv=none; d=zoho.com; s=zohoarc; b=RzO+Fjb899vsNDI0AeVgwkIK6pF6V23LPBE+WoTHAO2oxVNM6VX/88vaumtfqUFEq7T2nrJJ33k+3T5ok6D/MqVmwucjDGH2gYv6SFP0t89/BHOUKOGG45Qwdx58mOFF9jp4gClXXKcA9SiUo1cyy0e3mxSWwCLNcgFr5G0Qnbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565697512; 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=JnLQZY4k2D6kHokGzmI9TWaMcEuqpz6OZTCrcsrHtac=; b=eTQUbhpWHxkKKCtx1/249fyjHRKvf9u0qt4++BWJ+Cdl9oPO5TjQdB6dAgRFj9msNZUeGLTzDvg/wPD6sFpY+rXyr+UpEtQKTCyXWMHK8AB9TAdhNK4PFYhb7I0jlhp2bT/5FVkxXryYX/aAFsutgUVMHyXIqiuDFykx8acSwvo= 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+45560+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1565697512455894.4837292149958; Tue, 13 Aug 2019 04:58:32 -0700 (PDT) Return-Path: X-Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by groups.io with SMTP; Tue, 13 Aug 2019 04:58:31 -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+45560+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: p9p0LnWBoAgODO0cxwFEMiklYQURe8f5Wmfyxxg/Pipp9LNrW864t7Y4R6P1GraBpQ3zaL0UGP h1J0Y0LFO+hLDPxBtgZL5006w8l1d1Zz6dwB8aZEHMzPhxy1hNCTRQ8Ht0nxuQe9eIGiIRqkSI 98PUsjB6/u+R9UVoDb8sC+WixZ/lNMFjGzJy3+TgCCR7Wo0z1srRbJL2dusF23fHpI1ppymCls tZOqZ3TplQYuvtyVKA8TPxi2Ll7cJ4wof1pC5N0X6IJYgQOar1qmEPeoLywM5RK6npb0WkbdRB rwc= X-SBRS: 2.7 X-MesageID: 4210855 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,381,1559534400"; d="scan'208";a="4210855" From: "Anthony PERARD" To: CC: Laszlo Ersek , Jordan Justen , Julien Grall , , Ard Biesheuvel , Anthony PERARD Subject: [edk2-devel] [PATCH v5 20/35] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected Date: Tue, 13 Aug 2019 12:31:04 +0100 Message-ID: <20190813113119.14804-21-anthony.perard@citrix.com> In-Reply-To: <20190813113119.14804-1-anthony.perard@citrix.com> References: <20190813113119.14804-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=1565697512; bh=JnLQZY4k2D6kHokGzmI9TWaMcEuqpz6OZTCrcsrHtac=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XnrE9T/1GpesvWHsdBswg9bOpcWkVzpM08YhqA0jclyffC+5CyaqzYaXJvJ5us/osmG I7l2tVfgFY69QnGlc8bYXhng1nSKuAn7AA6/hoJTibr3DDFFNgKycK3+TBHuxIMETHsIE 9vjn5Epopsw3UveCfoNFLNlRTyZB6x6WOso= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" XenPvhDetected() can be used to figure out if OVMF has started via the Xen PVH entry point. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes: v5: - in XenPvhDetected, check mXenInfo.HyperPages instead of .VersionMajor OvmfPkg/XenPlatformPei/Platform.h | 5 +++++ OvmfPkg/XenPlatformPei/Xen.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/OvmfPkg/XenPlatformPei/Platform.h b/OvmfPkg/XenPlatformPei/Pla= tform.h index 4a80057bdc..db9a62572f 100644 --- a/OvmfPkg/XenPlatformPei/Platform.h +++ b/OvmfPkg/XenPlatformPei/Platform.h @@ -99,6 +99,11 @@ XenHvmloaderDetected ( VOID ); =20 +BOOLEAN +XenPvhDetected ( + VOID + ); + VOID AmdSevInitialize ( VOID diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index 29b42b746c..f26f0e56dd 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -214,6 +214,19 @@ XenHvmloaderDetected ( return (mXenHvmloaderInfo !=3D NULL); } =20 +BOOLEAN +XenPvhDetected ( + VOID + ) +{ + // + // This function should only be used after XenConnect + // + ASSERT (mXenInfo.HyperPages !=3D NULL); + + return mXenHvmloaderInfo =3D=3D NULL; +} + VOID XenPublishRamRegions ( VOID --=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 (#45560): https://edk2.groups.io/g/devel/message/45560 Mute This Topic: https://groups.io/mt/32851708/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-