[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 14/21] conf: Shorten names in virDomainChrSerialTarget enumeration



Now that the target type is no longer formatted on the QEMU command
line, we don't need the values to match the QEMU device names any
longer, so we can shorten the names and reduce redundancy by dropping
the -serial suffix: this also has the nice side-effect that target
type and address type will now match.

We still need to parse the old names, and format them when preparing
a migratable XML, to preserve backwards compatibility.

Signed-off-by: Andrea Bolognani <abologna redhat com>
---
 docs/formatdomain.html.in                          | 10 +++---
 docs/schemas/domaincommon.rng                      |  4 +++
 src/conf/domain_conf.c                             | 39 +++++++++++++++++++---
 .../qemuargv2xml-console-compat.xml                |  2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml |  2 +-
 .../qemuargv2xmldata/qemuargv2xml-serial-file.xml  |  2 +-
 .../qemuargv2xmldata/qemuargv2xml-serial-many.xml  |  4 +--
 tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml |  2 +-
 .../qemuargv2xml-serial-tcp-telnet.xml             |  2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml |  2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml |  4 +--
 .../qemuargv2xmldata/qemuargv2xml-serial-unix.xml  |  2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml  |  2 +-
 ...otplug-console-compat-2-live+console-virtio.xml |  6 ++--
 .../qemuhotplug-console-compat-2-live.xml          |  6 ++--
 ...muxml2argv-serial-tcp-tlsx509-chardev-notls.xml |  4 +--
 .../qemuxml2argvdata/qemuxml2argv-user-aliases.xml |  4 +--
 .../qemuxml2xmlout-aarch64-pci-serial.xml          |  2 +-
 .../qemuxml2xmlout-bios-nvram-os-interleave.xml    |  2 +-
 .../qemuxml2xmlout-chardev-label.xml               |  4 +--
 .../qemuxml2xmlout-console-compat-auto.xml         |  2 +-
 .../qemuxml2xmlout-console-compat.xml              |  2 +-
 .../qemuxml2xmlout-console-compat2.xml             |  2 +-
 .../qemuxml2xmlout-console-virtio-many.xml         |  2 +-
 .../qemuxml2xmlout-interface-driver.xml            |  2 +-
 .../qemuxml2xmlout-interface-server.xml            |  4 +--
 .../qemuxml2xmlout-net-bandwidth.xml               |  2 +-
 .../qemuxml2xmlout-net-bandwidth2.xml              |  2 +-
 .../qemuxml2xmlout-net-coalesce.xml                |  2 +-
 .../qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml  |  2 +-
 .../qemuxml2xmlout-panic-pseries.xml               |  2 +-
 .../qemuxml2xmlout-pci-serial-dev-chardev.xml      |  2 +-
 .../qemuxml2xmlout-pseries-cpu-compat-power9.xml   |  2 +-
 .../qemuxml2xmlout-pseries-cpu-compat.xml          |  2 +-
 .../qemuxml2xmlout-pseries-cpu-exact.xml           |  2 +-
 .../qemuxml2xmlout-pseries-panic-missing.xml       |  2 +-
 .../qemuxml2xmlout-pseries-panic-no-address.xml    |  2 +-
 .../qemuxml2xmlout-q35-virt-manager-basic.xml      |  2 +-
 .../qemuxml2xmlout-serial-spiceport-nospice.xml    |  2 +-
 .../qemuxml2xmlout-serial-spiceport.xml            |  2 +-
 .../qemuxml2xmlout-serial-target-port-auto.xml     |  6 ++--
 .../qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml  |  4 +--
 .../qemuxml2xmlout-tap-vhost-incorrect.xml         |  2 +-
 .../qemuxml2xmlout-tap-vhost.xml                   |  2 +-
 .../qemuxml2xmlout-vhost_queues.xml                |  2 +-
 45 files changed, 99 insertions(+), 64 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 4bc88cfc5..2edc61a01 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -6530,13 +6530,13 @@ qemu-kvm -net nic,model=? /dev/null
       specifies the port number. Ports are numbered starting from 0. There are
       usually 0, 1 or 2 serial ports. There is also an optional
       <code>type</code> attribute <span class="since">since 1.0.2</span>
-      which has three choices for its value, one is <code>isa-serial</code>,
-      then <code>usb-serial</code> and last one is <code>pci-serial</code>.
-      If <code>type</code> is missing, <code>isa-serial</code> will be used by
-      default. For <code>usb-serial</code> an optional sub-element
+      which has three choices for its value, one is <code>isa</code>,
+      then <code>usb</code> and last one is <code>pci</code>.
+      If <code>type</code> is missing, <code>isa</code> will be used by
+      default. For <code>usb</code> an optional sub-element
       <code>&lt;address/&gt;</code> with <code>type='usb'</code> can tie the
       device to a particular controller, <a href="#elementsAddress">documented above</a>.
-      Similarly, <code>pci-serial</code> can be used to attach the device to
+      Similarly, <code>pci</code> can be used to attach the device to
       the pci bus (<span class="since">since 1.2.16</span>). Again, it has
       optional sub-element <code>&lt;address/&gt;</code> with
       <code>type='pci'</code> to select desired location on the PCI bus.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index fbba092d1..93beabc5e 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3582,6 +3582,10 @@
   <define name='qemucdevSerialTgtType'>
     <attribute name='type'>
       <choice>
+        <value>isa</value>
+        <value>usb</value>
+        <value>pci</value>
+        <!-- Legacy values, for backwards compatibility -->
         <value>isa-serial</value>
         <value>usb-serial</value>
         <value>pci-serial</value>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 140f478b0..0d8c88db9 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -449,9 +449,10 @@ VIR_ENUM_IMPL(virDomainChrDeviceState, VIR_DOMAIN_CHR_DEVICE_STATE_LAST,
 VIR_ENUM_IMPL(virDomainChrSerialTarget,
               VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST,
               "none",
-              "isa-serial",
-              "usb-serial",
-              "pci-serial")
+              "isa",
+              "usb",
+              "pci",
+);
 
 VIR_ENUM_IMPL(virDomainChrChannelTarget,
               VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST,
@@ -11511,6 +11512,17 @@ virDomainChrTargetTypeFromString(int devtype,
     if (!targetType)
         return virDomainChrDefaultTargetType(devtype);
 
+    /* Perform conversion between the legacy values for targetType, which
+     * are still accepted for backwards compatibility reasons, and the
+     * new values expected by virDomainChrSerialTargetTypeFromString() */
+    if (STREQ(targetType, "isa-serial")) {
+        targetType = "isa";
+    } else if (STREQ(targetType, "usb-serial")) {
+        targetType = "usb";
+    } else if (STREQ(targetType, "pci-serial")) {
+        targetType = "pci";
+    }
+
     switch ((virDomainChrDeviceType) devtype) {
     case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL:
         ret = virDomainChrChannelTargetTypeFromString(targetType);
@@ -24066,8 +24078,27 @@ virDomainChrTargetDefFormat(virBufferPtr buf,
 
         if (def->targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) {
             virBufferAsprintf(buf,
-                              "type='%s' ",
+                              "type='%s",
                               targetType);
+
+            /* When formatting a migratable XML, some target types need to
+             * be converted by appending "-serial" to their names, so that
+             * migration to older libvirt versions to work */
+            if ((flags & VIR_DOMAIN_XML_MIGRATABLE)) {
+                switch ((virDomainChrSerialTargetType) def->targetType) {
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
+                    virBufferAddLit(buf, "-serial");
+                    break;
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
+                    /* No conversion necessary */
+                    break;
+                }
+            }
+
+            virBufferAddLit(buf, "' ");
         }
 
         virBufferAsprintf(buf,
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
index cba43ca45..1b0b82faa 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
@@ -28,7 +28,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
index e9998d554..038ac7b64 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
@@ -29,7 +29,7 @@
     </controller>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
index 0e9dfe578..4735c2f6c 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
@@ -29,7 +29,7 @@
     </controller>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
index 05374b38d..fd24305d3 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
@@ -28,13 +28,13 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
index cba43ca45..1b0b82faa 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
@@ -28,7 +28,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
index 1ac12440e..3d7cb35b2 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
@@ -30,7 +30,7 @@
     <serial type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='telnet'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
index c10cee903..11b59f757 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
@@ -30,7 +30,7 @@
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
index fd56dda84..5dd2af063 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
@@ -30,13 +30,13 @@
     <serial type='udp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <source mode='connect' host='127.0.0.1' service='9998'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='udp'>
       <source mode='connect' service='9999'/>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
index 70b192f67..76cd70215 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
@@ -29,7 +29,7 @@
     </controller>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
index 630844ea0..8bda30472 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
@@ -28,7 +28,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='vc'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
index abe68a0a0..be42dbed6 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
@@ -68,13 +68,13 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial0'/>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial1'/>
@@ -82,7 +82,7 @@
     <serial type='tcp'>
       <source mode='bind' host='0.0.0.0' service='2445'/>
       <protocol type='raw'/>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial2'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
index 45161e1e2..ba08844d0 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
@@ -68,13 +68,13 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial0'/>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial1'/>
@@ -82,7 +82,7 @@
     <serial type='tcp'>
       <source mode='bind' host='0.0.0.0' service='2445'/>
       <protocol type='raw'/>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial2'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml
index 89dc9e6e1..418d12c05 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml
@@ -29,14 +29,14 @@
     <serial type='udp'>
       <source mode='bind' host='127.0.0.1' service='1111'/>
       <source mode='connect' host='127.0.0.1' service='2222'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='5555' tls='no'/>
       <protocol type='raw'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
index 52132a82d..b22e63915 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
@@ -110,12 +110,12 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml
index b02a5a7db..354f7acf2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml
@@ -34,7 +34,7 @@
     </controller>
     <serial type='pty'>
       <log file='/tmp/log' append='on'/>
-      <target type='pci-serial' port='0'>
+      <target type='pci' port='0'>
         <model name='pci-serial'/>
       </target>
       <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
index b6d7a6636..ffcf7641c 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
@@ -33,7 +33,7 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml
index 7d5bbdd0a..23c3aedb2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml
@@ -25,7 +25,7 @@
       <source path='/tmp/serial.file'>
         <seclabel model='dac' relabel='no'/>
       </source>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
@@ -33,7 +33,7 @@
       <source mode='connect' path='/tmp/serial.sock'>
         <seclabel model='dac' relabel='no'/>
       </source>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
index 267b253b1..2b07ec5e3 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
@@ -27,7 +27,7 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml
index 6a52800a3..f5c7078a4 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml
@@ -28,7 +28,7 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
index 8c7bbb768..1edc14c05 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
@@ -31,7 +31,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml
index 1a22b78b8..9c09d32d2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml
@@ -30,7 +30,7 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml
index 5be590e75..c5acda87b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml
@@ -47,7 +47,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
index 049b1472a..b0fd01501 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
@@ -104,12 +104,12 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
index 4ec77d154..9a95ba2f8 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
@@ -55,7 +55,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
index ee65c3a5b..b7a017a5b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
@@ -44,7 +44,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml
index 56792b999..c7075bfff 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml
@@ -57,7 +57,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml
index fc7b2e39a..8016846eb 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml
@@ -54,7 +54,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
index 496df0696..eeda93155 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
@@ -22,7 +22,7 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml
index 8f77ef043..dd0ef800e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml
@@ -28,7 +28,7 @@
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
-      <target type='pci-serial' port='0'>
+      <target type='pci' port='0'>
         <model name='pci-serial'/>
       </target>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
index 9d4c5efe6..ced122581 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
@@ -25,7 +25,7 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
index 6059859ab..f030f0011 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
@@ -25,7 +25,7 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
index f3216523e..98d7a2707 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
@@ -26,7 +26,7 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
index 496df0696..eeda93155 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
@@ -22,7 +22,7 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
index 496df0696..eeda93155 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
@@ -22,7 +22,7 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
index 2437fdec4..4b9b8e413 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
@@ -79,7 +79,7 @@
       <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml
index e1d5cb9d7..6fc74743b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml
@@ -28,7 +28,7 @@
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='spiceport'>
       <source channel='org.qemu.console.serial.0'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
index ff92435af..f7adcb7e1 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
@@ -28,7 +28,7 @@
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='spiceport'>
       <source channel='org.qemu.console.serial.0'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
index fded758ea..37abc239e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
@@ -27,17 +27,17 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='null'>
-      <target type='isa-serial' port='1'>
+      <target type='isa' port='1'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='stdio'>
-      <target type='isa-serial' port='2'>
+      <target type='isa' port='2'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml
index 76d894820..07a2e9b31 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml
@@ -29,14 +29,14 @@
     <serial type='udp'>
       <source mode='bind' host='127.0.0.1' service='1111'/>
       <source mode='connect' host='127.0.0.1' service='2222'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='5555'/>
       <protocol type='raw'/>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
index df4c67bb4..37ed82209 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
@@ -40,7 +40,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml
index 70c6a1a0f..a972a9c81 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml
@@ -47,7 +47,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml
index 49a7b550b..60558b08f 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml
@@ -46,7 +46,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
+      <target type='isa' port='0'>
         <model name='isa-serial'/>
       </target>
     </serial>
-- 
2.14.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]