]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix
authorArd Biesheuvel <ardb@kernel.org>
Thu, 19 Jan 2023 13:43:02 +0000 (14:43 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 20 Jan 2023 13:41:16 +0000 (13:41 +0000)
QEMU for x86 has a nasty CPU hotplug bug of which the ramifications are
difficult to oversee, even though KVM acceleration seems to be
unaffected. This has been addressed in QEMU mainline, and will percolate
through the ecosystem at its usual pace. In the mean time, due to the
potential impact on production workloads, we will be updating OVMF to
abort the boot when it detects a QEMU build that is affected.

Tiancore's platform CI uses QEMU in TCG mode, and is therefore impacted
by this mitigation, unless its QEMU builds are updated. This has been
done for Ubuntu-GCC5, but Windows-VS2019 still uses a QEMU build that is
affected.

Aborting the boot upon detecting the QEMU issue will render all boot
tests carried out on Windows-VS2019 broken unless we implement the
'escape hatch' that enables proceed-at-your-own-risk mode, and permits
the boot to proceed even if the QEMU issue is detected.

So let's enable this for Windows-VS2019, and remove it again once it is
no longer needed.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Brown <mcb30@ipxe.org>
Cc: Oliver Steffen <osteffen@redhat.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4250
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Message-Id: <20230119134302.1524569-1-ardb@kernel.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Jiewen Yao <Jiewen.yao@Intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
OvmfPkg/PlatformCI/PlatformBuildLib.py

index 7e63f419b26b65b7d853c1d6b1481a4a61540102..b3b91aa84ea0a8967c0f7023a6c6a973fbb4c98b 100644 (file)
@@ -24,7 +24,7 @@ jobs:
       package: 'OvmfPkg'\r
       vm_image: 'windows-2019'\r
       should_run: true\r
-      run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"\r
+      run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE QEMU_CPUHP_QUIRK=TRUE"\r
 \r
     #Use matrix to speed up the build process\r
     strategy:\r
index bfef9849c749df7da19f554d2c61688bfa11ed83..58dc1189a2cc084300ec399db23477ed9ae367c2 100644 (file)
@@ -170,6 +170,7 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager):
         self.env.SetValue("PRODUCT_NAME", "OVMF", "Platform Hardcoded")\r
         self.env.SetValue("MAKE_STARTUP_NSH", "FALSE", "Default to false")\r
         self.env.SetValue("QEMU_HEADLESS", "FALSE", "Default to false")\r
+        self.env.SetValue("QEMU_CPUHP_QUIRK", "FALSE", "Default to false")\r
         return 0\r
 \r
     def PlatformPreBuild(self):\r
@@ -211,6 +212,17 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager):
             args += " -pflash " + os.path.join(OutputPath_FV, "OVMF.fd")    # path to firmware\r
 \r
 \r
+        ###\r
+        ### NOTE This is a temporary workaround to allow platform CI to cope with\r
+        ###      a QEMU bug in the CPU hotplug code. Once the CI environment has\r
+        ###      been updated to carry a fixed version of QEMU, this can be\r
+        ###      removed again\r
+        ###\r
+        ### Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4250\r
+        ###\r
+        if (self.env.GetValue("QEMU_CPUHP_QUIRK").upper() == "TRUE"):\r
+            args += "  -fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes"\r
+\r
         if (self.env.GetValue("MAKE_STARTUP_NSH").upper() == "TRUE"):\r
             f = open(os.path.join(VirtualDrive, "startup.nsh"), "w")\r
             f.write("BOOT SUCCESS !!! \n")\r