Skip to contentSkip to conversation

docs: add slot when adding new PCIe root port

PATCH New Vincent Bernat 1 participant 1 message Jun 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: add slot when adding new PCIe root port

Without providing a specific slot, QEMU won't be able to create the second additional PCIe root port with the following error:

    $ qemu-system-x86_64 [...] -machine q35 \
Quoted 2 lines
   -device pcie-root-port,bus=pcie.0,id=rp1 \
   -device pcie-root-port,bus=pcie.0,id=rp2

qemu-system-x86_64: -device pcie-root-port,bus=pcie.0,id=rp2:
Can't add chassis slot, error -16

This is due to the fact they both try to use slot 0. Update the documentation to specify a slot for each new PCIe root port.

---
 docs/pcie_pci_bridge.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
docs/pcie_pci_bridge.txt +3 -3
index ab35ebf3cae5..1aa08fc5f0c0 100644
@@ -70,9 +70,9 @@ A detailed command line would be:
 
 [qemu-bin + storage options] \
 -m 2G \
--device pcie-root-port,bus=pcie.0,id=rp1 \
--device pcie-root-port,bus=pcie.0,id=rp2 \
--device pcie-root-port,bus=pcie.0,id=rp3,bus-reserve=1 \
+-device pcie-root-port,bus=pcie.0,id=rp1,slot=1 \
+-device pcie-root-port,bus=pcie.0,id=rp2,slot=2 \
+-device pcie-root-port,bus=pcie.0,id=rp3,slot=3,bus-reserve=1 \
 -device pcie-pci-bridge,id=br1,bus=rp1 \
 -device pcie-pci-bridge,id=br2,bus=rp2 \
 -device e1000,bus=br1,addr=8
Signature · 1 line
2.32.0