> -----Original Message----- > From: Tushar Dave <[email protected]> > Sent: 16 September 2026 19:56 > To: [email protected] > Cc: [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; Alex Williamson > <[email protected]>; Jason Gunthorpe <[email protected]>; Shameer > Kolothum Thodi <[email protected]> > Subject: [PATCH 4/5] hw/arm/virt: export fixed BAR metadata via fw_cfg > > Export fixed BAR metadata from the virt machine through the > "etc/fixed-bars" fw_cfg file during machine initialization. > > Fixed BAR placement requires firmware to preserve the PCI resource > configuration established by QEMU. ACPI provides this via the PCI > boot configuration preservation mechanism, _DSM function 5. > > Reject fixed BAR configuration when ACPI is disabled, and request PCI > boot configuration preservation when ACPI is enabled. > > Signed-off-by: Tushar Dave <[email protected]> > --- > hw/arm/virt.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 3eecf094bc..c5db663858 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -95,6 +95,7 @@ > #include "hw/cxl/cxl_host.h" > #include "qemu/guest-random.h" > #include "hw/watchdog/sbsa_gwdt.h" > +#include "hw/pci/pci-fixed-bar.h" > > static GlobalProperty arm_virt_compat_defaults[] = { > { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "48" }, > @@ -2438,6 +2439,21 @@ void virt_machine_done(Notifier *notifier, void > *data) > vms->memmap[VIRT_PLATFORM_BUS].size, > vms->irqmap[VIRT_PLATFORM_BUS]); > } > + if (fixed_bars_write_blob(vms->fw_cfg, > + vms->memmap[VIRT_PCIE_MMIO].base, > + vms->memmap[VIRT_PCIE_MMIO].size, > + vms->memmap[VIRT_HIGH_PCIE_MMIO].base, > + vms->memmap[VIRT_HIGH_PCIE_MMIO].size)) { Should we check for vms->highmem_mmio here? The memmap entry still contains a base and size when highmem-mmio=off, but the aperture is not mapped or advertised in ACPI. > + if (!virt_is_acpi_enabled(vms)) { virt_is_acpi_enabled() merely checks that ACPI is not explicitly disabled. With the default acpi=auto, it returns true even for direct kernel boot without firmware. Should check vms->bootinfo.firmware_loaded as well. Thanks, Shameer -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#122209): https://edk2.groups.io/g/devel/message/122209 Mute This Topic: https://groups.io/mt/121285946/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 4/5] hw/arm/virt: export fixed BAR metadata via fw_cfg
Shameer Kolothum Thodi via groups.io Tue, 27 Oct 2026 09:47:00 -0700
- [edk2-devel] [PATCH 0/5] hw/pci, hw/a... Tushar Dave via groups.io
- [edk2-devel] [PATCH 3/5] pci: ad... Tushar Dave via groups.io
- Re: [edk2-devel] [PATCH 3/5]... Shameer Kolothum Thodi via groups.io
- Re: [edk2-devel] [PATCH ... Tushar Dave via devel
- [edk2-devel] [PATCH 1/5] hw/pci:... Tushar Dave via groups.io
- Re: [edk2-devel] [PATCH 1/5]... Shameer Kolothum Thodi via groups.io
- Re: [edk2-devel] [PATCH ... Tushar Dave via groups.io
- [edk2-devel] [PATCH 4/5] hw/arm/... Tushar Dave via groups.io
- Re: [edk2-devel] [PATCH 4/5]... Shameer Kolothum Thodi via groups.io
- Re: [edk2-devel] [PATCH ... Tushar Dave via devel
- [edk2-devel] [PATCH 2/5] pci: ad... Tushar Dave via groups.io
- Re: [edk2-devel] [PATCH 2/5]... Shameer Kolothum Thodi via groups.io
- Re: [edk2-devel] [PATCH ... Tushar Dave via devel
- [edk2-devel] [PATCH 5/5] hw/arm/... Tushar Dave via groups.io
- Re: [edk2-devel] [PATCH 5/5]... Shameer Kolothum Thodi via groups.io
- Re: [edk2-devel] [PATCH ... Tushar Dave via devel
