mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: add panic device support for S390
If a panic device is being defined without a model in a domain the default value is always overwritten with model ISA. An ISA bus does not exist on S390 and therefore specifying a panic device results in an unsupported configuration. Since the S390 architecture inherently provides a crash detection capability the panic device should be defined in the domain xml. This patch adds an s390 panic device model and prevents setting a device address on it. Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
b43ab240c2
commit
d855465452
@ -6355,9 +6355,15 @@ qemu-kvm -net nic,model=? /dev/null
|
|||||||
<span class="since">Since 1.2.1, QEMU and KVM only</span>
|
<span class="since">Since 1.2.1, QEMU and KVM only</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
For pSeries guests, this feature is always enabled since it's
|
This feature is always enabled for:
|
||||||
implemented by the guest firmware, thus libvirt automatically
|
</p>
|
||||||
adds the <code>panic</code> element to the domain XML.
|
<ul>
|
||||||
|
<li>pSeries guests, since it's implemented by the guest firmware</li>
|
||||||
|
<li>S390 guests, since it's an integral part of the S390 architecture</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
For the guest types listed above, libvirt automatically adds a
|
||||||
|
<code>panic</code> element to the domain XML.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Example: usage of panic configuration
|
Example: usage of panic configuration
|
||||||
@ -6385,6 +6391,8 @@ qemu-kvm -net nic,model=? /dev/null
|
|||||||
<li>'pseries' — default and valid only for pSeries guests.</li>
|
<li>'pseries' — default and valid only for pSeries guests.</li>
|
||||||
<li>'hyperv' — for Hyper-V crash CPU feature.
|
<li>'hyperv' — for Hyper-V crash CPU feature.
|
||||||
<span class="since">Since 1.3.0, QEMU and KVM only</span></li>
|
<span class="since">Since 1.3.0, QEMU and KVM only</span></li>
|
||||||
|
<li>'s390' — default for S390 guests.
|
||||||
|
<span class="since">Since 1.3.5</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>address</code></dt>
|
<dt><code>address</code></dt>
|
||||||
@ -6392,7 +6400,7 @@ qemu-kvm -net nic,model=? /dev/null
|
|||||||
<p>
|
<p>
|
||||||
address of panic. The default ioport is 0x505. Most users
|
address of panic. The default ioport is 0x505. Most users
|
||||||
don't need to specify an address, and doing so is forbidden
|
don't need to specify an address, and doing so is forbidden
|
||||||
altogether for pseries and hyperv models.
|
altogether for s390, pseries and hyperv models.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -5518,6 +5518,7 @@
|
|||||||
<value>isa</value>
|
<value>isa</value>
|
||||||
<value>pseries</value>
|
<value>pseries</value>
|
||||||
<value>hyperv</value>
|
<value>hyperv</value>
|
||||||
|
<value>s390</value>
|
||||||
</choice>
|
</choice>
|
||||||
</attribute>
|
</attribute>
|
||||||
</optional>
|
</optional>
|
||||||
|
@ -525,7 +525,8 @@ VIR_ENUM_IMPL(virDomainPanicModel, VIR_DOMAIN_PANIC_MODEL_LAST,
|
|||||||
"default",
|
"default",
|
||||||
"isa",
|
"isa",
|
||||||
"pseries",
|
"pseries",
|
||||||
"hyperv")
|
"hyperv",
|
||||||
|
"s390")
|
||||||
|
|
||||||
VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
|
VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
|
||||||
"vga",
|
"vga",
|
||||||
|
@ -2083,6 +2083,7 @@ typedef enum {
|
|||||||
VIR_DOMAIN_PANIC_MODEL_ISA,
|
VIR_DOMAIN_PANIC_MODEL_ISA,
|
||||||
VIR_DOMAIN_PANIC_MODEL_PSERIES,
|
VIR_DOMAIN_PANIC_MODEL_PSERIES,
|
||||||
VIR_DOMAIN_PANIC_MODEL_HYPERV,
|
VIR_DOMAIN_PANIC_MODEL_HYPERV,
|
||||||
|
VIR_DOMAIN_PANIC_MODEL_S390,
|
||||||
|
|
||||||
VIR_DOMAIN_PANIC_MODEL_LAST
|
VIR_DOMAIN_PANIC_MODEL_LAST
|
||||||
} virDomainPanicModel;
|
} virDomainPanicModel;
|
||||||
|
@ -9001,6 +9001,25 @@ qemuBuildPanicCommandLine(virCommandPtr cmd,
|
|||||||
|
|
||||||
for (i = 0; i < def->npanics; i++) {
|
for (i = 0; i < def->npanics; i++) {
|
||||||
switch ((virDomainPanicModel) def->panics[i]->model) {
|
switch ((virDomainPanicModel) def->panics[i]->model) {
|
||||||
|
case VIR_DOMAIN_PANIC_MODEL_S390:
|
||||||
|
/* For s390 guests, the hardware provides the same
|
||||||
|
* functionality as the pvpanic device. The address
|
||||||
|
* cannot be configured by the user */
|
||||||
|
if (!ARCH_IS_S390(def->os.arch)) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("only S390 guests support "
|
||||||
|
"panic device of model 's390'"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (def->panics[i]->info.type !=
|
||||||
|
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("setting the panic device address is not "
|
||||||
|
"supported for model 's390'"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_PANIC_MODEL_HYPERV:
|
case VIR_DOMAIN_PANIC_MODEL_HYPERV:
|
||||||
/* Panic with model 'hyperv' is not a device, it should
|
/* Panic with model 'hyperv' is not a device, it should
|
||||||
* be configured in cpu commandline. The address
|
* be configured in cpu commandline. The address
|
||||||
|
@ -2196,6 +2196,8 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
|||||||
if (ARCH_IS_PPC64(def->os.arch) &&
|
if (ARCH_IS_PPC64(def->os.arch) &&
|
||||||
STRPREFIX(def->os.machine, "pseries"))
|
STRPREFIX(def->os.machine, "pseries"))
|
||||||
dev->data.panic->model = VIR_DOMAIN_PANIC_MODEL_PSERIES;
|
dev->data.panic->model = VIR_DOMAIN_PANIC_MODEL_PSERIES;
|
||||||
|
else if (ARCH_IS_S390(def->os.arch))
|
||||||
|
dev->data.panic->model = VIR_DOMAIN_PANIC_MODEL_S390;
|
||||||
else
|
else
|
||||||
dev->data.panic->model = VIR_DOMAIN_PANIC_MODEL_ISA;
|
dev->data.panic->model = VIR_DOMAIN_PANIC_MODEL_ISA;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user