From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.17775.1684230484807456306 for ; Tue, 16 May 2023 02:48:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WLPOx8St; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684230483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=csWYVTOo/nyU2mGn4+6nmjUznrMwjN7yeK6Ckc3symE=; b=WLPOx8StF+PtoW3gjpWEnouulP5ypV8xGW/VJmTpKnKAHUvGAbyYLIQO7C7d6n/UzjB/Ae nESsdtK2oHvFB3LvRy8PiYNEPtXVqjxubL8sjKts0j2T7Clzs5gHDyIvPgpkbwwwPvQbAD ztZFHYVM2iwigvK2wOLy21mHGLlYo3U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-441-jrOSQ6IPMx6PeHRaDkSVJg-1; Tue, 16 May 2023 05:48:00 -0400 X-MC-Unique: jrOSQ6IPMx6PeHRaDkSVJg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3DEE1802A95; Tue, 16 May 2023 09:48:00 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE00335453; Tue, 16 May 2023 09:47:59 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1861218012EB; Tue, 16 May 2023 11:47:58 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jordan Justen , Jiewen Yao , Gerd Hoffmann , Oliver Steffen , Pawel Polawski Subject: [PATCH 1/1] OvmfPkg/PciHotPlugInitDxe: Do not reserve IO ports by default. Date: Tue, 16 May 2023 11:47:58 +0200 Message-Id: <20230516094758.106631-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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=". 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 --- 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