From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 15 May 2019 03:36:28 -0700 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 21C2C66990; Wed, 15 May 2019 10:36:28 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-121.rdu2.redhat.com [10.10.120.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF84B5D706; Wed, 15 May 2019 10:36:23 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 0/4] OvmfPkg/PlatformPei: fix two assertion failures with weird RAM sizes From: "Laszlo Ersek" To: edk2-devel-groups-io , Ard Biesheuvel , Leif Lindholm , Michael Kinney , Andrew Fish Cc: devel@edk2.groups.io, lersek@redhat.com, Gerd Hoffmann , Jordan Justen References: <20190504000716.7525-1-lersek@redhat.com> Message-ID: Date: Wed, 15 May 2019 12:36:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190504000716.7525-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 15 May 2019 10:36:28 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Stewards, it seems likely that this patch series -- posted on 2019-May-04 -- will not receive the necessary maintainer A-b's / R-b's before we enter the soft feature freeze for edk2-stable201905. Therefore I'd like to state that I consider this series a bugfix series, not a feature addition. I'm now asking for confirmation that I'll be allowed to push the series -- dependent on the expected reviewer feedback of course -- even after 2019-May-17 08:00:00 UTC. Please also state whether I will need to open a TianoCore BZ for tracking this work (and to update the commit messages accordingly). I haven't done that because we already have two public BZs for the issue in the Red Hat Bugzilla instance, with issue description and analysis. (RHBZ references are captured in both the blurb below, and in the patches themselves.) Thanks Laszlo On 05/04/19 02:07, Laszlo Ersek wrote: > Repo: https://github.com/lersek/edk2.git > Branch: exbar_mtrr_rhbz_1666941 > Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941 > Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710 > > When booting OVMF on QEMU with "weird" RAM sizes, QEMU's low-RAM split > logic can trigger two assertion failures in OVMF: > > - conflict between PCIEXBAR (ECAM) and low-RAM, on q35, > > - running out of variable MTRRs when marking the uncacheable MMIO range > in 32-bit address space, on both i440fx and q35. > > This series fixes both issues, by moving around the PCIEXBAR on q35, and > by truncating the size of the uncacheable 32-bit area to a power of two. > The latter idea was inspired by SeaBIOS. > > Tested on both machine types, with the following memory sizes (all in > MB): 1025, 2815, 3583, 5120. On i440fx, the X64 build was used (without > SMM). On q35, the IA32 and IA32X64 builds were used (with SMM). Testing > included "/proc/mtrr" verification, 32-bit PCI MMIO aperture > verification, general dmesg checks, and my usual regression tests too > (ACPI S3, UEFI variable services, ...). > > Cc: Ard Biesheuvel > Cc: Gerd Hoffmann > Cc: Jordan Justen > > Thanks > Laszlo > > Laszlo Ersek (4): > OvmfPkg/PlatformPei: assign PciSize on both i440fx/q35 branches > explicitly > OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 > branching > OvmfPkg/PlatformPei: reorder the 32-bit PCI hole vs. the PCIEXBAR on > q35 > OvmfPkg/PlatformPei: fix MTRR for low-RAM sizes that have many bits > clear > > OvmfPkg/OvmfPkgIa32.dsc | 5 +---- > OvmfPkg/OvmfPkgIa32X64.dsc | 5 +---- > OvmfPkg/OvmfPkgX64.dsc | 5 +---- > OvmfPkg/PlatformPei/MemDetect.c | 23 +++++++++++++++++--- > OvmfPkg/PlatformPei/Platform.c | 14 +++++------- > OvmfPkg/PlatformPei/Platform.h | 2 ++ > 6 files changed, 31 insertions(+), 23 deletions(-) >