mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
c026f8f1c2
Rather than only assigning a PCI address when no address is given at all, also do it when the config says that the address type is 'pci', but it gives no address (virDeviceInfoPCIAddressWanted()). There are also several places after parsing but prior to address assignment where code previously expected that any info with address type='pci' would have a *valid* PCI address, which isn't always the case - now we check not only for type='pci', but also for a valid address (virDeviceInfoPCIAddressPresent()). The test case added in this patch was directly copied from Cole's patch titled: qemu: Wire up address type=pci auto_allocate
36 lines
1008 B
XML
36 lines
1008 B
XML
<domain type='qemu'>
|
|
<name>fdr-br</name>
|
|
<uuid>3ec6cbe1-b5a2-4515-b800-31a61855df41</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='pc-1.2'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<devices>
|
|
<emulator>/usr/libexec/qemu-kvm</emulator>
|
|
<disk type='file' device='cdrom'>
|
|
<driver name='qemu' type='raw'/>
|
|
<source file='/var/iso/f18kde.iso'/>
|
|
<target dev='vda' bus='virtio'/>
|
|
<readonly/>
|
|
<address type='pci'/>
|
|
</disk>
|
|
<controller type='usb' index='0'>
|
|
<address type='pci'/>
|
|
</controller>
|
|
<controller type='ide' index='0'>
|
|
<address type='pci'/>
|
|
</controller>
|
|
<input type='mouse' bus='ps2'/>
|
|
<video>
|
|
<model type='cirrus' vram='16384' heads='1'/>
|
|
<address type='pci'/>
|
|
</video>
|
|
<memballoon model='virtio'>
|
|
<address type='pci'/>
|
|
</memballoon>
|
|
</devices>
|
|
</domain>
|