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.133.124]) by mx.groups.io with SMTP id smtpd.web12.10830.1664891252084151359 for ; Tue, 04 Oct 2022 06:47:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cOkCDTuh; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664891251; 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=674fofyP+nFzVhmrmy5WvM6ifXhMfx5ObQRK489AfgU=; b=cOkCDTuhQhda+JLEztnMGYdTidxnPEJdDKZGsdg5Ztzlb9gFNeIdJauYn19I9YOv3kRLgl 1D7kEqFPwaUsYKPv9cFyhjXYx6oX1pT08w2/qPZtWcRbDjAsD72LNLDlyZ8Ulki7XkKY5l 7XmWoTCLAOU+gnNpTp8cJkBnv0dYO48= 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-664-nQcW8xAdOLSF5TXM8KcrjQ-1; Tue, 04 Oct 2022 09:47:30 -0400 X-MC-Unique: nQcW8xAdOLSF5TXM8KcrjQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BF61480A0AE; Tue, 4 Oct 2022 13:47:29 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.173]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B76940C6EC2; Tue, 4 Oct 2022 13:47:29 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0A3EC180060F; Tue, 4 Oct 2022 15:47:28 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jordan Justen , Gerd Hoffmann , Pawel Polawski , Jiewen Yao , Oliver Steffen , Ard Biesheuvel Subject: [PATCH v2 0/4] OvmfPkg: make better use of physical address space. Date: Tue, 4 Oct 2022 15:47:24 +0200 Message-Id: <20221004134728.55499-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit For historical reasons ovmf is quite conservative on address space usage, to play safe and avoid using more than 36 physical address bits (the guaranteed minimum) if possible. With devices (specifically GPUs) becoming larger and larger pci memory bars this becomes increasingly problematic. This patch series address that by trying to figure what the physical address space size is (which is a bit tricky, see patch #1 for details). If that worked scale up the 64-bit mmio window and also pcie bridge windows dynamically with the available address space. v2: - fix pcie bridge window logic, track prefetchable and non-prefetchable default state separately (Laszlo). Gerd Hoffmann (4): OvmfPkg/PlatformInitLib: qemu cpuid physbits detection OvmfPkg/PlatformInitLib: detect physical address space OvmfPkg/PlatformInitLib: dynamic mmio window size OvmfPkg/PciHotPlugInitDxe: reserve more mmio space OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf | 1 + OvmfPkg/Library/PlatformInitLib/MemDetect.c | 143 ++++++++++++++++--- OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c | 21 ++- 3 files changed, 145 insertions(+), 20 deletions(-) -- 2.37.3