From nobody Sun May 19 09:42:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98899+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98899+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674135794; cv=none; d=zohomail.com; s=zohoarc; b=kUjemRQfKnSypD5evyCW3vEX+gBZPLo1xl23sxde0vSwRhw+yI3QJHddy7vGdTttQrLmaGnVyTT5ZQH8q6PX0PKnNMupLk8EErp2p7dK5BaPoeRTAbNOaTjAOqyyA7yFgqvWvqWnhD62oj50I+1XwPvRBDGIvN+s8NIauv87VY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674135794; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=2BNE1O01mGv2RH5ybZC3Xc79CZwFMk5Ul5J1sTASp60=; b=eZnXPX1gmMd2kpSLYUYKWh0MZPuMJowszXGSVjb2ZhKKf7zdKWeqevSO/TKR6o6hPwh324RL2/sopHJWEtYWqfEh8VFu4ipRHd44jAkPyXJ9lAqnWY0KIbKalrf1YjiK13hDFcIkR161VyQg+Jh0pialCCpF0FLoragFip/yUX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98899+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674135794439314.94791210223696; Thu, 19 Jan 2023 05:43:14 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZxChYY1788612xzkEMaitbua; Thu, 19 Jan 2023 05:43:14 -0800 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.45469.1674135792722654352 for ; Thu, 19 Jan 2023 05:43:13 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BCFAAB823C4; Thu, 19 Jan 2023 13:43:10 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43187C433D2; Thu, 19 Jan 2023 13:43:07 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Laszlo Ersek , Gerd Hoffmann , Jiewen Yao , Michael Brown , Oliver Steffen , Michael Kubacki Subject: [edk2-devel] [RFC PATCH] OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix Date: Thu, 19 Jan 2023 14:43:02 +0100 Message-Id: <20230119134302.1524569-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org X-Gm-Message-State: FM3hK2TbHxa9eMRtGQbG4Y3hx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674135794; bh=4OvstKNrkK6rTUE9I/eoQxW7SF4CAdTENgPAxfSTQjY=; h=Cc:Date:From:Reply-To:Subject:To; b=oK2MgUv97LAi0wHRWN/2ikMgACwnUgJiud1U5iBySMeW/wahUcfTa257oetaFaRQVoY Jsp4kK8MYiwogwS1OmKQ6Dc3oMvMGWXjsGsM7auinNNCsjELmW4OnRRMlguqVKkuVeLX5 TN5cF7ejKRFvdE42JbqU8+25YFUvU5dOj6w= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674135794969100001 Content-Type: text/plain; charset="utf-8" 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 Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Michael Brown Cc: Oliver Steffen Cc: Michael Kubacki Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4250 Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann Acked-by: Jiewen Yao Reviewed-by: Laszlo Ersek Reviewed-by: Michael Kubacki --- OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 2 +- OvmfPkg/PlatformCI/PlatformBuildLib.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml b/OvmfPk= g/PlatformCI/.azurepipelines/Windows-VS2019.yml index 7e63f419b26b..b3b91aa84ea0 100644 --- a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml +++ b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml @@ -24,7 +24,7 @@ jobs: package: 'OvmfPkg' vm_image: 'windows-2019' should_run: true - run_flags: "MAKE_STARTUP_NSH=3DTRUE QEMU_HEADLESS=3DTRUE" + run_flags: "MAKE_STARTUP_NSH=3DTRUE QEMU_HEADLESS=3DTRUE QEMU_CPUHP_= QUIRK=3DTRUE" =20 #Use matrix to speed up the build process strategy: diff --git a/OvmfPkg/PlatformCI/PlatformBuildLib.py b/OvmfPkg/PlatformCI/Pl= atformBuildLib.py index bfef9849c749..58dc1189a2cc 100644 --- a/OvmfPkg/PlatformCI/PlatformBuildLib.py +++ b/OvmfPkg/PlatformCI/PlatformBuildLib.py @@ -170,6 +170,7 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManage= r): self.env.SetValue("PRODUCT_NAME", "OVMF", "Platform Hardcoded") self.env.SetValue("MAKE_STARTUP_NSH", "FALSE", "Default to false") self.env.SetValue("QEMU_HEADLESS", "FALSE", "Default to false") + self.env.SetValue("QEMU_CPUHP_QUIRK", "FALSE", "Default to false") return 0 =20 def PlatformPreBuild(self): @@ -211,6 +212,17 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManag= er): args +=3D " -pflash " + os.path.join(OutputPath_FV, "OVMF.fd")= # path to firmware =20 =20 + ### + ### NOTE This is a temporary workaround to allow platform CI to co= pe with + ### a QEMU bug in the CPU hotplug code. Once the CI environme= nt has + ### been updated to carry a fixed version of QEMU, this can be + ### removed again + ### + ### Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4250 + ### + if (self.env.GetValue("QEMU_CPUHP_QUIRK").upper() =3D=3D "TRUE"): + args +=3D " -fw_cfg name=3Dopt/org.tianocore/X-Cpuhp-Bugcheck= -Override,string=3Dyes" + if (self.env.GetValue("MAKE_STARTUP_NSH").upper() =3D=3D "TRUE"): f =3D open(os.path.join(VirtualDrive, "startup.nsh"), "w") f.write("BOOT SUCCESS !!! \n") --=20 2.39.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98899): https://edk2.groups.io/g/devel/message/98899 Mute This Topic: https://groups.io/mt/96377034/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-