qemu: Report supported panic device models in domcapabilities

Domain capabilities include information about support for various
devices and models.

Panic devices are not included in the output which means that management
applications need to include the logic for choosing the right device
model or request a default model and try defining such a domain.

Add reporting of panic device models into the domain capabilities based
on the logic in qemuValidateDomainDefPanic() and also report whether
panic devices are supported based on whether at least one model is
supported.  That way consumers of the domain capability XML can
differentiate between libvirt not reporting the panic device models or
no model being supported.

Resolves: https://issues.redhat.com/browse/RHEL-65187
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Martin Kletzander
2024-11-01 10:25:49 +01:00
parent 5d9b886a4e
commit a52cd504b3
77 changed files with 502 additions and 0 deletions

View File

@@ -671,6 +671,30 @@ Interface device corresponds to `network interface
``backendType``
Options for the ``type`` attribute of the ``<backend/>`` element
Panic device
^^^^^^^^^^^^
Interface device corresponds to `panic device
<formatdomain.html#panic-device>`__ (``<panic/>``) in domain XML.
::
<domainCapabilities>
...
<devices>
<panic supported='yes'>
<enum name='model'>
<value>isa</value>
<value>hyperv</value>
</enum>
</panic>
...
</devices>
</domainCapabilities>
``model``
Options for the ``model`` attribute of the ``<panic/>`` element
Features
~~~~~~~~