From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.74275.1674222527992876345 for ; Fri, 20 Jan 2023 05:48:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JRtJZoQt; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674222527; 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=le2qDQRAbN4rY/MoVK7mYozt6KMnpRx3W9lzCUHIk7U=; b=JRtJZoQt2HOf5ZugS6OF3hRBjP+R+59Wx+o8XnNiHypugJNQbtP2Bprjn76JK89DvAJ8E+ RYA9B/nvtx/tnPFYufAStYFsPcWu7oxja8zm3ntrHabXOvkMagrlzvyehYg/jKZQrP9HQz oa+7LK5a4ZvzCPmFb0yvUHwm2SU9kN0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-n0jU_FGBOVKI8xEjFHVKsw-1; Fri, 20 Jan 2023 08:48:44 -0500 X-MC-Unique: n0jU_FGBOVKI8xEjFHVKsw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 04328885649; Fri, 20 Jan 2023 13:48:43 +0000 (UTC) Received: from [10.39.193.187] (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A43E8492C1B; Fri, 20 Jan 2023 13:48:40 +0000 (UTC) Message-ID: Date: Fri, 20 Jan 2023 14:48:39 +0100 MIME-Version: 1.0 Subject: Re: [PATCH v3 0/2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression To: devel@edk2.groups.io Cc: Ard Biesheuvel , Brijesh Singh , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Jordan Justen , Michael Brown , Min Xu , Oliver Steffen , Sebastien Boeuf , Tom Lendacky References: <20230119110131.91923-1-lersek@redhat.com> From: "Laszlo Ersek" In-Reply-To: <20230119110131.91923-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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 1/19/23 12:01, Laszlo Ersek wrote: > Repo: https://pagure.io/lersek/edk2.git > Branch: cpuhp-reg-catch-4250-v3 > Test build: https://github.com/tianocore/edk2/pull/3930 > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4250 > > v2 was posted at: > - http://mid.mail-archive.com/20230112082845.128463-1-lersek@redhat.com > - https://edk2.groups.io/g/devel/message/98336 > - https://listman.redhat.com/archives/edk2-devel-archive/2023-January/057634.html > > Please see the Notes sections of the patches, regarding the updates. > > The "PlatformCI_OvmfPkg_Windows_VS2019_PR" checks in test build linked > above time out again (as expected); now with the following debug log: > >> PlatformCpuCountBugCheck: Present=0 Possible=1 >> PlatformCpuCountBugCheck: Broken CPU hotplug register block found. Update QEMU to version 8+, or >> PlatformCpuCountBugCheck: to a stable release with commit dab30fbef389 backported. Refer to >> PlatformCpuCountBugCheck: . >> PlatformCpuCountBugCheck: Consequences of the QEMU bug may include, but are not limited to: >> PlatformCpuCountBugCheck: - all firmware logic, dependent on the CPU hotplug register block, >> PlatformCpuCountBugCheck: being confused, for example, multiprocessing-related logic; >> PlatformCpuCountBugCheck: - guest OS data loss, including filesystem corruption, due to crash or >> PlatformCpuCountBugCheck: hang during ACPI S3 resume; >> PlatformCpuCountBugCheck: - SMM privilege escalation, by a malicious guest OS or 3rd partty UEFI >> PlatformCpuCountBugCheck: agent, against the platform firmware. >> PlatformCpuCountBugCheck: These symptoms need not necessarily be limited to the QEMU user >> PlatformCpuCountBugCheck: attempting to hot(un)plug a CPU. >> PlatformCpuCountBugCheck: The firmware will now stop (hang) deliberately, in order to prevent the >> PlatformCpuCountBugCheck: above symptoms. >> PlatformCpuCountBugCheck: You can forcibly override the hang, *at your own risk*, with the >> PlatformCpuCountBugCheck: following *experimental* QEMU command line option: >> PlatformCpuCountBugCheck: -fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes >> PlatformCpuCountBugCheck: Please only report such bugs that you can reproduce *without* the >> PlatformCpuCountBugCheck: override. >> Select Item: 0x19 >> ASSERT d:\a\1\s\OvmfPkg\Library\PlatformInitLib\Platform.c(520): ((BOOLEAN)(0==1)) > > The "PlatformCI_OvmfPkg_Ubuntu_GCC5_PR" checks succed, probably due to > edk2 commits ef0916009843 ("CI: Use Fedora 35 container (Linux only)", > 2023-01-17) and 7fab007f33e9 ("OvmfPkg: CI: Use Fedora 35 container > (Linux only)", 2023-01-17), and due to > applying > the upstream QEMU patch. > > Laszlo > > Cc: Ard Biesheuvel > Cc: Brijesh Singh > Cc: Erdem Aktas > Cc: Gerd Hoffmann > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Michael Brown > Cc: Min Xu > Cc: Oliver Steffen > Cc: Sebastien Boeuf > Cc: Tom Lendacky > > Laszlo Ersek (2): > OvmfPkg/PlatformInitLib: factor out PlatformCpuCountBugCheck() > OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression > > OvmfPkg/Library/PlatformInitLib/Platform.c | 168 +++++++++++++++++--- > 1 file changed, 145 insertions(+), 23 deletions(-) > Merged as the last two commits in range 51411435d559..bf5678b58026, via . Laszlo