From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.8403.1587475380653205441 for ; Tue, 21 Apr 2020 06:23:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HcqUeF4X; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587475379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r9KkbXCuWXoF1FOw47BE/P+VGvjWxHcmjTtD7qVubYs=; b=HcqUeF4XbkNsEyuBy+2RIJgiweKYHhJc1N9EbU1HbJxMQzeB4P2H1b9yScs9CEsO/IMPQN 9PdqlXozT4QL9n7FYmWy7S3NLqGaWS5PQ4zjk9jISsl+Jc4fVl2fxz7kJ3eGyIGxzYpMzb C0M/pJgRwETq0ypoUcFoYwdymkXs4i0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-465-j5l2Qa_LMhicw9Lnw-urvw-1; Tue, 21 Apr 2020 09:22:58 -0400 X-MC-Unique: j5l2Qa_LMhicw9Lnw-urvw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 172C3A0CC8; Tue, 21 Apr 2020 13:22:57 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-52.ams2.redhat.com [10.36.115.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90ACB5C3FA; Tue, 21 Apr 2020 13:22:55 +0000 (UTC) Subject: Re: [PATCH 1/2] OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT To: Anthony PERARD , devel@edk2.groups.io Cc: Ard Biesheuvel , Jordan Justen , Julien Grall References: <20200420162918.2312514-1-anthony.perard@citrix.com> <20200420162918.2312514-2-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: <9253757e-88d9-a4e6-f8ee-7ac1cf48ecf7@redhat.com> Date: Tue, 21 Apr 2020 15:22:54 +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: <20200420162918.2312514-2-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 04/20/20 18:29, Anthony PERARD wrote: > Remove support for DEBUG_ON_SERIAL_PORT because OvmfXen can't be build > with it due to a circular dependency: > DebugLib : BaseDebugLibSerialPort -> > SerialPortLib : XenConsoleSerialPortLib -> > XenHypercallLib : XenHypercallLib -> > DebugLib > > Also, if that dependency is fixed, I think it would be harder to find > which console the debug is sent to when running an HVM guest. The xen > console isn't the serial console used by default. Furthermore, > XenHypercallLib isn't initialised early enough, so we would loose > debug output from the SEC phase and early PEI phase. > > Signed-off-by: Anthony PERARD > --- > OvmfPkg/OvmfXen.dsc | 40 +--------------------------------------- > 1 file changed, 1 insertion(+), 39 deletions(-) > > diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc > index 47ee8db8b884..4859faf1bff7 100644 > --- a/OvmfPkg/OvmfXen.dsc > +++ b/OvmfPkg/OvmfXen.dsc > @@ -205,17 +205,14 @@ [LibraryClasses] > Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf > RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf > + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > > [LibraryClasses.common] > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > > [LibraryClasses.common.SEC] > QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf > -!endif > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf > ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf > !if $(SOURCE_DEBUG_ENABLE) == TRUE > @@ -236,11 +233,6 @@ [LibraryClasses.common.PEI_CORE] > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf > PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf > > [LibraryClasses.common.PEIM] > @@ -252,11 +244,6 @@ [LibraryClasses.common.PEIM] > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf > PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf > ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf > ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf > @@ -274,11 +261,6 @@ [LibraryClasses.common.DXE_CORE] > DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf > MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf > !if $(SOURCE_DEBUG_ENABLE) == TRUE > DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf > @@ -292,11 +274,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] > DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf > PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf > @@ -308,11 +285,6 @@ [LibraryClasses.common.UEFI_DRIVER] > DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf > PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf > > @@ -322,11 +294,6 @@ [LibraryClasses.common.DXE_DRIVER] > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf > UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf > PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf > QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf > @@ -344,11 +311,6 @@ [LibraryClasses.common.UEFI_APPLICATION] > HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf > ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf > -!ifdef $(DEBUG_ON_SERIAL_PORT) > - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf > -!else > - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf > -!endif > PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf > > ################################################################################ > Reviewed-by: Laszlo Ersek