From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Fri, 12 Apr 2019 02:20:11 -0700 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52668C0546F8; Fri, 12 Apr 2019 09:20:11 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-65.rdu2.redhat.com [10.10.120.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6DE8600C5; Fri, 12 Apr 2019 09:20:09 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 19/31] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected To: devel@edk2.groups.io, anthony.perard@citrix.com Cc: Jordan Justen , Ard Biesheuvel , Julien Grall , xen-devel@lists.xenproject.org References: <20190409110844.14746-1-anthony.perard@citrix.com> <20190409110844.14746-20-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: Date: Fri, 12 Apr 2019 11:20:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190409110844.14746-20-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 12 Apr 2019 09:20:11 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/09/19 13:08, Anthony PERARD wrote: > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Anthony PERARD > --- > 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/Platform.h > index a524c23a43..c5a139f016 100644 > --- a/OvmfPkg/XenPlatformPei/Platform.h > +++ b/OvmfPkg/XenPlatformPei/Platform.h > @@ -105,6 +105,11 @@ XenHvmloaderDetected ( > VOID > ); > > +BOOLEAN > +XenPvhDetected ( > + VOID > + ); > + > VOID > AmdSevInitialize ( > VOID > diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c > index b36eff524d..23ff3102b5 100644 > --- a/OvmfPkg/XenPlatformPei/Xen.c > +++ b/OvmfPkg/XenPlatformPei/Xen.c > @@ -217,6 +217,19 @@ XenHvmloaderDetected ( > return (mXenHvmloaderInfo != NULL); > } > > +BOOLEAN > +XenPvhDetected ( > + VOID > + ) > +{ > + // > + // This function should only be used after XenConnect > + // > + ASSERT (mXenInfo.VersionMajor != 0); > + > + return mXenHvmloaderInfo == NULL; > +} > + > VOID > XenPublishRamRegions ( > VOID > (1) Please write a nonempty commit message body. with that Acked-by: Laszlo Ersek Thanks Laszlo