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

[libvirt] [PATCH v3 14/28] qemu: Set targetModel based on targetType for serial devices



Signed-off-by: Andrea Bolognani <abologna redhat com>
Reviewed-by: Pavel Hrdina <phrdina redhat com>
---
 src/qemu/qemu_domain.c                               | 20 ++++++++++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-console-compat.xml |  4 +++-
 tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml   |  4 +++-
 tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml  |  4 +++-
 tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml  |  8 ++++++--
 tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml   |  4 +++-
 .../qemuargv2xml-serial-tcp-telnet.xml               |  4 +++-
 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml   |  4 +++-
 tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml   |  8 ++++++--
 tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml  |  4 +++-
 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml    |  4 +++-
 ...uhotplug-console-compat-2-live+console-virtio.xml | 12 +++++++++---
 .../qemuhotplug-console-compat-2-live.xml            | 12 +++++++++---
 ...qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml |  8 ++++++--
 tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml |  8 ++++++--
 .../qemuxml2xmlout-aarch64-pci-serial.xml            |  4 +++-
 .../qemuxml2xmlout-bios-nvram-os-interleave.xml      |  4 +++-
 .../qemuxml2xmlout-chardev-label.xml                 |  8 ++++++--
 .../qemuxml2xmlout-console-compat-auto.xml           |  4 +++-
 .../qemuxml2xmlout-console-compat.xml                |  4 +++-
 .../qemuxml2xmlout-console-compat2.xml               |  4 +++-
 .../qemuxml2xmlout-console-virtio-many.xml           |  4 +++-
 .../qemuxml2xmlout-interface-driver.xml              |  4 +++-
 .../qemuxml2xmlout-interface-server.xml              |  8 ++++++--
 .../qemuxml2xmlout-net-bandwidth.xml                 |  4 +++-
 .../qemuxml2xmlout-net-bandwidth2.xml                |  4 +++-
 .../qemuxml2xmlout-net-coalesce.xml                  |  4 +++-
 tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml  |  4 +++-
 .../qemuxml2xmlout-panic-pseries.xml                 |  4 +++-
 .../qemuxml2xmlout-pci-serial-dev-chardev.xml        |  4 +++-
 .../qemuxml2xmlout-pseries-cpu-compat-power9.xml     |  4 +++-
 .../qemuxml2xmlout-pseries-cpu-compat.xml            |  4 +++-
 .../qemuxml2xmlout-pseries-cpu-exact.xml             |  4 +++-
 .../qemuxml2xmlout-pseries-panic-missing.xml         |  4 +++-
 .../qemuxml2xmlout-pseries-panic-no-address.xml      |  4 +++-
 .../qemuxml2xmlout-q35-virt-manager-basic.xml        |  4 +++-
 .../qemuxml2xmlout-serial-spiceport-nospice.xml      |  4 +++-
 .../qemuxml2xmlout-serial-spiceport.xml              |  4 +++-
 .../qemuxml2xmlout-serial-target-port-auto.xml       | 12 +++++++++---
 .../qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml    |  8 ++++++--
 .../qemuxml2xmlout-tap-vhost-incorrect.xml           |  4 +++-
 .../qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml  |  4 +++-
 .../qemuxml2xmlout-vhost_queues.xml                  |  4 +++-
 43 files changed, 185 insertions(+), 55 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a719d14fe..e141e1132 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4192,6 +4192,26 @@ qemuDomainChrDefPostParse(virDomainChrDefPtr chr,
         }
     }
 
+    /* Set the default target model */
+    if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
+        chr->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE) {
+        switch ((virDomainChrSerialTargetType) chr->targetType) {
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
+            chr->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL;
+            break;
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
+            chr->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL;
+            break;
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
+            chr->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL;
+            break;
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
+            /* Nothing to do */
+            break;
+        }
+    }
+
     /* clear auto generated unix socket path for inactive definitions */
     if (parseFlags & VIR_DOMAIN_DEF_PARSE_INACTIVE) {
         if (qemuDomainChrDefDropDefaultPath(chr, driver) < 0)
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
index 7c106f145..cba43ca45 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
@@ -28,7 +28,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
index e76d0211d..e9998d554 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
@@ -29,7 +29,9 @@
     </controller>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='dev'>
       <source path='/dev/ttyS2'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
index ed67ada0d..0e9dfe578 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
@@ -29,7 +29,9 @@
     </controller>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='file'>
       <source path='/tmp/serial.log'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
index 420771dc9..05374b38d 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
@@ -28,11 +28,15 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' 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-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
index 7c106f145..cba43ca45 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
@@ -28,7 +28,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
index 3fe61ffa0..1ac12440e 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
@@ -30,7 +30,9 @@
     <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-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
index 3fc9fd39b..c10cee903 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
@@ -30,7 +30,9 @@
     <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-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='tcp'>
       <source mode='connect' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
index 5b4af3fe9..fd56dda84 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
@@ -30,11 +30,15 @@
     <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-serial' 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-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='udp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
index 6bb291ff7..70b192f67 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
@@ -29,7 +29,9 @@
     </controller>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
index 41954fc85..630844ea0 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
@@ -28,7 +28,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='vc'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='vc'>
       <target type='serial' port='0'/>
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 427f431cc..abe68a0a0 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live+console-virtio.xml
@@ -68,17 +68,23 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <alias name='serial0'/>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <alias name='serial1'/>
     </serial>
     <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-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
       <alias name='serial2'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
index 144f6eff7..45161e1e2 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-console-compat-2-live.xml
@@ -68,17 +68,23 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <alias name='serial0'/>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <alias name='serial1'/>
     </serial>
     <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-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
       <alias name='serial2'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml
index e6c4adb6f..89dc9e6e1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-notls.xml
@@ -29,12 +29,16 @@
     <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-serial' 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-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='udp'>
       <source mode='bind' host='127.0.0.1' service='1111'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
index f9724d320..52132a82d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml
@@ -110,10 +110,14 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='1'/>
+      <target type='isa-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml
index fddab31f0..b02a5a7db 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-pci-serial.xml
@@ -34,7 +34,9 @@
     </controller>
     <serial type='pty'>
       <log file='/tmp/log' append='on'/>
-      <target type='pci-serial' port='0'/>
+      <target type='pci-serial' port='0'>
+        <model name='pci-serial'/>
+      </target>
       <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
     </serial>
   </devices>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
index 5ee73b527..b6d7a6636 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml
@@ -33,7 +33,9 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml
index ad77f62d9..7d5bbdd0a 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-chardev-label.xml
@@ -25,13 +25,17 @@
       <source path='/tmp/serial.file'>
         <seclabel model='dac' relabel='no'/>
       </source>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'>
         <seclabel model='dac' relabel='no'/>
       </source>
-      <target type='isa-serial' port='1'/>
+      <target type='isa-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='file'>
       <source path='/tmp/serial.file'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
index cd9d75c4b..267b253b1 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
@@ -27,7 +27,9 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml
index 0c0bd7b34..6a52800a3 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat.xml
@@ -28,7 +28,9 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
index 305c53eab..8c7bbb768 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat2.xml
@@ -31,7 +31,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml
index b38b3ce98..1a22b78b8 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio-many.xml
@@ -30,7 +30,9 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml
index 06192fbb4..5be590e75 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-driver.xml
@@ -47,7 +47,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
index a6eaa3807..049b1472a 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-interface-server.xml
@@ -104,10 +104,14 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <serial type='pty'>
-      <target type='isa-serial' port='1'/>
+      <target type='isa-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
index e6ad23424..4ec77d154 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth.xml
@@ -55,7 +55,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
index 66448ec3d..ee65c3a5b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-bandwidth2.xml
@@ -44,7 +44,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml
index b1240b8ed..56792b999 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-coalesce.xml
@@ -57,7 +57,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml
index 4f7ad323e..fc7b2e39a 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml
@@ -54,7 +54,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
index a563b6ddd..496df0696 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
@@ -22,7 +22,9 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml
index 2f704cc0a..8f77ef043 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-serial-dev-chardev.xml
@@ -28,7 +28,9 @@
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
-      <target type='pci-serial' port='0'/>
+      <target type='pci-serial' port='0'>
+        <model name='pci-serial'/>
+      </target>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </serial>
     <console type='dev'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
index 59587b3c3..9d4c5efe6 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
@@ -25,7 +25,9 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
index a39e1fd01..6059859ab 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
@@ -25,7 +25,9 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
index 666eede1a..f3216523e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
@@ -26,7 +26,9 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
index a563b6ddd..496df0696 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
@@ -22,7 +22,9 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
index a563b6ddd..496df0696 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
@@ -22,7 +22,9 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
     <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
index 27baaa3f1..2437fdec4 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
@@ -79,7 +79,9 @@
       <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml
index 63462e6f9..e1d5cb9d7 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport-nospice.xml
@@ -28,7 +28,9 @@
     <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-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='spiceport'>
       <source channel='org.qemu.console.serial.0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
index c90bbeb7d..ff92435af 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-spiceport.xml
@@ -28,7 +28,9 @@
     <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-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='spiceport'>
       <source channel='org.qemu.console.serial.0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
index a8790b509..fded758ea 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
@@ -27,13 +27,19 @@
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <serial type='null'>
-      <target type='isa-serial' port='1'/>
+      <target type='isa-serial' port='1'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <serial type='stdio'>
-      <target type='isa-serial' port='2'/>
+      <target type='isa-serial' port='2'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml
index a8af87b53..76d894820 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml
@@ -29,12 +29,16 @@
     <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-serial' 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-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='udp'>
       <source mode='bind' host='127.0.0.1' service='1111'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
index f439f57ea..c4334f6ca 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
@@ -42,7 +42,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml
index a2a6e5b3c..8e761762f 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost.xml
@@ -48,7 +48,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml
index 72cbcc4cb..49a7b550b 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-vhost_queues.xml
@@ -46,7 +46,9 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
-      <target type='isa-serial' port='0'/>
+      <target type='isa-serial' port='0'>
+        <model name='isa-serial'/>
+      </target>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
-- 
2.14.3


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