|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH for-4.22 v2 2/2] x86/mcfg: relax memory map checks on newer firmware
On Thu, Jun 04, 2026 at 03:50:28PM +0200, Oleksii Kurochko wrote:
>
>
> On 6/4/26 3:25 PM, Roger Pau Monne wrote:
> > Per PCI Firmware 3.3 specification, section 4.1.2, ECAM space must be
> > reserved by declaring a motherboard resource, but there's no requirement to
> > mention it in E820. The specification additionally states that: the
> > resources can optionally be returned in Int15 E820h or EFIGetMemoryMap as
> > reserved memory.
> >
> > This fixes an issue with detection of extended capabilities when running
> > Xen on a Lenovo system that doesn't list the MCFG area as an
> > EfiMemoryMappedIO region (or as any other type) in the EFI memory map.
> >
> > The more strict logic was introduced in Linux in 2006 as 946f2ee5c731
> > ("[PATCH] i386/x86-64: Check that MCFG points to an e820 reserved area").
> > This was picked up by Xen when MCFG support was added in 3b35911d709e
> > ("Enable pci mmcfg and ATS for x86_64"). Apply an approach similar to
> > what Linux has done in 199f968f1484 ("x86/pci: Skip early E820 check for
> > ECAM region") and relax the strict reserved region checking so it's only
> > done for firmware manufactured prior to 2016. For firmware from 2016 and
> > newer allow MCFG region to reside in holes on the memory map. Note Xen is
> > still more strict than Linux however, as it will refuse to use MCFG regions
> > that overlap with memory map regions different than reserved.
> >
> > When dom0 boots it can prevent access to misconfigured MCFG regions by
> > using the PHYSDEVOP_pci_mmcfg_reserved hypercall. This brings Xen's early
> > usage of MCFG (prior to ACPI AML parsing) more in line with the
> > implementation in Linux.
>
> Don't we want to add Fixes: or Ammends: here?
Hm, when the code was added to Xen the checks were fine, that's why we
keep the existing behavior for firmware < 2016. The change here is to
cope with new firmware behavior, so I'm not sure we can reference a
commit from 2009 with a fixes tag when the new behavior only applies
to firmware > 2015.
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>
> Generally it looks low-risk patch so:
> Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |