mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: don't add pci-bridge to Q35/arm domains unless it's needed
Until now, a Q35 domain (or arm/virt, or any other domain that has a pcie-root bus) would always have a pci-bridge added, so that there would be a hotpluggable standard PCI slot available to plug in any PCI devices that might be added. This patch removes the explicit add, instead relying on the pci-bridge being auto-added during PCI address assignment (it will add a pci-bridge if there are no free slots). This doesn't eliminate the dmi-to-pci-bridge controller that is explicitly added whether or not a standard PCI slot is required (and that is almost never used as anything other than a converter between pcie.0's PCIe slots and standard PCI). That will be done separately.
This commit is contained in:
parent
97b215a450
commit
d5fb8f4564
@ -1959,10 +1959,6 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
|
||||
!virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 1,
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE))
|
||||
goto cleanup;
|
||||
if (virDomainControllerFind(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 2) < 0 &&
|
||||
!virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 2,
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (addDefaultMemballoon && !def->memballoon) {
|
||||
|
@ -22,7 +22,6 @@ QEMU_AUDIO_DRV=none \
|
||||
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
|
||||
-dtb /aarch64.dtb \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
|
||||
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
|
||||
-device virtio-serial-device,id=virtio-serial0 \
|
||||
-usb \
|
||||
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
|
||||
|
@ -22,7 +22,6 @@ QEMU_AUDIO_DRV=none \
|
||||
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
|
||||
-dtb /aarch64.dtb \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
|
||||
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
|
||||
-device virtio-serial-device,id=virtio-serial0 \
|
||||
-usb \
|
||||
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
|
||||
|
@ -16,5 +16,4 @@ QEMU_AUDIO_DRV=none \
|
||||
-monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
|
||||
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e
|
||||
|
@ -37,11 +37,6 @@
|
||||
<model name='i82801b11-bridge'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='2'/>
|
||||
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='virtio-mmio'/>
|
||||
</controller>
|
||||
|
@ -22,11 +22,6 @@
|
||||
<model name='i82801b11-bridge'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='2'/>
|
||||
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
</controller>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<memballoon model='none'/>
|
||||
|
Loading…
Reference in New Issue
Block a user