From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.201887.1673974206158863987 for ; Tue, 17 Jan 2023 08:50:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S0KxUDE/; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) 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 41BBDB8190F for ; Tue, 17 Jan 2023 16:50:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5FE9C433F0 for ; Tue, 17 Jan 2023 16:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673974202; bh=ywXSo3nCTCwzmNeQzQwa4S8TNXd8jHuraj2qqSY7zEA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=S0KxUDE/88/rzkLbhobmxIbtYjvKZ4QuO5A28ZKxSYB7EOYydqxrOuT12MCd/6qne NfbwdcQ5BvXIwehsra8R6DmUzbZhU2R0O0gcmKJaEnhswmw0cMR9bn+lMnDD9I9pEw tHFLBuEXTj1CYcY8oCY1x87tnBypHY7/qsKRQADQrIdC/OzmILxb3QgalryMidew8t 8WN5BwlSjKcvkhmJ1w9i67xiA/wLTuSzrZzDqgdAZWjQ8e9KOekHOe2hg/uiRrIZyO 07u2rlc39JnhVLaEObYtBPTIeAmKbnE6lmPs22CJgAN5UMdxf3/cFnjSc5sGm5tAHz 2vcAoEsJmte/Q== Received: by mail-lf1-f50.google.com with SMTP id g13so47954733lfv.7 for ; Tue, 17 Jan 2023 08:50:02 -0800 (PST) X-Gm-Message-State: AFqh2ko+fpqUdujteo7IhVyCNLeFGYyuqMdLztJqhGkrOroudsxxDK4Z L3WnM/hMeGzL25FJyIdc/Z1shuOY96niCbP/xf8= X-Google-Smtp-Source: AMrXdXvyU3O1OwDzSPDHI6fedKfwD/VPNm20Z9ZbqVVjHIhMmpfXor5USb+URXDMxPWuy1vsuPcskHDvCdXKpdMO3nY= X-Received: by 2002:a05:6512:3086:b0:4bc:bdf5:f163 with SMTP id z6-20020a056512308600b004bcbdf5f163mr197298lfd.583.1673974200896; Tue, 17 Jan 2023 08:50:00 -0800 (PST) MIME-Version: 1.0 References: <20221207053215.2527430-1-kraxel@redhat.com> <21f9bdc1-10fc-726f-9585-b84df8b414fa@amd.com> In-Reply-To: <21f9bdc1-10fc-726f-9585-b84df8b414fa@amd.com> From: "Ard Biesheuvel" Date: Tue, 17 Jan 2023 17:49:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformInitLib: pass through reservations from qemu To: Tom Lendacky Cc: devel@edk2.groups.io, kraxel@redhat.com, Laszlo Ersek , Oliver Steffen , Ard Biesheuvel , Jordan Justen , Jiewen Yao , Pawel Polawski Content-Type: text/plain; charset="UTF-8" On Mon, 16 Jan 2023 at 21:10, Tom Lendacky wrote: > > On 1/16/23 11:09, Ard Biesheuvel wrote: > > On Thu, 12 Jan 2023 at 18:09, Tom Lendacky wrote: > >> > >> On 12/6/22 23:32, Gerd Hoffmann via groups.io wrote: > >>> qemu uses the etc/e820 fw_cfg file not only for memory, but > >>> also for reservations. Handle reservations by adding resource > >>> descriptor hobs for them. > >>> > >>> A typical qemu configuration has a small reservation between > >>> lapic and flash: > >>> > >>> # sudo cat /proc/iomem > >>> [ ... ] > >>> fee00000-fee00fff : Local APIC > >>> feffc000-feffffff : Reserved <= HERE > >>> ffc00000-ffffffff : Reserved > >>> [ ... ] > >>> > >>> Signed-off-by: Gerd Hoffmann > >> > >> On newer versions of Qemu, this patch causes a boot failure on my > >> AMD system with the following output: > >> > >> ... > >> PciHostBridgeUtilityInitRootBridge: populated root bus 0, with room for 255 subordinate bus(es) > >> RootBridge: PciRoot(0x0) > >> Support/Attr: 70069 / 70069 > >> DmaAbove4G: No > >> NoExtConfSpace: No > >> AllocAttr: 3 (CombineMemPMem Mem64Decode) > >> Bus: 0 - FF Translation=0 > >> Io: 6000 - FFFF Translation=0 > >> Mem: C0000000 - FBFFFFFF Translation=0 > >> MemAbove4G: E000000000 - FFFFFFFFFF Translation=0 > >> PMem: FFFFFFFFFFFFFFFF - 0 Translation=0 > >> PMemAbove4G: FFFFFFFFFFFFFFFF - 0 Translation=0 > >> PciHostBridgeDxe: IntersectMemoryDescriptor: desc [FD00000000, 10000000000) type 1 cap 8000000000026000 conflicts with aperture [E000000000, 10000000000) cap 1 > >> > >> ASSERT_EFI_ERROR (Status = Invalid Parameter) > >> ASSERT [PciHostBridgeDxe] /root/kernels/ovmf-build-X64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c(550): !(((INTN)(RETURN_STATUS)(Status)) < 0) > >> > >> Doing some bisecting, before Qemu patch > >> > >> 8504f129450b ("i386/pc: relocate 4g start to 1T where applicable") > >> > >> this issue wasn't observed. And before this OVMF patch, the newer version > >> of Qemu doesn't have an issue. > >> > >> Also, if I add host-phys-bits=true to the Qemu -cpu parameter, then > >> the issue isn't observed regardless of Qemu/OVMF level. > >> > >> I'm hoping someone has an understanding of what is going on and what > >> can be done to fix it. > >> > > > > Could someone look into this please? Gerd? > > Looks like Gerd is already on it. > > See https://bugzilla.tianocore.org/show_bug.cgi?id=4251 > Right, I didn't realize these things were related. In any case, those patches have been merged now - care to check whether the issue has been resolved? Thanks.