``usb-serial`` (usable whenever USB support is available) and ``pci-serial``
(usable whenever PCI support is available); :since:`since 3.10.0` ,
``spapr-vio-serial`` (usable with ppc64/pseries guests), ``system-serial``
-(usable with aarch64/virt and, :since:`since 4.7.0` , riscv/virt guests) and
-``sclp-serial`` (usable with s390 and s390x guests) are available as well.
+(usable with aarch64/virt and, :since:`since 4.7.0` , riscv/virt guests),
+``sclp-serial`` (usable with s390 and s390x guests) are available as well
+and :since:`since 8.1.0` ``isa-debug`` (usable with x86 guests).
:since:`Since 3.10.0` , the ``target`` element can have an optional ``model``
subelement; valid values for its ``name`` attribute are: ``isa-serial`` (usable
target type); ``spapr-vty`` (usable with the ``spapr-vio-serial`` target type);
``pl011`` and, :since:`since 4.7.0` , ``16550a`` (usable with the
``system-serial`` target type); ``sclpconsole`` and ``sclplmconsole`` (usable
-with the ``sclp-serial`` target type). Providing a target model is usually
-unnecessary: libvirt will automatically pick one that's suitable for the chosen
-target type, and overriding that value is generally not recommended.
+with the ``sclp-serial`` target type). ``isa-debugcon`` (usable with the
+``isa-debug`` target type); provides a virtual console for receiving debug
+messages from the firmware on x86 platforms. :since:`Since: 8.1.0`.
+Providing a target model is usually unnecessary: libvirt will automatically
+pick one that's suitable for the chosen target type, and overriding that
+value is generally not recommended.
If any of the attributes is not specified by the user, libvirt will choose a
value suitable for most users.
<value>spapr-vio-serial</value>
<value>system-serial</value>
<value>sclp-serial</value>
+ <value>isa-debug</value>
</choice>
</attribute>
</define>
<value>16550a</value>
<value>sclpconsole</value>
<value>sclplmconsole</value>
+ <value>isa-debugcon</value>
</choice>
</attribute>
</element>
"spapr-vio-serial",
"system-serial",
"sclp-serial",
+ "isa-debug",
);
VIR_ENUM_IMPL(virDomainChrChannelTarget,
"sclpconsole",
"sclplmconsole",
"16550a",
+ "isa-debugcon",
);
VIR_ENUM_IMPL(virDomainChrDevice,
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
/* Nothing to do */
break;
}
-static void
+static int
virDomainChrDefPostParse(virDomainChrDef *chr,
const virDomainDef *def)
{
chr->targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
}
+ if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
+ chr->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG &&
+ !ARCH_IS_X86(def->os.arch)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("isa-debug serial type only valid on x86 architecture"));
+ return -1;
+ }
+
if (chr->target.port == -1 &&
(chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL ||
chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL ||
chr->target.port = maxport + 1;
}
+
+ return 0;
}
switch ((virDomainDeviceType)dev->type) {
case VIR_DOMAIN_DEVICE_CHR:
- virDomainChrDefPostParse(dev->data.chr, def);
- ret = 0;
+ ret = virDomainChrDefPostParse(dev->data.chr, def);
break;
case VIR_DOMAIN_DEVICE_RNG:
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP,
+ VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG,
VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST
} virDomainChrSerialTargetType;
VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE,
VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE,
VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_16550A,
+ VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_DEBUGCON,
VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST
} virDomainChrSerialTargetModel;
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PL011:
return QEMU_CAPS_DEVICE_PL011;
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_16550A:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_DEBUGCON:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
break;
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_DEBUGCON:
caps = qemuChrSerialTargetModelToCaps(serial->targetModel);
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP:
chr->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE;
break;
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG:
+ chr->targetModel = VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_DEBUGCON;
+ break;
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
/* Nothing to do */
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
/* Nothing to do */
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST:
return 0;
{
switch ((virDomainChrSerialTargetType)targetType) {
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG:
return VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA;
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
return VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB;
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE:
return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP;
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_DEBUGCON:
+ return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG;
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
break;
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI:
case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA_DEBUG:
expected = qemuValidateChrSerialTargetTypeToAddressType(chr->targetType);
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE:
case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_16550A:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_DEBUGCON:
expected = qemuValidateChrSerialTargetModelToTargetType(chr->targetModel);