public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, anthony.perard@citrix.com
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Julien Grall <julien@xen.org>
Subject: Re: [edk2-devel] [PATCH v2 5/5] OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag
Date: Fri, 24 Apr 2020 20:05:53 +0200	[thread overview]
Message-ID: <db18a9be-4e46-e014-c2cc-4d6b43f046bb@redhat.com> (raw)
In-Reply-To: <20200423095358.2518197-6-anthony.perard@citrix.com>

On 04/23/20 11:53, Anthony PERARD wrote:
> Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag to enable logging
> debug output to the Xen console.
> 
> This will work with both Xen HVM guest and Xen PVH guest whereas the
> default PlatformDebugLibIoPort works only in HVM when QEMU is present.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>  OvmfPkg/OvmfXen.dsc | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 4859faf1bff7..0a8fd26990a3 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -205,14 +205,22 @@ [LibraryClasses]
>    Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
>    TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
>    RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf
> +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)
> +  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> +!else
>    DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> +!endif
>  
>  [LibraryClasses.common]
>    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
>  
>  [LibraryClasses.common.SEC]
>    QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
> +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)
> +  DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf
> +!else
>    DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
> +!endif

(1) This part can be simplified with an !ifndef, instead, I think. (When
DEBUG_ON_HYPERVISOR_CONSOLE is defined, then the default resolution can
take effect for SEC too.)

If you wish I can change this for you as well. Alternatively, if you'd
rather repost, that's OK too. (And maybe Phil intends to review more of
the patches in this series; I'm not sure.)

>    ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
>    ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
>  !if $(SOURCE_DEBUG_ENABLE) == TRUE
> @@ -405,6 +413,11 @@ [PcdsFixedAtBuild]
>    #
>  !include NetworkPkg/NetworkPcds.dsc.inc
>  
> +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)
> +  ## Set Xen's debug IO port for PlatformDebugLibIoPort
> +  gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort|0xe9
> +!endif
> +
>    # IRQs 5, 9, 10, 11 are level-triggered
>    gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0E20
>  
> 

With (1) updated:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


  reply	other threads:[~2020-04-24 18:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  9:53 [PATCH v2 0/5] OvmfXen: Cleanup debug options Anthony PERARD
2020-04-23  9:53 ` [PATCH v2 1/5] OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT Anthony PERARD
2020-04-23 10:52   ` [edk2-devel] " Philippe Mathieu-Daudé
2020-04-23  9:53 ` [PATCH v2 2/5] OvmfPkg/PlatformDebugLibIoPort: Reword QEMU to hypervisor Anthony PERARD
2020-04-24 17:48   ` [edk2-devel] " Laszlo Ersek
2020-04-23  9:53 ` [PATCH v2 3/5] OvmfPkg/PlatformDebugLibIoPort: factor out debug port detection Anthony PERARD
2020-04-23 10:50   ` [edk2-devel] " Philippe Mathieu-Daudé
2020-04-24 17:52   ` Laszlo Ersek
2020-04-23  9:53 ` [PATCH v2 4/5] OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant Anthony PERARD
2020-04-24 17:58   ` [edk2-devel] " Laszlo Ersek
2020-04-27 14:19     ` Anthony PERARD
2020-04-23  9:53 ` [PATCH v2 5/5] OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag Anthony PERARD
2020-04-24 18:05   ` Laszlo Ersek [this message]
2020-04-27 14:22     ` [edk2-devel] " Anthony PERARD
2020-04-28 21:23 ` [edk2-devel] [PATCH v2 0/5] OvmfXen: Cleanup debug options Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db18a9be-4e46-e014-c2cc-4d6b43f046bb@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox