aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2010-02-18 17:52:03 +0100
committerDaniel Veillard <veillard@redhat.com>2010-02-18 17:52:03 +0100
commit7813a0f81ca46bd93296c711fe5d2d366139b1d7 (patch)
tree135703f0f08b6cd296f4faa7f3d7f1ca9371ab97 /tests
parentRemove unused functions from domain_conf (diff)
downloadlibvirt-7813a0f81ca46bd93296c711fe5d2d366139b1d7.tar.gz
libvirt-7813a0f81ca46bd93296c711fe5d2d366139b1d7.tar.bz2
libvirt-7813a0f81ca46bd93296c711fe5d2d366139b1d7.zip
Add domain support for virtio channel
Add support for virtio-serial by defining a new 'virtio' channel target type and a virtio-serial controller. Allows the following to be specified in a domain: <controller type='virtio-serial' index='0' ports='16' vectors='4'/> <channel type='pty'> <target type='virtio' name='org.linux-kvm.port.0'/> <address type='virtio-serial' controller='0' bus='0'/> </channel> * docs/schemas/domain.rng: Add virtio-serial controller and virtio channel type. * src/conf/domain_conf.[ch]: Domain parsing/serialization for virtio-serial controller and virtio channel. * tests/qemuxml2xmltest.c tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: add domain xml parsing test * src/libvirt_private.syms src/qemu/qemu_conf.c: virDomainDefAddDiskControllers() renamed to virDomainDefAddImplicitControllers()
Diffstat (limited to 'tests')
-rw-r--r--tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml35
-rw-r--r--tests/qemuxml2xmltest.c1
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
new file mode 100644
index 000000000..6c3317b67
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
@@ -0,0 +1,35 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219200</memory>
+ <currentMemory>219200</currentMemory>
+ <vcpu cpuset='1-4,8-20,525'>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/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <controller type='virtio-serial' index='0' ports='16' vectors='4'/>
+ <controller type='virtio-serial' index='1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+ </controller>
+ <channel type='pty'>
+ <target type='virtio' name='org.linux-kvm.port.0'/>
+ </channel>
+ <channel type='pty'>
+ <target type='virtio' name='org.linux-kvm.port.1'/>
+ <address type='virtio-serial' controller='1' bus='0'/>
+ </channel>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index e807d7bda..ace2be851 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -133,6 +133,7 @@ mymain(int argc, char **argv)
DO_TEST("parallel-tcp");
DO_TEST("console-compat");
DO_TEST("channel-guestfwd");
+ DO_TEST("channel-virtio");
DO_TEST("hostdev-usb-address");
DO_TEST("hostdev-pci-address");