public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] OvmfPkg/PciHotPlugInitDxe: Do not reserve IO ports by default.
@ 2023-05-16  9:47 Gerd Hoffmann
  2023-05-25 15:47 ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2023-05-16  9:47 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Jordan Justen, Jiewen Yao, Gerd Hoffmann,
	Oliver Steffen, Pawel Polawski

Flip the default for IO address space reservations for PCI(e) bridges
and root ports with hotplug support from TRUE to FALSE.

PCI(e) bridges will still get IO address space assigned in case:

  (a) Downstream devices actually need IO address space, or
  (b) Explicit configuration, using "qemu -device
      pcie-root-port,io-reserve=<size>".

In case IO address space is exhausted edk2 will stop assigning resources
to PCI(e) bridges.  This is not limited to IO resources, the affected
bridges will not get any memory resources assigned either.

This patch solves this issue by not handing out the scare IO address
space, which is in most cases not needed anyway.  Result is a more
consistent PCI configuration in virtual machine configurations with many
PCie root ports.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c b/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
index 6b2b6797b3b6..69903a600981 100644
--- a/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
+++ b/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
@@ -589,7 +589,7 @@ GetResourcePadding (
     return EFI_INVALID_PARAMETER;
   }
 
-  DefaultIo       = TRUE;
+  DefaultIo       = FALSE;
   DefaultMmio     = TRUE;
   DefaultPrefMmio = TRUE;
 
-- 
2.40.1


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

end of thread, other threads:[~2023-05-29 11:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16  9:47 [PATCH 1/1] OvmfPkg/PciHotPlugInitDxe: Do not reserve IO ports by default Gerd Hoffmann
2023-05-25 15:47 ` Ard Biesheuvel
2023-05-29 11:41   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox