[libvirt] [PATCH v5 3/6] conf: Remove PS2 mouse device for non-X86 platforms

Li Zhang zhlcindy at gmail.com
Thu Dec 19 07:50:26 UTC 2013


From: Li Zhang <zhlcindy at linux.vnet.ibm.com>

PS2 device only works for X86 platform, other platforms may need
USB mouse. Athough it doesn't influence the QEMU command line, but
It's not right to add one PS2 mouse for non-X86 platform.

This patch is to remove PS2 device definition from other platforms.
Add one default USB mouse for PPC64. It can be also added for other
platforms if necessary.

Signed-off-by: Li Zhang <zhlcindy at linux.vnet.ibm.com>
---
 src/conf/domain_conf.c                             | 71 +++++++++++-----------
 src/util/virarch.h                                 |  2 +
 ...qemuhotplug-console-compat-2+console-virtio.xml |  1 +
 .../qemuxml2argv-console-compat-2.xml              |  1 +
 .../qemuxml2argv-graphics-listen-network.xml       |  1 +
 .../qemuxml2argv-graphics-listen-network2.xml      |  1 +
 .../qemuxml2argv-graphics-sdl-fullscreen.xml       |  1 +
 .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml |  1 +
 .../qemuxml2argv-graphics-spice-compression.xml    |  1 +
 .../qemuxml2argv-graphics-spice-qxl-vga.xml        |  1 +
 .../qemuxml2argv-graphics-spice-timeout.xml        |  2 +
 .../qemuxml2argv-graphics-spice.xml                |  1 +
 .../qemuxml2argv-graphics-vnc-policy.xml           |  1 +
 .../qemuxml2argv-graphics-vnc-sasl.xml             |  1 +
 .../qemuxml2argv-graphics-vnc-socket.xml           |  1 +
 .../qemuxml2argv-graphics-vnc-tls.xml              |  1 +
 .../qemuxml2argv-graphics-vnc-websocket.xml        |  1 +
 .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml  |  1 +
 .../qemuxml2argv-net-bandwidth.xml                 |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml |  1 -
 .../qemuxml2xmlout-graphics-listen-network2.xml    |  1 +
 .../qemuxml2xmlout-graphics-spice-timeout.xml      |  1 +
 tests/vmx2xmldata/vmx2xml-graphics-vnc.xml         |  1 +
 25 files changed, 61 insertions(+), 36 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1a1ac54..e495884 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7625,7 +7625,7 @@ error:
 
 /* Parse the XML definition for an input device */
 static virDomainInputDefPtr
-virDomainInputDefParseXML(const char *ostype,
+virDomainInputDefParseXML(const virDomainDef *dom,
                           xmlNodePtr node,
                           unsigned int flags)
 {
@@ -7658,7 +7658,7 @@ virDomainInputDefParseXML(const char *ostype,
             goto error;
         }
 
-        if (STREQ(ostype, "hvm")) {
+        if (STREQ(dom->os.type, "hvm")) {
             if (def->bus == VIR_DOMAIN_INPUT_BUS_PS2 && /* Only allow mouse for ps2 */
                 !(def->type == VIR_DOMAIN_INPUT_TYPE_MOUSE ||
                 def->type == VIR_DOMAIN_INPUT_TYPE_KBD)) {
@@ -7688,9 +7688,10 @@ virDomainInputDefParseXML(const char *ostype,
             }
         }
     } else {
-        if (STREQ(ostype, "hvm")) {
-            if (def->type == VIR_DOMAIN_INPUT_TYPE_MOUSE ||
-                def->type == VIR_DOMAIN_INPUT_TYPE_KBD)
+        if (STREQ(dom->os.type, "hvm")) {
+            if ((def->type == VIR_DOMAIN_INPUT_TYPE_MOUSE ||
+                def->type == VIR_DOMAIN_INPUT_TYPE_KBD) &&
+                ARCH_IS_X86(dom->os.arch))
                 def->bus = VIR_DOMAIN_INPUT_BUS_PS2;
             else
                 def->bus = VIR_DOMAIN_INPUT_BUS_USB;
@@ -9692,7 +9693,7 @@ virDomainDeviceDefParse(const char *xmlStr,
             goto error;
         break;
     case VIR_DOMAIN_DEVICE_INPUT:
-        if (!(dev->data.input = virDomainInputDefParseXML(def->os.type,
+        if (!(dev->data.input = virDomainInputDefParseXML(def,
                                                           node, flags)))
             goto error;
         break;
@@ -12288,7 +12289,7 @@ virDomainDefParseXML(xmlDocPtr xml,
         goto error;
 
     for (i = 0; i < n; i++) {
-        virDomainInputDefPtr input = virDomainInputDefParseXML(def->os.type,
+        virDomainInputDefPtr input = virDomainInputDefParseXML(def,
                                                                nodes[i],
                                                                flags);
         if (!input)
@@ -12339,30 +12340,25 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     VIR_FREE(nodes);
 
-    /* If graphics are enabled, there's an implicit PS2 mouse */
-    if (def->ngraphics > 0) {
-        virDomainInputDefPtr input;
+    /* If graphics are enabled, there's an implicit PS2 mouse and PS2 keyboard */
+    if (def->ngraphics > 0 &&
+        ARCH_IS_X86(def->os.arch)) {
+        int input_bus = VIR_DOMAIN_INPUT_BUS_XEN;
+
+        if (STREQ(def->os.type, "hvm"))
+            input_bus = VIR_DOMAIN_INPUT_BUS_PS2;
 
-        if (VIR_ALLOC(input) < 0) {
+        if (virDomainDefMaybeAddInput(def,
+                                      VIR_DOMAIN_INPUT_TYPE_MOUSE,
+                                      input_bus) < 0)
             goto error;
-        }
-        if (STREQ(def->os.type, "hvm")) {
-            input->type = VIR_DOMAIN_INPUT_TYPE_MOUSE;
-            input->bus = VIR_DOMAIN_INPUT_BUS_PS2;
-        } else {
-            input->type = VIR_DOMAIN_INPUT_TYPE_MOUSE;
-            input->bus = VIR_DOMAIN_INPUT_BUS_XEN;
-        }
 
-        if (VIR_REALLOC_N(def->inputs, def->ninputs + 1) < 0) {
-            virDomainInputDefFree(input);
+        if (virDomainDefMaybeAddInput(def,
+                                      VIR_DOMAIN_INPUT_TYPE_KBD,
+                                      input_bus) < 0)
             goto error;
-        }
-        def->inputs[def->ninputs] = input;
-        def->ninputs++;
     }
 
-
     /* analysis of the sound devices */
     if ((n = virXPathNodeSet("./devices/sound", ctxt, &nodes)) < 0) {
         goto error;
@@ -17338,16 +17334,21 @@ virDomainDefFormatInternal(virDomainDefPtr def,
     }
 
     if (def->ngraphics > 0) {
-        /* If graphics is enabled, add the implicit mouse */
-        virDomainInputDef autoInput = {
-            VIR_DOMAIN_INPUT_TYPE_MOUSE,
-            STREQ(def->os.type, "hvm") ?
-            VIR_DOMAIN_INPUT_BUS_PS2 : VIR_DOMAIN_INPUT_BUS_XEN,
-            { .alias = NULL },
-        };
-
-        if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
-            goto error;
+        /* If graphics is enabled, add the implicit mouse/keyboard */
+        if (ARCH_IS_X86(def->os.arch)) {
+            virDomainInputDef autoInput = {
+                VIR_DOMAIN_INPUT_TYPE_MOUSE,
+                STREQ(def->os.type, "hvm") ?
+                VIR_DOMAIN_INPUT_BUS_PS2 : VIR_DOMAIN_INPUT_BUS_XEN,
+                { .alias = NULL },
+            };
+            if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
+                goto error;
+
+            autoInput.type = VIR_DOMAIN_INPUT_TYPE_KBD;
+            if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
+                goto error;
+        }
 
         for (n = 0; n < def->ngraphics; n++)
             if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0)
diff --git a/src/util/virarch.h b/src/util/virarch.h
index b180400..9b66e43 100644
--- a/src/util/virarch.h
+++ b/src/util/virarch.h
@@ -70,6 +70,8 @@ typedef enum {
     VIR_ARCH_LAST,
 } virArch;
 
+#define ARCH_IS_X86(arch)  ((arch) == VIR_ARCH_X86_64 ||\
+                            (arch) == VIR_ARCH_I686)
 
 typedef enum {
     VIR_ARCH_LITTLE_ENDIAN,
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
index d75af19..3617a5b 100644
--- a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
+++ b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
@@ -104,6 +104,7 @@
       <alias name='input0'/>
     </input>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'>
       <listen type='address' address='0.0.0.0'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
index 37e8e00..8c8a584 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
@@ -99,6 +99,7 @@
       <alias name='input0'/>
     </input>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'>
       <listen type='address' address='0.0.0.0'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
index b005440..6bdaf08 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
@@ -23,6 +23,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no'>
       <listen type='network' network='Bobsnetwork'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml
index 870ef55..20e2b31 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml
@@ -22,6 +22,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' listen='1.2.3.4' autoport='yes'>
       <listen type='address' address='1.2.3.4'/>
       <listen type='network' network='Bobsnetwork'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
index 7793161..4cd0d54 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
index 26fe28b..3513307 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/>
     <video>
       <model type='vga' vram='9216' heads='1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
index 5da94c2..6dbb1bb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
@@ -23,6 +23,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
       <image compression='auto_glz'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
index 99d2996..a798b40 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
@@ -23,6 +23,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
       <channel name='main' mode='secure'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml
index f9fdf37..1bdc7cb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml
@@ -71,7 +71,9 @@
     </console>
     <input type='tablet' bus='usb'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='spice' port='5900' autoport='no' passwd='sercet' passwdValidTo='2011-05-31T16:11:22' connected='disconnect'/>
+    <input type='kbd' bus='ps2'/>
     <sound model='ac97'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </sound>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index b22fbcc..29e0396 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -23,6 +23,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1' defaultMode='secure'>
       <listen type='address' address='127.0.0.1'/>
       <channel name='main' mode='secure'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
index 6c95c8a..2e92ff9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5900' autoport='no' listen='127.0.0.1' sharePolicy='allow-exclusive'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
index 75563df..61978e8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
index 24c7eed..226e5d8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' socket='/tmp/foo.socket'/>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
index 75563df..61978e8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
index dd0bb57..e880db2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
@@ -17,6 +17,7 @@
     <controller type='usb' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5900' autoport='no' websocket='5700' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
index 6dcd076..85e5d86 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
@@ -24,6 +24,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='2001:1:2:3:4:5:1234:1234'>
       <listen type='address' address='2001:1:2:3:4:5:1234:1234'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
index 0df46c6..b04069d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
@@ -22,6 +22,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <input type='mouse' bus='xen'/>
+    <input type='kbd' bus='xen'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
index 4b8646d..0765ec1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
@@ -60,6 +60,7 @@
     </console>
     <input type='tablet' bus='usb'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='-1' autoport='yes'/>
     <sound model='ac97'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml
index eb20328..9022122 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml
@@ -196,6 +196,7 @@
       <model type='e1000'/>
     </interface>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml
index dbbd6aa..8dde776 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml
@@ -30,7 +30,6 @@
     <controller type='usb' index='0'/>
     <controller type='scsi' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
     <graphics type='sdl'/>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
index 3f7c383..430b2a6 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
@@ -23,6 +23,7 @@
     <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='-1' autoport='yes' listen='1.2.3.4'>
       <listen type='address' address='1.2.3.4'/>
       <listen type='network' network='Bobsnetwork'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
index f793f62..2ff42a3 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
@@ -74,6 +74,7 @@
     </console>
     <input type='tablet' bus='usb'/>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='spice' port='5900' autoport='no' passwd='sercet' passwdValidTo='2011-05-31T16:11:22' connected='disconnect'/>
     <sound model='ac97'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
diff --git a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
index 28af543..2579df8 100644
--- a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
+++ b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml
@@ -12,6 +12,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <input type='mouse' bus='ps2'/>
+    <input type='kbd' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' keymap='de' passwd='password'/>
     <video>
       <model type='vmvga' vram='4096'/>
-- 
1.8.2.1




More information about the libvir-list mailing list