public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Oliver Steffen <osteffen@redhat.com>,
	Pawel Polawski <ppolawsk@redhat.com>
Subject: [PATCH 1/1] OvmfPkg/PciHotPlugInitDxe: Do not reserve IO ports by default.
Date: Tue, 16 May 2023 11:47:58 +0200	[thread overview]
Message-ID: <20230516094758.106631-1-kraxel@redhat.com> (raw)

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


             reply	other threads:[~2023-05-16  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  9:47 Gerd Hoffmann [this message]
2023-05-25 15:47 ` [PATCH 1/1] OvmfPkg/PciHotPlugInitDxe: Do not reserve IO ports by default Ard Biesheuvel
2023-05-29 11:41   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230516094758.106631-1-kraxel@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox