mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
5266426b21
The nec-usb-xhci device (which is a USB3 controller) has always presented itself as a PCI device when plugged into a legacy PCI slot, and a PCIe device when plugged into a PCIe slot, but libvirt has always auto-assigned it to a legacy PCI slot. This patch changes that behavior to auto-assign to a PCIe slot on systems that have pcie-root (e.g. Q35 and aarch64/virt). Since we don't yet auto-create pcie-*-port controllers on demand, this means a config with an nec-xhci USB controller that has no PCI address assigned will also need to have an otherwise-unused pcie-*-port controller specified: <controller type='pci' model='pcie-root-port'/> <controller type='usb' model='nec-xhci'/> (this assumes there is an otherwise-unused slot on pcie-root to accept the pcie-root-port)
68 lines
2.4 KiB
XML
68 lines
2.4 KiB
XML
<domain type='qemu'>
|
|
<name>q35-test</name>
|
|
<uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
|
|
<memory unit='KiB'>2097152</memory>
|
|
<currentMemory unit='KiB'>2097152</currentMemory>
|
|
<vcpu placement='static' cpuset='0-1'>2</vcpu>
|
|
<os>
|
|
<type arch='x86_64' machine='q35'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/libexec/qemu-kvm</emulator>
|
|
<controller type='pci' model='pcie-root'/>
|
|
<controller type='pci' model='dmi-to-pci-bridge'/>
|
|
<controller type='pci' model='pci-bridge'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='pci' model='pcie-root-port'/>
|
|
<controller type='virtio-serial'/>
|
|
<controller type='scsi' model='virtio-scsi'/>
|
|
<controller type='usb' model='nec-xhci'/>
|
|
<disk type='block' device='disk'>
|
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
|
<target dev='vdb' bus='virtio'/>
|
|
</disk>
|
|
<filesystem type='mount'>
|
|
<source dir='/export/to/guest'/>
|
|
<target dir='/import/from/host'/>
|
|
</filesystem>
|
|
<video>
|
|
<model type='virtio'/>
|
|
</video>
|
|
<interface type='user'>
|
|
<mac address='00:11:22:33:44:55'/>
|
|
<model type='virtio'/>
|
|
</interface>
|
|
<interface type='user'>
|
|
<mac address='00:11:22:33:44:66'/>
|
|
<model type='e1000e'/>
|
|
</interface>
|
|
<memballoon model='virtio'/>
|
|
<rng model='virtio'>
|
|
<rate bytes='123' period='1234'/>
|
|
<backend model='random'>/dev/urandom</backend>
|
|
</rng>
|
|
<input type='passthrough' bus='virtio'>
|
|
<source evdev='/dev/input/event1234'/>
|
|
</input>
|
|
<input type='mouse' bus='virtio'/>
|
|
<input type='keyboard' bus='virtio'/>
|
|
<input type='tablet' bus='virtio'/>
|
|
</devices>
|
|
</domain>
|