]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Add target type and model for spapr-vty
authorAndrea Bolognani <abologna@redhat.com>
Wed, 8 Nov 2017 14:31:21 +0000 (15:31 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 28 Nov 2017 14:46:33 +0000 (15:46 +0100)
We can finally introduce a specific target model for the spapr-vty
device used by pSeries guests, which means isa-serial will no longer
show up to confuse users.

We make sure migration works in both directions by interpreting the
isa-serial target type, or the lack of target type, appropriately
when parsing the guest XML, and skipping the newly-introduced type
when formatting if for migration. We also verify that spapr-vty is
not used for non-pSeries guests and add a bunch of test cases.

This commit is best viewed with 'git show -w'.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1511421

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
43 files changed:
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain_address.c
tests/qemuxml2argvdata/qemuxml2argv-pseries-basic.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.args [new symlink]
tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat-power9.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-missing.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-panic-no-address.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.args [new symlink]
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.args [new symlink]
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-invalid-machine.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-kbd.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args
tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-panic-pseries.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-native.xml [new symlink]
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-virtio.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat-power9.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-compat.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-cpu-exact.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-missing.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial+console-native.xml [new symlink]
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-compat.xml [new symlink]
tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-native.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c

index 0a7b0e20e0330e3fffe39bde2ebc4ccf669844bb..e9c53da96a00fb066e4d08b17bfb6e8b6d980537 100644 (file)
@@ -6546,7 +6546,9 @@ qemu-kvm -net nic,model=? /dev/null
       <span class="since">since 1.0.2</span>, <code>isa-serial</code> (usable
       with x86 guests), <code>usb-serial</code> (usable whenever USB support
       is available) and <code>pci-serial</code> (usable whenever PCI support
-      is available).
+      is available); <span class="since">since 3.10.0</span>,
+      <code>spapr-vio-serial</code> (usable with ppc64/pseries guests)
+      is available as well.
     </p>
 
     <p>
@@ -6556,7 +6558,9 @@ qemu-kvm -net nic,model=? /dev/null
       <code>isa-serial</code> (usable with the <code>isa-serial</code> target
       type); <code>usb-serial</code> (usable with the <code>usb-serial</code>
       target type); <code>pci-serial</code>
-      (usable with the <code>pci-serial</code> target type).
+      (usable with the <code>pci-serial</code> target type);
+      <code>spapr-vty</code> (usable with the <code>spapr-vio-serial</code>
+      target type).
     </p>
 
     <p>
@@ -6568,8 +6572,9 @@ qemu-kvm -net nic,model=? /dev/null
       All of the target types support configuring the guest-visible device
       address as <a href="#elementsAddress">documented above</a>; more
       specifically, acceptable address types are <code>isa</code> (for
-      <code>isa-serial</code>), <code>usb</code> (for <code>usb-serial</code>)
-      and <code>pci</code> (for <code>pci-serial</code>).
+      <code>isa-serial</code>), <code>usb</code> (for <code>usb-serial</code>),
+      <code>pci</code> (for <code>pci-serial</code>) and <code>spapr-vio</code>
+      (for <code>spapr-vio-serial</code>).
     </p>
 
     <p>
index fbba092d1d2a3101f873054562a0f77a5b0aa2d4..1f6d25e1bf34ea6da4104fc28ddff508a6450355 100644 (file)
         <value>isa-serial</value>
         <value>usb-serial</value>
         <value>pci-serial</value>
+        <value>spapr-vio-serial</value>
       </choice>
     </attribute>
   </define>
           <value>isa-serial</value>
           <value>usb-serial</value>
           <value>pci-serial</value>
+          <value>spapr-vty</value>
         </choice>
       </attribute>
     </element>
index 5df5f3aaec856d78b26935012340cc1e86dca3db..62d54560eb544a75013ae883823711e523ab3db9 100644 (file)
@@ -451,7 +451,9 @@ VIR_ENUM_IMPL(virDomainChrSerialTarget,
               "none",
               "isa-serial",
               "usb-serial",
-              "pci-serial")
+              "pci-serial",
+              "spapr-vio-serial",
+);
 
 VIR_ENUM_IMPL(virDomainChrChannelTarget,
               VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST,
@@ -478,6 +480,7 @@ VIR_ENUM_IMPL(virDomainChrSerialTargetModel,
               "isa-serial",
               "usb-serial",
               "pci-serial",
+              "spapr-vty",
 );
 
 VIR_ENUM_IMPL(virDomainChrDevice, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST,
@@ -4057,6 +4060,7 @@ virDomainDefAddConsoleCompat(virDomainDefPtr def)
 
         switch ((virDomainChrSerialTargetType) def->serials[0]->targetType) {
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE: {
 
             /* Create a stub console to match the serial port.
index 7895dea55ecb40638e84d7d7ba09746aefef3e0e..35f5c63c2fe5322478f9ba2465a9d6465a2d82eb 100644 (file)
@@ -1081,6 +1081,7 @@ typedef enum {
     VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA,
     VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB,
     VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI,
+    VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO,
 
     VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST
 } virDomainChrSerialTargetType;
@@ -1113,6 +1114,7 @@ typedef enum {
     VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL,
     VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL,
     VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL,
+    VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY,
 
     VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST
 } virDomainChrSerialTargetModel;
index 8249c6237ee5cce028a41f6b0b4144dc641790d8..fecf5ce5f2c86be28729abaa6575eee4fd4cb7bb 100644 (file)
@@ -9231,6 +9231,8 @@ qemuChrSerialTargetModelToCaps(virDomainChrSerialTargetModel targetModel)
         return QEMU_CAPS_DEVICE_USB_SERIAL;
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL:
         return QEMU_CAPS_DEVICE_PCI_SERIAL;
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY:
+        return QEMU_CAPS_DEVICE_SPAPR_VTY;
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL:
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
@@ -10383,52 +10385,39 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
     virBuffer cmd = VIR_BUFFER_INITIALIZER;
     virQEMUCapsFlags caps;
 
-    if (qemuDomainIsPSeries(def)) {
-        if (serial->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
-            serial->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) {
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SPAPR_VTY)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("spapr-vty not supported in this QEMU binary"));
-                goto error;
-            }
-
-            virBufferAsprintf(&cmd, "spapr-vty,chardev=char%s",
-                              serial->info.alias);
-        }
-    } else {
-        switch ((virDomainChrSerialTargetModel) serial->targetModel) {
-        case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL:
-        case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL:
-
-            caps = qemuChrSerialTargetModelToCaps(serial->targetModel);
-
-            if (caps && !virQEMUCapsGet(qemuCaps, caps)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("'%s' is not supported in this QEMU binary"),
-                               virDomainChrSerialTargetModelTypeToString(serial->targetModel));
-                goto error;
-            }
-            break;
+    switch ((virDomainChrSerialTargetModel) serial->targetModel) {
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL:
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL:
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY:
 
-        case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL:
-            break;
+        caps = qemuChrSerialTargetModelToCaps(serial->targetModel);
 
-        case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
-        case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
-            /* Except from _LAST, which is just a guard value and will never
-             * be used, all of the above are platform devices, which means
-             * qemuBuildSerialCommandLine() will have taken the appropriate
-             * branch and we will not have ended up here. */
-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("Invalid target model for serial device"));
+        if (caps && !virQEMUCapsGet(qemuCaps, caps)) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                           _("'%s' is not supported in this QEMU binary"),
+                           virDomainChrSerialTargetModelTypeToString(serial->targetModel));
             goto error;
         }
+        break;
 
-        virBufferAsprintf(&cmd, "%s,chardev=char%s,id=%s",
-                          virDomainChrSerialTargetModelTypeToString(serial->targetModel),
-                          serial->info.alias, serial->info.alias);
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL:
+        break;
+
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
+        /* Except from _LAST, which is just a guard value and will never
+         * be used, all of the above are platform devices, which means
+         * qemuBuildSerialCommandLine() will have taken the appropriate
+         * branch and we will not have ended up here. */
+        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                       _("Invalid target model for serial device"));
+        goto error;
     }
 
+    virBufferAsprintf(&cmd, "%s,chardev=char%s,id=%s",
+                      virDomainChrSerialTargetModelTypeToString(serial->targetModel),
+                      serial->info.alias, serial->info.alias);
+
     if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0)
         goto error;
 
index 0b033f4968e9dffd4ce602edc50672f7ffcdd0b8..d8ab6ed525e6934825c32648ec8f921cab1f1916 100644 (file)
@@ -3470,6 +3470,8 @@ qemuDomainChrSerialTargetTypeToAddressType(int targetType)
         return VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB;
     case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
         return VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
+        return VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
     case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
     case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
         break;
@@ -3489,6 +3491,8 @@ qemuDomainChrSerialTargetModelToTargetType(int targetModel)
         return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB;
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL:
         return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI;
+    case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY:
+        return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO;
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
     case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
         break;
@@ -3499,8 +3503,7 @@ qemuDomainChrSerialTargetModelToTargetType(int targetModel)
 
 
 static int
-qemuDomainChrTargetDefValidate(const virDomainDef *def,
-                               const virDomainChrDef *chr)
+qemuDomainChrTargetDefValidate(const virDomainChrDef *chr)
 {
     int expected;
 
@@ -3512,11 +3515,7 @@ qemuDomainChrTargetDefValidate(const virDomainDef *def,
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
-
-            /* Hack required until we have a proper type for pSeries
-             * serial consoles */
-            if (qemuDomainIsPSeries(def))
-                return 0;
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
 
             expected = qemuDomainChrSerialTargetTypeToAddressType(chr->targetType);
 
@@ -3540,6 +3539,7 @@ qemuDomainChrTargetDefValidate(const virDomainDef *def,
         case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL:
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY:
 
             expected = qemuDomainChrSerialTargetModelToTargetType(chr->targetModel);
 
@@ -3577,7 +3577,7 @@ qemuDomainChrDefValidate(const virDomainChrDef *dev,
     if (qemuDomainChrSourceDefValidate(dev->source) < 0)
         return -1;
 
-    if (qemuDomainChrTargetDefValidate(def, dev) < 0)
+    if (qemuDomainChrTargetDefValidate(dev) < 0)
         return -1;
 
     if (dev->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL &&
@@ -3587,6 +3587,26 @@ qemuDomainChrDefValidate(const virDomainChrDef *dev,
             return -1;
     }
 
+    if (dev->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL) {
+        bool isCompatible = true;
+
+        if (!qemuDomainIsPSeries(def) &&
+            (dev->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO ||
+             dev->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY)) {
+            isCompatible = false;
+        }
+
+        if (!isCompatible) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                           _("Serial device with target type '%s' and "
+                             "target model '%s' not compatible with guest "
+                             "architecture or machine type"),
+                           virDomainChrSerialTargetTypeToString(dev->targetType),
+                           virDomainChrSerialTargetModelTypeToString(dev->targetModel));
+            return -1;
+        }
+    }
+
     return 0;
 }
 
@@ -4226,10 +4246,7 @@ qemuDomainChrDefPostParse(virDomainChrDefPtr chr,
         if (ARCH_IS_X86(def->os.arch)) {
             chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA;
         } else if (qemuDomainIsPSeries(def)) {
-            /* Setting TYPE_ISA here is just a temporary hack to reduce test
-             * suite churn. Later on we will have a proper serial type for
-             * pSeries and this line will be updated accordingly. */
-            chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA;
+            chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO;
         }
     }
 
@@ -4246,6 +4263,9 @@ qemuDomainChrDefPostParse(virDomainChrDefPtr chr,
         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_SPAPR_VIO:
+            chr->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY;
+            break;
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
             /* Nothing to do */
@@ -5151,6 +5171,31 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr driver,
                 goto cleanup;
         }
 
+        for (i = 0; i < def->nserials; i++) {
+            virDomainChrDefPtr serial = def->serials[i];
+
+            /* Historically, the native console type for some machine types
+             * was not set at all, which means it defaulted to ISA even
+             * though that was not even remotely accurate. To ensure migration
+             * towards older libvirt versions works for such guests, we switch
+             * it back to the default here */
+            if (flags & VIR_DOMAIN_XML_MIGRATABLE) {
+                switch ((virDomainChrSerialTargetType) serial->targetType) {
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
+                    serial->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE;
+                    serial->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE;
+                    break;
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
+                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
+                    /* Nothing to do */
+                    break;
+                }
+            }
+        }
+
         /* Replace the CPU definition updated according to QEMU with the one
          * used for starting the domain. The updated def will be sent
          * separately for backward compatibility.
index 989c0e6c937ec50a3e81a70397e616b84223ba3c..2319e503eb481d5187ff8cc243405a8e630211e7 100644 (file)
@@ -782,6 +782,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
 
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
+        case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
         case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
             return 0;
index 97a7057ba036cb306aa2da7e1a0a7bc5ae24940d..789d9f679ec7ee605f1f8e1516664791c6a61356 100644 (file)
@@ -20,4 +20,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.args
new file mode 120000 (symlink)
index 0000000..d6c830e
--- /dev/null
@@ -0,0 +1 @@
+qemuxml2argv-pseries-serial-native.args
\ No newline at end of file
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.xml
new file mode 100644 (file)
index 0000000..9f37bf0
--- /dev/null
@@ -0,0 +1,17 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' model='none'/>
+    <!-- The <console> element being present should result in a matching
+         <serial> element being created -->
+    <console type='pty'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.args
new file mode 100644 (file)
index 0000000..343018f
--- /dev/null
@@ -0,0 +1,23 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc64 \
+-name guest \
+-S \
+-M pseries \
+-m 512 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-nographic \
+-nodefconfig \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-guest/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-boot c \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x1 \
+-chardev pty,id=charconsole0 \
+-device virtconsole,chardev=charconsole0,id=console0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.xml
new file mode 100644 (file)
index 0000000..0190ab6
--- /dev/null
@@ -0,0 +1,19 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' model='none'/>
+    <!-- The <console> element being present should *not* result in a
+         matching <serial> element being created -->
+    <console type='pty'>
+      <target type='virtio'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index af93d63dc94a02e94ddab136e9f2884d8f1e72ea..9bb375aebac186e3b6a378e81833d7302908f504 100644 (file)
@@ -21,4 +21,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index 7740e2f5a91e419bf16595a432dd2e5bc929e79f..5174aa760e11999bf50c34ca50a14093242f38d7 100644 (file)
@@ -21,4 +21,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index d2c99a7fa318c67992b29cdfb7049c4ea00e7102..3790deca8cf967fabf9d707304ab9e199e2c802d 100644 (file)
@@ -21,4 +21,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index 97a7057ba036cb306aa2da7e1a0a7bc5ae24940d..789d9f679ec7ee605f1f8e1516664791c6a61356 100644 (file)
@@ -20,4 +20,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index 97a7057ba036cb306aa2da7e1a0a7bc5ae24940d..789d9f679ec7ee605f1f8e1516664791c6a61356 100644 (file)
@@ -20,4 +20,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index 97a7057ba036cb306aa2da7e1a0a7bc5ae24940d..789d9f679ec7ee605f1f8e1516664791c6a61356 100644 (file)
@@ -20,4 +20,4 @@ server,nowait \
 -boot c \
 -usb \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.args
new file mode 120000 (symlink)
index 0000000..d6c830e
--- /dev/null
@@ -0,0 +1 @@
+qemuxml2argv-pseries-serial-native.args
\ No newline at end of file
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.xml
new file mode 100644 (file)
index 0000000..2733baa
--- /dev/null
@@ -0,0 +1,18 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' model='none'/>
+    <!-- When both the <serial> and <console> elements are present, they will
+         be matched and end up representing the same native serial console -->
+    <serial type='pty'/>
+    <console type='pty'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.args
new file mode 120000 (symlink)
index 0000000..d6c830e
--- /dev/null
@@ -0,0 +1 @@
+qemuxml2argv-pseries-serial-native.args
\ No newline at end of file
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.xml
new file mode 100644 (file)
index 0000000..2e182ed
--- /dev/null
@@ -0,0 +1,19 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' model='none'/>
+    <!-- isa-serial has to be accepted for backwards compatibility reasons,
+         but should get converted to the proper type (spapr-vty-serial) -->
+    <serial type='pty'>
+      <target type='isa-serial'/>
+    </serial>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-invalid-machine.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-invalid-machine.xml
new file mode 100644 (file)
index 0000000..5482146
--- /dev/null
@@ -0,0 +1,19 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' model='none'/>
+    <!-- The spapr-vio-serial target type can only be used for pSeries
+         guests, so this should be rejected -->
+    <serial type='pty'>
+      <target type='spapr-vio-serial'/>
+    </serial>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.args
new file mode 100644 (file)
index 0000000..f72b8b6
--- /dev/null
@@ -0,0 +1,22 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc64 \
+-name guest \
+-S \
+-M pseries \
+-m 512 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-nographic \
+-nodefconfig \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-guest/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-boot c \
+-chardev pty,id=charserial0 \
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.xml
new file mode 100644 (file)
index 0000000..6cec4bc
--- /dev/null
@@ -0,0 +1,16 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' model='none'/>
+    <!-- This will use the spapr-vty-serial target type -->
+    <serial type='pty'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index a92b1e01b1c52b96f69199a35a7318c4a13a25b0..37c0594032c1302b824707c43ccf739f2b1a1900 100644 (file)
@@ -20,4 +20,4 @@ server,nowait \
 -boot c \
 -device pci-ohci,id=usb,bus=pci.0,addr=0x1 \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index caaccdbb8e05a9e860f5bd690285fcd4cf103aa9..838b80453a52d4f068d0f8b4f43217b52ade4943 100644 (file)
@@ -20,5 +20,5 @@ server,nowait \
 -boot c \
 -device pci-ohci,id=usb,bus=pci.0,addr=0x1 \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000 \
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000 \
 -device usb-kbd,id=input0,bus=usb.0,port=1
index b9bd905a5d3f458e6322cc546c7045f23910e84c..56bc1d67ef73d31bffe6f94ee31cb132aeff1d9c 100644 (file)
@@ -21,4 +21,4 @@ server,nowait \
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1 \
 -device pci-ohci,id=usb1,bus=pci.0,addr=0x2 \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000
index 63cf3c18301bf2040d2c59aaaae9cf05ffeb0f10..0fcfbe37967c9868e3af89a385227d89468e0d58 100644 (file)
@@ -25,6 +25,6 @@ server,nowait \
 -device scsi-disk,bus=scsi1.0,channel=0,scsi-id=0,lun=0,\
 drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x20000000 \
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x20000000 \
 -chardev pty,id=charserial1 \
--device spapr-vty,chardev=charserial1,reg=0x30001000
+-device spapr-vty,chardev=charserial1,id=serial1,reg=0x30001000
index 0294067bc8e53215965d4b3c4f50c58249ba257c..8a9bdcc4cd0957c30b6ef8a68b20d041a555be52 100644 (file)
@@ -25,6 +25,6 @@ server,nowait \
 -device scsi-disk,bus=scsi1.0,channel=0,scsi-id=0,lun=0,\
 drive=drive-scsi1-0-0-0,id=scsi1-0-0-0 \
 -chardev pty,id=charserial0 \
--device spapr-vty,chardev=charserial0,reg=0x30000000 \
+-device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000 \
 -chardev pty,id=charserial1 \
--device spapr-vty,chardev=charserial1,reg=0x30001000
+-device spapr-vty,chardev=charserial1,id=serial1,reg=0x30001000
index 29df253b889a22a03ade0c1376b1059c8da3834d..5827a47e55576bbcd4c90403ee7787a4d3c63ae1 100644 (file)
@@ -1877,6 +1877,22 @@ mymain(void)
                         QEMU_CAPS_MACHINE_OPT,
                         QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
 
+    DO_TEST("pseries-serial-native",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-serial+console-native",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-serial-compat",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-console-native",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-console-virtio",
+            QEMU_CAPS_NODEFCONFIG);
+    DO_TEST_PARSE_ERROR("pseries-serial-invalid-machine", NONE);
+
     DO_TEST("disk-ide-drive-split",
             QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_IDE_CD);
index 496df0696c61cb843f4784f4df12a842751ae2a3..484fe4cfa60c4d6bf9bca390c2136d74f60904e3 100644 (file)
@@ -22,8 +22,8 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
-        <model name='isa-serial'/>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-native.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-native.xml
new file mode 120000 (symlink)
index 0000000..b0e645f
--- /dev/null
@@ -0,0 +1 @@
+qemuxml2xmlout-pseries-serial-native.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-virtio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-virtio.xml
new file mode 100644 (file)
index 0000000..48760f2
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <currentMemory unit='KiB'>524288</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <controller type='virtio-serial' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <console type='pty'>
+      <target type='virtio' port='0'/>
+    </console>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
index 9d4c5efe678205aa1106dd800047c5f36fa0d40f..404bb0c768ac0de8787c580952ab9b4f320dfbe7 100644 (file)
@@ -25,8 +25,8 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
-        <model name='isa-serial'/>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
index 6059859abd5d0ca5a8329390a020921826d2ca70..1891fa5f48b606d6652e980f8acaf399795cfe54 100644 (file)
@@ -25,8 +25,8 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
-        <model name='isa-serial'/>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
index f3216523edac9562abcbdc1fb8e064f93c3320af..f08f3e005f7bea92f699510b51fa5a7f3288b318 100644 (file)
@@ -26,8 +26,8 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
-        <model name='isa-serial'/>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
index 496df0696c61cb843f4784f4df12a842751ae2a3..484fe4cfa60c4d6bf9bca390c2136d74f60904e3 100644 (file)
@@ -22,8 +22,8 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
-        <model name='isa-serial'/>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
index 496df0696c61cb843f4784f4df12a842751ae2a3..484fe4cfa60c4d6bf9bca390c2136d74f60904e3 100644 (file)
@@ -22,8 +22,8 @@
       <target index='0'/>
     </controller>
     <serial type='pty'>
-      <target type='isa-serial' port='0'>
-        <model name='isa-serial'/>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
       </target>
       <address type='spapr-vio' reg='0x30000000'/>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial+console-native.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial+console-native.xml
new file mode 120000 (symlink)
index 0000000..b0e645f
--- /dev/null
@@ -0,0 +1 @@
+qemuxml2xmlout-pseries-serial-native.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-compat.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-compat.xml
new file mode 120000 (symlink)
index 0000000..b0e645f
--- /dev/null
@@ -0,0 +1 @@
+qemuxml2xmlout-pseries-serial-native.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-native.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-native.xml
new file mode 100644 (file)
index 0000000..fae7c54
--- /dev/null
@@ -0,0 +1,35 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <currentMemory unit='KiB'>524288</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <serial type='pty'>
+      <target type='spapr-vio-serial' port='0'>
+        <model name='spapr-vty'/>
+      </target>
+      <address type='spapr-vio' reg='0x30000000'/>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+      <address type='spapr-vio' reg='0x30000000'/>
+    </console>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
index d66cf155d4713e4e04f2ab6dd576565706258c66..4318ae5036d8eb1dd9bea50e07613b03153f2e9a 100644 (file)
@@ -768,6 +768,21 @@ mymain(void)
             QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
 
+    DO_TEST("pseries-serial-native",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-serial+console-native",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-serial-compat",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-console-native",
+            QEMU_CAPS_NODEFCONFIG,
+            QEMU_CAPS_DEVICE_SPAPR_VTY);
+    DO_TEST("pseries-console-virtio",
+            QEMU_CAPS_NODEFCONFIG);
+
     DO_TEST("balloon-device-auto", NONE);
     DO_TEST("balloon-device-period", NONE);
     DO_TEST("channel-virtio-auto", NONE);