Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365619 - [PCI] The default MMIO range reserved by firmware for PCI bridges is not enough to hotplug virtio-1 devices
Summary: [PCI] The default MMIO range reserved by firmware for PCI bridges is not enou...
Keywords:
Status: CLOSED DUPLICATE of bug 1365613
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ovmf
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Laszlo Ersek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1365613 1365623
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-09 17:26 UTC by Marcel Apfelbaum
Modified: 2016-09-08 09:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1365613
Environment:
Last Closed: 2016-09-08 09:39:15 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1332408 None CLOSED Q35 machine can not hot-plug scsi controller under switch 2019-03-05 15:03:25 UTC

Internal Links: 1332408

Description Marcel Apfelbaum 2016-08-09 17:26:21 UTC
+++ This bug was initially created as a clone of Bug #1365613 +++

The virtio 1.0 devices need 8MB MMIO space while SeaBIOS(OVMF?) reserves only 2MB.

The reason the firmware reserves 'only' 2MB MMIO is because it is the minimum allowed by the PCI Spec. It will be unreasonable to default in firmware to a larger MMIO window because it is related only 2 virtio. What about assigned devices that may need more?

I propose the following solution. Add a mmio-window-size parameter to pci bridges and pass all the information to firmware using a para-virt channel like fwconfig.

The firmware can use this info to increase the mmio range for our devices.

We can default the mmio-window-size to 8MB for PCIe ports (which are seen by the firmware as PCI bridges). This will allow hot-plugging virtio-1 devices into PCIe ports with no problem.

Regarding the legacy pci-bridges, the default size is not so clear. I propose to
leave it as is with the following reasoning: On pc 'legacy' machines it is likely we don't need to hotplug virtio-1 'modern' devices, just hotplug virtio 0.9 devices instead.  

Side-note:
Some guests, Linux for example, will try to re-balance the PCI root bus MMIO space and assign to pci-bridges/pcie-ports more memory space. Sometimes the guest OS will succeed and sometimes not.

Comment 1 Marcel Apfelbaum 2016-08-09 17:29:50 UTC
If the mechanism will be accepted upstream, OVMF should use the corresponding fw_cfg to set the size of the pci bridge ranges.

Comment 2 Laszlo Ersek 2016-09-08 09:39:15 UTC
The issue has been solved in upstream QEMU, with a QEMU-only patch. The QEMU item is tracked by clone-origin bug 1365613, so I'm closing this one as a duplicate thereof.

*** This bug has been marked as a duplicate of bug 1365613 ***


Note You need to log in before you can comment on or make changes to this bug.