From: "Gerd Hoffmann" <kraxel@redhat.com>
To: Nicolas Ojeda Leon <ncoleon@amazon.com>
Cc: devel@edk2.groups.io, atugup@amazon.com, Alexander Graf <graf@amazon.de>
Subject: Re: [PATCH v3 4/8] Ovmf/PlatformPei: Use host-provided GPA end if available
Date: Fri, 28 Jan 2022 11:37:02 +0100 [thread overview]
Message-ID: <20220128103702.6iebujydrkzy6cri@sirius.home.kraxel.org> (raw)
In-Reply-To: <fbdaf49254bc8853ebd5056ea2383d3ba7dc034d.1643120206.git.ncoleon@amazon.com>
On Tue, Jan 25, 2022 at 03:30:11PM +0100, Nicolas Ojeda Leon wrote:
> Read the "hardware-info" item from fw-cfg to extract specifications
> of PCI host bridges and analyze the 64-bit apertures of them to
> find out the highest 64-bit MMIO address required which determines
> the address space required by the guest, and, consequently, the
> FirstNonAddress used to calculate size of physical addresses.
>
> Using the static PeiHardwareInfoLib, read the fw-cfg file of
> hardware information to extract, one by one, all the host
> bridges. Find the last 64-bit MMIO address of each host bridge,
> using the HardwareInfoPciHostBridgeLib API, and compare it to an
> accumulate value to discover the highest address used, which
> corresponds to the highest value that must be included in the
> guest's physical address space.
>
> Given that platforms with multiple host bridges may provide the PCI
> apertures' addresses, the memory detection logic must take into
> account that, if the host provided the MMIO windows that can and must
> be used, the guest needs to take those values. Therefore, if the
> MMIO windows are found in the host-provided fw-cfg file, skip all the
> logic calculating the physical address size and just use the value
> provided. Since each PCI host bridge corresponds to an element in
> the information provided by the host, each of these must be analyzed
> looking for the highest address used.
>
> Cc: Alexander Graf <graf@amazon.de>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
>
> Signed-off-by: Nicolas Ojeda Leon <ncoleon@amazon.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
next prev parent reply other threads:[~2022-01-28 10:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 14:30 [PATCH v3 0/8] Handling of multiple PCI host bridges specified Ojeda Leon, Nicolas
2022-01-25 14:30 ` [PATCH v3 1/8] OvmfPkg/Library: Create base HardwareInfoLib for PCI Host Bridges Ojeda Leon, Nicolas
2022-01-28 10:36 ` Gerd Hoffmann
2022-01-25 14:30 ` [PATCH v3 2/8] Ovmf/HardwareInfoLib: Create Pei lib to parse directly from fw-cfg Ojeda Leon, Nicolas
2022-01-28 10:36 ` Gerd Hoffmann
2022-01-25 14:30 ` [PATCH v3 3/8] Ovmf/HardwareInfoLib: Add Dxe lib to dynamically parse heterogenous data Ojeda Leon, Nicolas
2022-01-28 10:36 ` Gerd Hoffmann
2022-01-25 14:30 ` [PATCH v3 4/8] Ovmf/PlatformPei: Use host-provided GPA end if available Ojeda Leon, Nicolas
2022-01-28 10:37 ` Gerd Hoffmann [this message]
2022-01-25 14:35 ` [PATCH v3 5/8] OvmfPkg/PciHostBridgeUtilityLib: Initialize RootBridges apertures with spec Ojeda Leon, Nicolas
2022-01-28 10:41 ` [edk2-devel] " Gerd Hoffmann
2022-01-25 14:36 ` [PATCH v3 6/8] MdeModulePkg, OvmfPkg: Add Pcd token for PCI pre-populated BARs Ojeda Leon, Nicolas
2022-01-25 14:37 ` [PATCH v3 7/8] MdeModulePkg/Pci MdePkg: Create service to retrieve PCI base addresses Ojeda Leon, Nicolas
2022-01-28 10:52 ` [edk2-devel] " Gerd Hoffmann
2022-01-29 1:44 ` 回复: " gaoliming
2022-01-25 14:38 ` [PATCH v3 8/8] MdeModulePkg/PciBusDxe: Handling of pre-populated PCI BARs Ojeda Leon, Nicolas
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=20220128103702.6iebujydrkzy6cri@sirius.home.kraxel.org \
--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