mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: prefer 00:1D.x and 00:1A.x for USB2 controllers on Q35
The real Q35 machine puts the first USB controller set (EHCI+(UHCIx4)) on bus 0 slot 0x1D, and the 2nd USB controller set on bus 0 slot 0x1A, so let's attempt to make the virtual machine match that for controllers with auto-assigned addresses when possible. Three test cases were added to assure that the proper addresses are assigned - one with a single set of unaddressed USB controllers, one with 3 (to grab both preferred slots plus one more), and one with the order of the controller definitions reordered, to assure that the auto-assignment isn't mixed up by order.
This commit is contained in:
parent
7dbb5fce06
commit
163338ec28
@ -2068,6 +2068,47 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CONTROLLER_TYPE_USB:
|
||||
if ((def->controllers[i]->model
|
||||
== VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1) &&
|
||||
(def->controllers[i]->info.type
|
||||
== VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)) {
|
||||
/* Try to assign the first found USB2 controller to
|
||||
* 00:1D.0 and 2nd to 00:1A.0 (because that is their
|
||||
* standard location on real Q35 hardware) unless they
|
||||
* are already taken, but don't insist on it.
|
||||
*
|
||||
* (NB: all other controllers at the same index will
|
||||
* get assigned to the same slot as the UHCI1 when
|
||||
* addresses are later assigned to all devices.)
|
||||
*/
|
||||
bool assign = false;
|
||||
|
||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||
tmp_addr.slot = 0x1D;
|
||||
if (!virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) {
|
||||
assign = true;
|
||||
} else {
|
||||
tmp_addr.slot = 0x1A;
|
||||
if (!virDomainPCIAddressSlotInUse(addrs, &tmp_addr))
|
||||
assign = true;
|
||||
}
|
||||
if (assign) {
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr,
|
||||
flags, false, true) < 0)
|
||||
goto cleanup;
|
||||
def->controllers[i]->info.type
|
||||
= VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
|
||||
def->controllers[i]->info.addr.pci.domain = 0;
|
||||
def->controllers[i]->info.addr.pci.bus = 0;
|
||||
def->controllers[i]->info.addr.pci.slot = tmp_addr.slot;
|
||||
def->controllers[i]->info.addr.pci.function = 0;
|
||||
def->controllers[i]->info.addr.pci.multi
|
||||
= VIR_TRISTATE_SWITCH_ON;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CONTROLLER_TYPE_PCI:
|
||||
if (def->controllers[i]->model == VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE &&
|
||||
def->controllers[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
||||
@ -2541,9 +2582,11 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
|
||||
bool foundAddr = false;
|
||||
|
||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||
for (j = 0; j < i; j++) {
|
||||
for (j = 0; j < def->ncontrollers; j++) {
|
||||
if (IS_USB2_CONTROLLER(def->controllers[j]) &&
|
||||
def->controllers[j]->idx == def->controllers[i]->idx) {
|
||||
def->controllers[j]->idx == def->controllers[i]->idx &&
|
||||
def->controllers[j]->info.type
|
||||
== VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
|
||||
addr = def->controllers[j]->info.addr.pci;
|
||||
foundAddr = true;
|
||||
break;
|
||||
@ -2553,6 +2596,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
|
||||
switch (def->controllers[i]->model) {
|
||||
case VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1:
|
||||
addr.function = 7;
|
||||
addr.multi = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
break;
|
||||
case VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1:
|
||||
addr.function = 0;
|
||||
@ -2560,9 +2604,11 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
|
||||
break;
|
||||
case VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI2:
|
||||
addr.function = 1;
|
||||
addr.multi = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
break;
|
||||
case VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI3:
|
||||
addr.function = 2;
|
||||
addr.multi = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2581,7 +2627,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
|
||||
}
|
||||
/* Finally we can reserve the slot+function */
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &addr, flags,
|
||||
false, false) < 0)
|
||||
false, foundAddr) < 0)
|
||||
goto error;
|
||||
|
||||
def->controllers[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
|
||||
|
40
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-multi.args
Normal file
40
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-multi.args
Normal file
@ -0,0 +1,40 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/libexec/qemu-kvm \
|
||||
-name q35-test \
|
||||
-S \
|
||||
-M q35 \
|
||||
-m 2048 \
|
||||
-smp 2 \
|
||||
-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
|
||||
-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x1 \
|
||||
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
|
||||
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,\
|
||||
addr=0x1d \
|
||||
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
|
||||
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 \
|
||||
-device ich9-usb-ehci1,id=usb1,bus=pcie.0,addr=0x1a.0x7 \
|
||||
-device ich9-usb-uhci1,masterbus=usb1.0,firstport=0,bus=pcie.0,multifunction=on,\
|
||||
addr=0x1a \
|
||||
-device ich9-usb-uhci2,masterbus=usb1.0,firstport=2,bus=pcie.0,addr=0x1a.0x1 \
|
||||
-device ich9-usb-uhci3,masterbus=usb1.0,firstport=4,bus=pcie.0,addr=0x1a.0x2 \
|
||||
-device ich9-usb-ehci1,id=usb2,bus=pci.2,addr=0x1.0x7 \
|
||||
-device ich9-usb-uhci1,masterbus=usb2.0,firstport=0,bus=pci.2,multifunction=on,\
|
||||
addr=0x1 \
|
||||
-device ich9-usb-uhci2,masterbus=usb2.0,firstport=2,bus=pci.2,addr=0x1.0x1 \
|
||||
-device ich9-usb-uhci3,masterbus=usb2.0,firstport=4,bus=pci.2,addr=0x1.0x2 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
|
||||
-device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \
|
||||
-vga qxl \
|
||||
-global qxl-vga.ram_size=67108864 \
|
||||
-global qxl-vga.vram_size=33554432
|
47
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-multi.xml
Normal file
47
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-multi.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<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>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
|
||||
<model name='i82801b11-bridge'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci3'/>
|
||||
<controller type='usb' index='1' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci1'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci3'/>
|
||||
<controller type='usb' index='2' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci1'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci3'/>
|
||||
<video>
|
||||
<model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
|
||||
</video>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
40
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-reorder.args
Normal file
40
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-reorder.args
Normal file
@ -0,0 +1,40 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/libexec/qemu-kvm \
|
||||
-name q35-test \
|
||||
-S \
|
||||
-M q35 \
|
||||
-m 2048 \
|
||||
-smp 2 \
|
||||
-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
|
||||
-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x1 \
|
||||
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
|
||||
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,\
|
||||
addr=0x1d \
|
||||
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
|
||||
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 \
|
||||
-device ich9-usb-ehci1,id=usb1,bus=pcie.0,addr=0x1a.0x7 \
|
||||
-device ich9-usb-uhci1,masterbus=usb1.0,firstport=0,bus=pcie.0,multifunction=on,\
|
||||
addr=0x1a \
|
||||
-device ich9-usb-uhci3,masterbus=usb1.0,firstport=4,bus=pcie.0,addr=0x1a.0x2 \
|
||||
-device ich9-usb-uhci2,masterbus=usb1.0,firstport=2,bus=pcie.0,addr=0x1a.0x1 \
|
||||
-device ich9-usb-ehci1,id=usb2,bus=pci.2,addr=0x1.0x7 \
|
||||
-device ich9-usb-uhci3,masterbus=usb2.0,firstport=4,bus=pci.2,addr=0x1.0x2 \
|
||||
-device ich9-usb-uhci2,masterbus=usb2.0,firstport=2,bus=pci.2,addr=0x1.0x1 \
|
||||
-device ich9-usb-uhci1,masterbus=usb2.0,firstport=0,bus=pci.2,multifunction=on,\
|
||||
addr=0x1 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
|
||||
-device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \
|
||||
-vga qxl \
|
||||
-global qxl-vga.ram_size=67108864 \
|
||||
-global qxl-vga.vram_size=33554432
|
47
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-reorder.xml
Normal file
47
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2-reorder.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<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>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
|
||||
<model name='i82801b11-bridge'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci3'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci1'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci3'/>
|
||||
<controller type='usb' index='0' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='2' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci3'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='1' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci1'/>
|
||||
<video>
|
||||
<model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
|
||||
</video>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
30
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.args
Normal file
30
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.args
Normal file
@ -0,0 +1,30 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/libexec/qemu-kvm \
|
||||
-name q35-test \
|
||||
-S \
|
||||
-M q35 \
|
||||
-m 2048 \
|
||||
-smp 2 \
|
||||
-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
|
||||
-device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x1 \
|
||||
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
|
||||
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,\
|
||||
addr=0x1d \
|
||||
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
|
||||
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
|
||||
-device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \
|
||||
-vga qxl \
|
||||
-global qxl-vga.ram_size=67108864 \
|
||||
-global qxl-vga.vram_size=33554432
|
39
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.xml
Normal file
39
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<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>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
|
||||
<model name='i82801b11-bridge'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci2'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci3'/>
|
||||
<video>
|
||||
<model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
|
||||
</video>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -1515,6 +1515,27 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_ICH9_AHCI,
|
||||
QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4);
|
||||
DO_TEST("q35-usb2",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
||||
QEMU_CAPS_ICH9_AHCI,
|
||||
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
||||
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
||||
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
||||
DO_TEST("q35-usb2-multi",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
||||
QEMU_CAPS_ICH9_AHCI,
|
||||
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
||||
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
||||
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
||||
DO_TEST("q35-usb2-reorder",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
||||
QEMU_CAPS_ICH9_AHCI,
|
||||
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
||||
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
||||
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
||||
DO_TEST("pcie-root-port",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
||||
|
66
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml
Normal file
66
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-multi.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<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>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
|
||||
<model name='i82801b11-bridge'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='usb' index='1' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='usb' index='1' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='1' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='usb' index='2' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='usb' index='2' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='2' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'/>
|
||||
<video>
|
||||
<model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
|
||||
</video>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
66
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml
Normal file
66
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2-reorder.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<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>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
|
||||
<model name='i82801b11-bridge'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='usb' index='1' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='1' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='usb' index='1' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='usb' index='1' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='2' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='2' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='usb' index='2' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='2' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'/>
|
||||
<video>
|
||||
<model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
|
||||
</video>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
46
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml
Normal file
46
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-usb2.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<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>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='pci' index='0' model='pcie-root'/>
|
||||
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
|
||||
<model name='i82801b11-bridge'/>
|
||||
</controller>
|
||||
<controller type='pci' index='2' model='pci-bridge'>
|
||||
<model name='pci-bridge'/>
|
||||
<target chassisNr='56'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-ehci1'/>
|
||||
<controller type='usb' index='0' model='ich9-uhci1'>
|
||||
<master startport='0'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci2'>
|
||||
<master startport='2'/>
|
||||
</controller>
|
||||
<controller type='usb' index='0' model='ich9-uhci3'>
|
||||
<master startport='4'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'/>
|
||||
<video>
|
||||
<model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
|
||||
</video>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -518,6 +518,9 @@ mymain(void)
|
||||
DO_TEST_DIFFERENT("pci-autoadd-idx");
|
||||
DO_TEST_DIFFERENT("pcie-root");
|
||||
DO_TEST_DIFFERENT("q35");
|
||||
DO_TEST_DIFFERENT("q35-usb2");
|
||||
DO_TEST_DIFFERENT("q35-usb2-multi");
|
||||
DO_TEST_DIFFERENT("q35-usb2-reorder");
|
||||
DO_TEST("pcie-root-port");
|
||||
DO_TEST("pcie-root-port-too-many");
|
||||
DO_TEST("pcie-switch-upstream-port");
|
||||
|
Loading…
x
Reference in New Issue
Block a user