diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-12-14 19:36:42 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-01-18 13:55:56 +0000 |
commit | 16658da4e76ea9e57440f569d0c945403cda2b56 (patch) | |
tree | 2c97ca4b5e97bb8f47f4dbc33a41390ff1dc7a11 /tests | |
parent | Convert USB input devices to -device (diff) | |
download | libvirt-16658da4e76ea9e57440f569d0c945403cda2b56.tar.gz libvirt-16658da4e76ea9e57440f569d0c945403cda2b56.tar.bz2 libvirt-16658da4e76ea9e57440f569d0c945403cda2b56.zip |
Convert PCI device assignment over to -device
The old syntax is
-pcidevice host=BUS:SLOT:FUNCTION
The new syntax is
-device pci-assign,host=BUS:SLOT:FUNCTION,addr=<PCI SLOT>,id=host0
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args | 1 | ||||
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml | 27 | ||||
-rw-r--r-- | tests/qemuxml2argvtest.c | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args new file mode 100644 index 000000000..f1865ee7d --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args @@ -0,0 +1 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest2 -usb -device pci-assign,host=06:12.5,id=hostpci0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml new file mode 100644 index 000000000..ac5ad47ec --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml @@ -0,0 +1,27 @@ +<domain type='qemu'> + <name>QEMUGuest2</name> + <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> + <memory>219200</memory> + <currentMemory>219200</currentMemory> + <vcpu>1</vcpu> + <os> + <type arch='i686' machine='pc'>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/bin/qemu</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest2'/> + <target dev='hda' bus='ide'/> + </disk> + <hostdev mode='subsystem' type='pci' managed='yes'> + <source> + <address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/> + </source> + </hostdev> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2042e2a75..2a2387ed2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -301,6 +301,7 @@ mymain(int argc, char **argv) DO_TEST("hostdev-usb-address", 0); DO_TEST("hostdev-usb-address-device", QEMUD_CMD_FLAG_DEVICE); DO_TEST("hostdev-pci-address", QEMUD_CMD_FLAG_PCIDEVICE); + DO_TEST("hostdev-pci-address-device", QEMUD_CMD_FLAG_PCIDEVICE|QEMUD_CMD_FLAG_DEVICE); DO_TEST_FULL("restore-v1", QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO, "stdio"); DO_TEST_FULL("restore-v2", QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC, "stdio"); |