linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RESEND: MMCONFIG related question
@ 2023-01-13 10:15 Duan, Zhenzhong
  2023-01-13 13:53 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Duan, Zhenzhong @ 2023-01-13 10:15 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-kernel, Yang, Lixiao, Peng, Chao P

(Resend due to format issue)

Hi Helgaas,

Recently Lixiao reported sriov disappered for cards which supported sriov. We found it's related to commit "07eab0901ed efi/x86: Remove EfiMemoryMappedIO from E820 map" which removed EfiMemoryMappedIO regions from E820 map which lead to pci_mmcfg_reject_broken() check failed, raw_pci_ext_ops isn't set to pci_mmcfg finally, below is the related log. I know maybe bios should add MMCONFIG region into ACPI motherboard resources, just want to ask if we would support the case when MMCONFIG is missed in ACPI motherboard resources as I see it's treated as "Firmware Info" not "Firmware bug". Thanks

Also has another question, if MMCONFIG happened to be in EfiMemoryMappedIO, even if it's removed from E820 map so that there is no CRS clip for that region, could it be used for BAR space? Will there be conflict for BAR and MMCONFIG access?

[    0.000000] efi: EFI v2.60 by EDK II BIOS ID:SE5C620.86B.01.00.0763.022420181017
[    0.000000] efi: SMBIOS=0x6ae78000 ACPI=0x6bbab000 ACPI 2.0=0x6bbab014 MEMATTR=0x67e99018 MOKvar=0x67b2d000
[    0.000000] efi: Not removing mem06: MMIO range=[0xfe000000-0xfe010fff] (68KB) from e820 map
[    0.000000] efi: Remove mem09: MMIO range=[0x80000000-0x8fffffff] (256MB) from e820 map
[    0.000000] e820: remove [mem 0x80000000-0x8fffffff] reserved
[    3.351098] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000)
[    3.351742] PCI: not using MMCONFIG
[    4.867853] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000)
[    4.904325] [Firmware Info]: PCI: MMCONFIG at [mem 0x80000000-0x8fffffff] not reserved in ACPI motherboard resources
[    4.905061] PCI: not using MMCONFIG

Regards
Zhenzhong

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RESEND: MMCONFIG related question
  2023-01-13 10:15 RESEND: MMCONFIG related question Duan, Zhenzhong
@ 2023-01-13 13:53 ` Bjorn Helgaas
  2023-01-16  1:53   ` Duan, Zhenzhong
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2023-01-13 13:53 UTC (permalink / raw)
  To: Duan, Zhenzhong; +Cc: bhelgaas, linux-kernel, Yang, Lixiao, Peng, Chao P

On Fri, Jan 13, 2023 at 10:15:45AM +0000, Duan, Zhenzhong wrote:
> Recently Lixiao reported sriov disappered for cards which supported
> sriov. We found it's related to commit "07eab0901ed efi/x86: Remove
> EfiMemoryMappedIO from E820 map" which removed EfiMemoryMappedIO
> regions from E820 map which lead to pci_mmcfg_reject_broken() check
> failed, raw_pci_ext_ops isn't set to pci_mmcfg finally, below is the
> related log. I know maybe bios should add MMCONFIG region into ACPI
> motherboard resources, just want to ask if we would support the case
> when MMCONFIG is missed in ACPI motherboard resources as I see it's
> treated as "Firmware Info" not "Firmware bug". Thanks

The patches here:
https://lore.kernel.org/linux-pci/20230110180243.1590045-1-helgaas@kernel.org/
should resolve this problem.

> Also has another question, if MMCONFIG happened to be in
> EfiMemoryMappedIO, even if it's removed from E820 map so that there
> is no CRS clip for that region, could it be used for BAR space?

MMCONFIG cannot be used for BAR space.  MMCONFIG should be reported
via PNP0C02 _CRS.  BAR space, i.e., a PCI host bridge aperture, should
be reported via PNP0A03 _CRS.

> Will there be conflict for BAR and MMCONFIG access?

I don't think so, but I don't completely understand the scenario
you're asking about.

The E820 clipping of PCI host bridge windows is only intended to work
around an issue where PNP0A03 _CRS reports space that is not part of
the host bridge windows.  E.g., there were a few platforms that seemed
to report host bridge register space via _CRS.

Bjorn

> [    0.000000] efi: EFI v2.60 by EDK II BIOS ID:SE5C620.86B.01.00.0763.022420181017
> [    0.000000] efi: SMBIOS=0x6ae78000 ACPI=0x6bbab000 ACPI 2.0=0x6bbab014 MEMATTR=0x67e99018 MOKvar=0x67b2d000
> [    0.000000] efi: Not removing mem06: MMIO range=[0xfe000000-0xfe010fff] (68KB) from e820 map
> [    0.000000] efi: Remove mem09: MMIO range=[0x80000000-0x8fffffff] (256MB) from e820 map
> [    0.000000] e820: remove [mem 0x80000000-0x8fffffff] reserved
> [    3.351098] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000)
> [    3.351742] PCI: not using MMCONFIG
> [    4.867853] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000)
> [    4.904325] [Firmware Info]: PCI: MMCONFIG at [mem 0x80000000-0x8fffffff] not reserved in ACPI motherboard resources
> [    4.905061] PCI: not using MMCONFIG
> 
> Regards
> Zhenzhong

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: RESEND: MMCONFIG related question
  2023-01-13 13:53 ` Bjorn Helgaas
@ 2023-01-16  1:53   ` Duan, Zhenzhong
  0 siblings, 0 replies; 3+ messages in thread
From: Duan, Zhenzhong @ 2023-01-16  1:53 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: bhelgaas, linux-kernel, Yang, Lixiao, Peng, Chao P



>-----Original Message-----
>From: Bjorn Helgaas <helgaas@kernel.org>
>Sent: Friday, January 13, 2023 9:54 PM
>To: Duan, Zhenzhong <zhenzhong.duan@intel.com>
>Cc: bhelgaas@google.com; linux-kernel@vger.kernel.org; Yang, Lixiao
><lixiao.yang@intel.com>; Peng, Chao P <chao.p.peng@intel.com>
>Subject: Re: RESEND: MMCONFIG related question
>
>On Fri, Jan 13, 2023 at 10:15:45AM +0000, Duan, Zhenzhong wrote:
>> Recently Lixiao reported sriov disappered for cards which supported
>> sriov. We found it's related to commit "07eab0901ed efi/x86: Remove
>> EfiMemoryMappedIO from E820 map" which removed
>EfiMemoryMappedIO
>> regions from E820 map which lead to pci_mmcfg_reject_broken() check
>> failed, raw_pci_ext_ops isn't set to pci_mmcfg finally, below is the
>> related log. I know maybe bios should add MMCONFIG region into ACPI
>> motherboard resources, just want to ask if we would support the case
>> when MMCONFIG is missed in ACPI motherboard resources as I see it's
>> treated as "Firmware Info" not "Firmware bug". Thanks
>
>The patches here:
>https://lore.kernel.org/linux-pci/20230110180243.1590045-1-
>helgaas@kernel.org/
>should resolve this problem.
Will try.

>
>> Also has another question, if MMCONFIG happened to be in
>> EfiMemoryMappedIO, even if it's removed from E820 map so that there is
>> no CRS clip for that region, could it be used for BAR space?
>
>MMCONFIG cannot be used for BAR space.  MMCONFIG should be reported
>via PNP0C02 _CRS.  BAR space, i.e., a PCI host bridge aperture, should be
>reported via PNP0A03 _CRS.
>
>> Will there be conflict for BAR and MMCONFIG access?
>
>I don't think so, but I don't completely understand the scenario you're asking
>about.
I mean the case when MMCONFIG space reported by ACPI table overlap with PCI host bridge aperture reported by PNP0A03 _CRS. Just realized this case should be firmware bug, sorry for confusing.

>
>The E820 clipping of PCI host bridge windows is only intended to work around
>an issue where PNP0A03 _CRS reports space that is not part of the host bridge
>windows.  E.g., there were a few platforms that seemed to report host bridge
>register space via _CRS.
Understood, thanks Bjorn.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-16  1:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 10:15 RESEND: MMCONFIG related question Duan, Zhenzhong
2023-01-13 13:53 ` Bjorn Helgaas
2023-01-16  1:53   ` Duan, Zhenzhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).