From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: citrix.com, ip: , mailfrom: anthony.perard@citrix.com) Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com []) by groups.io with SMTP; Thu, 04 Jul 2019 07:42:41 -0700 Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com 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: qf1oqVJLkqI39SA5OJI0ziNfvY0oa+XEkI0PA1JFunEuXH6eH4E31JCBO89rL4vDtF/5Iu4tqa jqEiM/umbhCz0Y/KMqPLmz407CRfR1ZkXnVHFnoSmGFJxJhCfqGIlPlvagNE+JxOP9JT6CVZaA LC8bg/pn44oFloSTs4oRe7Yd1uF9FZBatjU70IRjPWupdyqtHiZurGwHUexEbPYML06P8kyfNl WqfUTbqvE7PGab3lLIRRD1FfUIDtEMa/rICBsV7ju8RjRYN5pVHwjOOPBurExFPBif5DtnTdBk Jms= X-SBRS: 2.7 X-MesageID: 2588790 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="2588790" From: "Anthony PERARD" To: CC: , Ard Biesheuvel , Jordan Justen , Laszlo Ersek , Julien Grall , Anthony PERARD , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 09/35] OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU Date: Thu, 4 Jul 2019 15:42:07 +0100 Message-ID: <20190704144233.27968-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190704144233.27968-1-anthony.perard@citrix.com> References: <20190704144233.27968-1-anthony.perard@citrix.com> MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain ACPI Timer does not work in a PVH guest, but local APIC works on both PVH and HVM. Note that the use of SecPeiDxeTimerLibCpu might be an issue with a driver of type DXE_RUNTIME_DRIVER. I've attemptde to find out which of the DXE_RUNTIME_DRIVER uses the TimerLib at runtime. I've done that by replacing the TimerLib evaluation in [LibraryClasses.common.DXE_RUNTIME_DRIVER] by a different one and check every module that uses it (with the --report-file=3Dreport build option). ResetSystemRuntimeDxe is calling the TimerLib API at runtime to do the operation "EfiResetCold", so this may never complete if the OS have disabled the Local APIC Timer. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1689 Signed-off-by: Anthony PERARD --- Notes: v3: - cleanup .dsc, leave only one TimerLib resolution - Added a note in the commit message regarding the use of the local apic by runtime drivers OvmfPkg/OvmfXen.dsc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 9f79d455fa..6288394eb8 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -104,7 +104,7 @@ [SkuIds] ##########################################################################= ######=0D [LibraryClasses]=0D PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D - TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf=0D + TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf=0D PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf=0D BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf= =0D BaseLib|MdePkg/Library/BaseLib/BaseLib.inf=0D @@ -202,7 +202,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf=0D =0D [LibraryClasses.common.SEC]=0D - TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf=0D QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf=0D !ifdef $(DEBUG_ON_SERIAL_PORT)=0D DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D @@ -281,7 +280,6 @@ [LibraryClasses.common.DXE_CORE] =0D [LibraryClasses.common.DXE_RUNTIME_DRIVER]=0D PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D - TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf= =0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D @@ -298,7 +296,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] =0D [LibraryClasses.common.UEFI_DRIVER]=0D PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D - TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf= =0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D @@ -313,7 +310,6 @@ [LibraryClasses.common.UEFI_DRIVER] =0D [LibraryClasses.common.DXE_DRIVER]=0D PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D - TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D @@ -337,7 +333,6 @@ [LibraryClasses.common.DXE_DRIVER] =0D [LibraryClasses.common.UEFI_APPLICATION]=0D PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D - TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D --=20 Anthony PERARD