[PATCH] qemu: Report supported panic device models in domcapabilities

Martin Kletzander posted 1 patch 2 weeks, 2 days ago
docs/formatdomaincaps.rst                     | 24 ++++++++++++++
src/conf/domain_capabilities.c                | 13 ++++++++
src/conf/domain_capabilities.h                |  8 +++++
src/qemu/qemu_capabilities.c                  | 31 +++++++++++++++++++
src/qemu/qemu_capabilities.h                  |  4 +++
.../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  6 ++++
.../qemu_5.2.0-tcg-virt.riscv64.xml           |  1 +
.../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  6 ++++
.../qemu_5.2.0-virt.aarch64.xml               |  1 +
.../qemu_5.2.0-virt.riscv64.xml               |  1 +
tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  1 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  5 +++
tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  5 +++
tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  6 ++++
.../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  7 +++++
.../qemu_6.0.0-virt.aarch64.xml               |  5 +++
tests/domaincapsdata/qemu_6.0.0.aarch64.xml   |  5 +++
tests/domaincapsdata/qemu_6.0.0.s390x.xml     |  5 +++
tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_6.1.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml  |  7 +++++
tests/domaincapsdata/qemu_6.1.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_6.2.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml  |  7 +++++
.../qemu_6.2.0-virt.aarch64.xml               |  5 +++
tests/domaincapsdata/qemu_6.2.0.aarch64.xml   |  5 +++
tests/domaincapsdata/qemu_6.2.0.ppc64.xml     |  6 ++++
tests/domaincapsdata/qemu_6.2.0.x86_64.xml    |  7 +++++
.../qemu_7.0.0-hvf.aarch64+hvf.xml            |  5 +++
.../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |  7 +++++
.../qemu_7.0.0-virt.aarch64.xml               |  5 +++
tests/domaincapsdata/qemu_7.0.0.aarch64.xml   |  5 +++
tests/domaincapsdata/qemu_7.0.0.ppc64.xml     |  6 ++++
tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |  7 +++++
tests/domaincapsdata/qemu_7.1.0.ppc64.xml     |  6 ++++
tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |  7 +++++
.../qemu_7.2.0-hvf.x86_64+hvf.xml             |  7 +++++
.../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |  7 +++++
.../qemu_7.2.0-tcg.x86_64+hvf.xml             |  7 +++++
.../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |  7 +++++
tests/domaincapsdata/qemu_7.2.0.ppc.xml       |  5 +++
tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |  7 +++++
.../qemu_8.0.0-tcg-virt.riscv64.xml           |  5 +++
.../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |  7 +++++
.../qemu_8.0.0-virt.riscv64.xml               |  5 +++
tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |  7 +++++
tests/domaincapsdata/qemu_8.1.0.s390x.xml     |  5 +++
tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |  7 +++++
.../qemu_8.2.0-tcg-virt.loongarch64.xml       |  5 +++
.../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |  7 +++++
.../qemu_8.2.0-virt.aarch64.xml               |  5 +++
.../qemu_8.2.0-virt.loongarch64.xml           |  5 +++
tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |  5 +++
tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |  5 +++
tests/domaincapsdata/qemu_8.2.0.s390x.xml     |  5 +++
tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |  7 +++++
tests/domaincapsdata/qemu_9.0.0.sparc.xml     |  1 +
tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |  7 +++++
.../qemu_9.1.0-tcg-virt.riscv64.xml           |  5 +++
.../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |  7 +++++
.../qemu_9.1.0-virt.riscv64.xml               |  5 +++
tests/domaincapsdata/qemu_9.1.0.s390x.xml     |  5 +++
tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |  7 +++++
.../domaincapsdata/qemu_9.2.0-q35.x86_64.xml  |  7 +++++
.../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml  |  7 +++++
tests/domaincapsdata/qemu_9.2.0.x86_64.xml    |  7 +++++
77 files changed, 502 insertions(+)
[PATCH] qemu: Report supported panic device models in domcapabilities
Posted by Martin Kletzander 2 weeks, 2 days ago
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>
---
 docs/formatdomaincaps.rst                     | 24 ++++++++++++++
 src/conf/domain_capabilities.c                | 13 ++++++++
 src/conf/domain_capabilities.h                |  8 +++++
 src/qemu/qemu_capabilities.c                  | 31 +++++++++++++++++++
 src/qemu/qemu_capabilities.h                  |  4 +++
 .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  6 ++++
 .../qemu_5.2.0-tcg-virt.riscv64.xml           |  1 +
 .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  6 ++++
 .../qemu_5.2.0-virt.aarch64.xml               |  1 +
 .../qemu_5.2.0-virt.riscv64.xml               |  1 +
 tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  5 +++
 tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  5 +++
 tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  6 ++++
 .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  7 +++++
 .../qemu_6.0.0-virt.aarch64.xml               |  5 +++
 tests/domaincapsdata/qemu_6.0.0.aarch64.xml   |  5 +++
 tests/domaincapsdata/qemu_6.0.0.s390x.xml     |  5 +++
 tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml  |  7 +++++
 tests/domaincapsdata/qemu_6.1.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml  |  7 +++++
 .../qemu_6.2.0-virt.aarch64.xml               |  5 +++
 tests/domaincapsdata/qemu_6.2.0.aarch64.xml   |  5 +++
 tests/domaincapsdata/qemu_6.2.0.ppc64.xml     |  6 ++++
 tests/domaincapsdata/qemu_6.2.0.x86_64.xml    |  7 +++++
 .../qemu_7.0.0-hvf.aarch64+hvf.xml            |  5 +++
 .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |  7 +++++
 .../qemu_7.0.0-virt.aarch64.xml               |  5 +++
 tests/domaincapsdata/qemu_7.0.0.aarch64.xml   |  5 +++
 tests/domaincapsdata/qemu_7.0.0.ppc64.xml     |  6 ++++
 tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |  7 +++++
 tests/domaincapsdata/qemu_7.1.0.ppc64.xml     |  6 ++++
 tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |  7 +++++
 .../qemu_7.2.0-hvf.x86_64+hvf.xml             |  7 +++++
 .../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |  7 +++++
 .../qemu_7.2.0-tcg.x86_64+hvf.xml             |  7 +++++
 .../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |  7 +++++
 tests/domaincapsdata/qemu_7.2.0.ppc.xml       |  5 +++
 tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |  7 +++++
 .../qemu_8.0.0-tcg-virt.riscv64.xml           |  5 +++
 .../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |  7 +++++
 .../qemu_8.0.0-virt.riscv64.xml               |  5 +++
 tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |  7 +++++
 tests/domaincapsdata/qemu_8.1.0.s390x.xml     |  5 +++
 tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |  7 +++++
 .../qemu_8.2.0-tcg-virt.loongarch64.xml       |  5 +++
 .../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |  7 +++++
 .../qemu_8.2.0-virt.aarch64.xml               |  5 +++
 .../qemu_8.2.0-virt.loongarch64.xml           |  5 +++
 tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |  5 +++
 tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |  5 +++
 tests/domaincapsdata/qemu_8.2.0.s390x.xml     |  5 +++
 tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |  7 +++++
 tests/domaincapsdata/qemu_9.0.0.sparc.xml     |  1 +
 tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |  7 +++++
 .../qemu_9.1.0-tcg-virt.riscv64.xml           |  5 +++
 .../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |  7 +++++
 .../qemu_9.1.0-virt.riscv64.xml               |  5 +++
 tests/domaincapsdata/qemu_9.1.0.s390x.xml     |  5 +++
 tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |  7 +++++
 .../domaincapsdata/qemu_9.2.0-q35.x86_64.xml  |  7 +++++
 .../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml  |  7 +++++
 tests/domaincapsdata/qemu_9.2.0.x86_64.xml    |  7 +++++
 77 files changed, 502 insertions(+)

diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
index 5309c6c2513f..886a9f71e123 100644
--- a/docs/formatdomaincaps.rst
+++ b/docs/formatdomaincaps.rst
@@ -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
 ~~~~~~~~
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index cf40d798e51b..5f70a48cec80 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -669,6 +669,18 @@ virDomainCapsDeviceNetFormat(virBuffer *buf,
 }
 
 
+static void
+virDomainCapsDevicePanicFormat(virBuffer *buf,
+                               const virDomainCapsDevicePanic *panic)
+{
+    FORMAT_PROLOGUE(panic);
+
+    ENUM_PROCESS(panic, model, virDomainPanicModelTypeToString);
+
+    FORMAT_EPILOGUE(panic);
+}
+
+
 /**
  * virDomainCapsFeatureGICFormat:
  * @buf: target buffer
@@ -850,6 +862,7 @@ virDomainCapsFormat(const virDomainCaps *caps)
     virDomainCapsDeviceChannelFormat(&buf, &caps->channel);
     virDomainCapsDeviceCryptoFormat(&buf, &caps->crypto);
     virDomainCapsDeviceNetFormat(&buf, &caps->net);
+    virDomainCapsDevicePanicFormat(&buf, &caps->panic);
 
     virBufferAdjustIndent(&buf, -2);
     virBufferAddLit(&buf, "</devices>\n");
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index a706ab337ec2..ef0804686046 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -257,6 +257,13 @@ struct _virDomainCapsDeviceNet {
     virDomainCapsEnum backendType; /* virDomainNetBackendType */
 };
 
+STATIC_ASSERT_ENUM(VIR_DOMAIN_PANIC_MODEL_LAST);
+typedef struct _virDomainCapsDevicePanic virDomainCapsDevicePanic;
+struct _virDomainCapsDevicePanic {
+    virTristateBool supported;
+    virDomainCapsEnum model;   /* virDomainPanicModel */
+};
+
 typedef enum {
     VIR_DOMAIN_CAPS_FEATURE_IOTHREADS = 0,
     VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO,
@@ -295,6 +302,7 @@ struct _virDomainCaps {
     virDomainCapsDeviceChannel channel;
     virDomainCapsDeviceCrypto crypto;
     virDomainCapsDeviceNet net;
+    virDomainCapsDevicePanic panic;
     /* add new domain devices here */
 
     virDomainCapsFeatureGIC gic;
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 9322ae9ae6c8..38fdade255fe 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -6639,6 +6639,35 @@ virQEMUCapsFillDomainDeviceNetCaps(virQEMUCaps *qemuCaps,
 }
 
 
+void
+virQEMUCapsFillDomainDevicePanicCaps(virQEMUCaps *qemuCaps,
+                                     const char *machine,
+                                     virDomainCapsDevicePanic *panic)
+{
+    panic->model.report = true;
+
+    if (ARCH_IS_S390(qemuCaps->arch))
+        VIR_DOMAIN_CAPS_ENUM_SET(panic->model, VIR_DOMAIN_PANIC_MODEL_S390);
+
+    if (ARCH_IS_X86(qemuCaps->arch))
+        VIR_DOMAIN_CAPS_ENUM_SET(panic->model, VIR_DOMAIN_PANIC_MODEL_HYPERV);
+
+    if (qemuDomainMachineIsPSeries(machine, qemuCaps->arch))
+        VIR_DOMAIN_CAPS_ENUM_SET(panic->model, VIR_DOMAIN_PANIC_MODEL_PSERIES);
+
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PANIC))
+        VIR_DOMAIN_CAPS_ENUM_SET(panic->model, VIR_DOMAIN_PANIC_MODEL_ISA);
+
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PANIC_PCI))
+        VIR_DOMAIN_CAPS_ENUM_SET(panic->model, VIR_DOMAIN_PANIC_MODEL_PVPANIC);
+
+    if (panic->model.values)
+        panic->supported = VIR_TRISTATE_BOOL_YES;
+    else
+        panic->supported = VIR_TRISTATE_BOOL_NO;
+}
+
+
 /**
  * virQEMUCapsSupportsGICVersion:
  * @qemuCaps: QEMU capabilities
@@ -6817,6 +6846,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
     virDomainCapsDeviceCrypto *crypto = &domCaps->crypto;
     virDomainCapsLaunchSecurity *launchSecurity = &domCaps->launchSecurity;
     virDomainCapsDeviceNet *net = &domCaps->net;
+    virDomainCapsDevicePanic *panic = &domCaps->panic;
 
     virQEMUCapsFillDomainFeaturesFromQEMUCaps(qemuCaps, domCaps);
 
@@ -6859,6 +6889,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
     virQEMUCapsFillDomainDeviceCryptoCaps(qemuCaps, crypto);
     virQEMUCapsFillDomainLaunchSecurity(qemuCaps, launchSecurity);
     virQEMUCapsFillDomainDeviceNetCaps(qemuCaps, net);
+    virQEMUCapsFillDomainDevicePanicCaps(qemuCaps, domCaps->machine, panic);
 
     return 0;
 }
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 54c7e30903ca..261abcc1b473 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -892,6 +892,10 @@ void virQEMUCapsFillDomainLaunchSecurity(virQEMUCaps *qemuCaps,
 void virQEMUCapsFillDomainDeviceNetCaps(virQEMUCaps *qemuCaps,
                                         virDomainCapsDeviceNet *net);
 
+void virQEMUCapsFillDomainDevicePanicCaps(virQEMUCaps *qemuCaps,
+                                          const char *machine,
+                                          virDomainCapsDevicePanic *panic);
+
 bool virQEMUCapsGuestIsNative(virArch host,
                               virArch guest);
 
diff --git a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
index 81bf0ceb0048..5579ad3fc21b 100644
--- a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
@@ -536,6 +536,12 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
index eaed71b4ee4b..ac2805919031 100644
--- a/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
@@ -146,6 +146,7 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='no'/>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
index 054bf4a88bdc..a111a8d75162 100644
--- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
@@ -804,6 +804,12 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
index 00f434b7d729..4708b32b896e 100644
--- a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml
@@ -200,6 +200,7 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='no'/>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml b/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
index 14d936ea4b0d..d636e5686a6d 100644
--- a/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
@@ -149,6 +149,7 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='no'/>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
index 00f434b7d729..4708b32b896e 100644
--- a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml
@@ -200,6 +200,7 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='no'/>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
index 3413138fba84..a6daef9798a7 100644
--- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml
@@ -166,6 +166,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pseries</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_5.2.0.s390x.xml b/tests/domaincapsdata/qemu_5.2.0.s390x.xml
index 34234a7a2cb4..b64f90872344 100644
--- a/tests/domaincapsdata/qemu_5.2.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.s390x.xml
@@ -266,6 +266,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>s390</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
index f298829e3463..8882b9c8a792 100644
--- a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml
@@ -536,6 +536,12 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
index c738f2f9ed95..b0a4bce914a0 100644
--- a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml
@@ -546,6 +546,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
index bb1c66cdbfb5..334a52317932 100644
--- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
@@ -837,6 +837,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
index 9f07b6417836..74f3a04bb053 100644
--- a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml
@@ -202,6 +202,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
index 9f07b6417836..74f3a04bb053 100644
--- a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml
@@ -202,6 +202,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_6.0.0.s390x.xml b/tests/domaincapsdata/qemu_6.0.0.s390x.xml
index 7b3d1ab4929b..0db677999091 100644
--- a/tests/domaincapsdata/qemu_6.0.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_6.0.0.s390x.xml
@@ -267,6 +267,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>s390</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
index 1efa0578bd2d..30e5686593b8 100644
--- a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml
@@ -546,6 +546,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
index fe22898504ad..777b7c5198d2 100644
--- a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml
@@ -548,6 +548,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
index 11ef8be5e3f6..6c58d132d9bf 100644
--- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
@@ -838,6 +838,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
index 43ed790a205f..68b0a658dd8d 100644
--- a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml
@@ -548,6 +548,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
index a7240ff9a701..4a055e19ecf9 100644
--- a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml
@@ -547,6 +547,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
index 40a69c1ce4c5..91dbb8ff7853 100644
--- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
@@ -838,6 +838,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
index ea9a62d78922..051d2782b612 100644
--- a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml
@@ -209,6 +209,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
index ea9a62d78922..051d2782b612 100644
--- a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml
@@ -209,6 +209,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
index 84f2f31e444c..39b07955dd84 100644
--- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml
@@ -165,6 +165,12 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pseries</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
index 1452c4ddd163..466be5c7a0df 100644
--- a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml
@@ -547,6 +547,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml b/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml
index 32eee7ea3b25..bf130dde1075 100644
--- a/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml
+++ b/tests/domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml
@@ -167,6 +167,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml
index c118289a42db..637579d6ec02 100644
--- a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml
@@ -548,6 +548,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml
index 89b5758040b7..1ed0cef05b31 100644
--- a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml
@@ -832,6 +832,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml
index 1e0fca49889d..4c49343c438e 100644
--- a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml
@@ -208,6 +208,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml
index 1e0fca49889d..4c49343c438e 100644
--- a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml
@@ -208,6 +208,11 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml
index 9c31ff40dc8d..52c73d10a4ab 100644
--- a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml
@@ -170,6 +170,12 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pseries</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml
index 935cdcadfd70..acde0c66d9a3 100644
--- a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml
@@ -548,6 +548,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml
index 58a39ed39c32..591e15ab24ab 100644
--- a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml
@@ -515,6 +515,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml
index 387195c12ac5..52086550dbab 100644
--- a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml
@@ -780,6 +780,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.1.0.ppc64.xml b/tests/domaincapsdata/qemu_7.1.0.ppc64.xml
index 3028db7af4af..ca0bc6f0b5af 100644
--- a/tests/domaincapsdata/qemu_7.1.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_7.1.0.ppc64.xml
@@ -163,6 +163,12 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pseries</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml
index 5082cc119f94..1170d8ed2caa 100644
--- a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml
@@ -515,6 +515,13 @@
         <value>default</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml b/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml
index 091735d83b2a..75b2f1102d1a 100644
--- a/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml
+++ b/tests/domaincapsdata/qemu_7.2.0-hvf.x86_64+hvf.xml
@@ -175,6 +175,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml
index bf6b22a6ad8f..653a7a7bacc3 100644
--- a/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.2.0-q35.x86_64.xml
@@ -522,6 +522,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml
index 6cc40ab932ae..779bdddad660 100644
--- a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml
+++ b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64+hvf.xml
@@ -663,6 +663,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml
index 6cc40ab932ae..779bdddad660 100644
--- a/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.2.0-tcg.x86_64.xml
@@ -663,6 +663,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.2.0.ppc.xml b/tests/domaincapsdata/qemu_7.2.0.ppc.xml
index 416ebc6f7647..c6ef37b1afad 100644
--- a/tests/domaincapsdata/qemu_7.2.0.ppc.xml
+++ b/tests/domaincapsdata/qemu_7.2.0.ppc.xml
@@ -150,6 +150,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_7.2.0.x86_64.xml b/tests/domaincapsdata/qemu_7.2.0.x86_64.xml
index 3c698aea3377..72d4e7be3984 100644
--- a/tests/domaincapsdata/qemu_7.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_7.2.0.x86_64.xml
@@ -522,6 +522,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml
index c5c1b0fa692b..3ba9419ede2b 100644
--- a/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml
@@ -563,6 +563,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml b/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
index af787b8b244e..7a9da4fe4fb2 100644
--- a/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
@@ -153,6 +153,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml
index 971d3398ce3e..e5ef1673c367 100644
--- a/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml
@@ -714,6 +714,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml b/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
index 0e3e9b817fdf..258df5b1342b 100644
--- a/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
@@ -156,6 +156,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.0.0.x86_64.xml b/tests/domaincapsdata/qemu_8.0.0.x86_64.xml
index 34341b85595e..9b935c0a6bdd 100644
--- a/tests/domaincapsdata/qemu_8.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0.x86_64.xml
@@ -563,6 +563,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml
index 5ad09e197c21..18d26fbae6a0 100644
--- a/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml
@@ -648,6 +648,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml
index a24986f04cd7..6e6a5a8b6c3b 100644
--- a/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml
@@ -723,6 +723,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.1.0.s390x.xml b/tests/domaincapsdata/qemu_8.1.0.s390x.xml
index 3564f74cad02..2ca3b1d2ae20 100644
--- a/tests/domaincapsdata/qemu_8.1.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_8.1.0.s390x.xml
@@ -417,6 +417,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>s390</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.1.0.x86_64.xml b/tests/domaincapsdata/qemu_8.1.0.x86_64.xml
index c93e05ec60f8..8880cc4bba94 100644
--- a/tests/domaincapsdata/qemu_8.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.1.0.x86_64.xml
@@ -648,6 +648,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_8.2.0-q35.x86_64.xml
index fda177a385ae..2cffb87550c2 100644
--- a/tests/domaincapsdata/qemu_8.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0-q35.x86_64.xml
@@ -650,6 +650,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0-tcg-virt.loongarch64.xml b/tests/domaincapsdata/qemu_8.2.0-tcg-virt.loongarch64.xml
index 3917ce6138c6..c9f01904cdc0 100644
--- a/tests/domaincapsdata/qemu_8.2.0-tcg-virt.loongarch64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0-tcg-virt.loongarch64.xml
@@ -157,6 +157,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_8.2.0-tcg.x86_64.xml
index 694d55f5d8e9..5a7042c7ba95 100644
--- a/tests/domaincapsdata/qemu_8.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0-tcg.x86_64.xml
@@ -715,6 +715,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_8.2.0-virt.aarch64.xml
index 1d1af1a2ac4b..224c61916896 100644
--- a/tests/domaincapsdata/qemu_8.2.0-virt.aarch64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0-virt.aarch64.xml
@@ -215,6 +215,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_8.2.0-virt.loongarch64.xml b/tests/domaincapsdata/qemu_8.2.0-virt.loongarch64.xml
index edddb6d8e721..ed3637eaec0a 100644
--- a/tests/domaincapsdata/qemu_8.2.0-virt.loongarch64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0-virt.loongarch64.xml
@@ -161,6 +161,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0.aarch64.xml b/tests/domaincapsdata/qemu_8.2.0.aarch64.xml
index 1d1af1a2ac4b..224c61916896 100644
--- a/tests/domaincapsdata/qemu_8.2.0.aarch64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0.aarch64.xml
@@ -215,6 +215,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='yes'>
diff --git a/tests/domaincapsdata/qemu_8.2.0.armv7l.xml b/tests/domaincapsdata/qemu_8.2.0.armv7l.xml
index fb0f7665bc5d..7182dca796f2 100644
--- a/tests/domaincapsdata/qemu_8.2.0.armv7l.xml
+++ b/tests/domaincapsdata/qemu_8.2.0.armv7l.xml
@@ -167,6 +167,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0.s390x.xml b/tests/domaincapsdata/qemu_8.2.0.s390x.xml
index bcd3f685035f..57ac07c1532f 100644
--- a/tests/domaincapsdata/qemu_8.2.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_8.2.0.s390x.xml
@@ -417,6 +417,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>s390</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_8.2.0.x86_64.xml b/tests/domaincapsdata/qemu_8.2.0.x86_64.xml
index 35badddb3d3b..9b18209a23b3 100644
--- a/tests/domaincapsdata/qemu_8.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_8.2.0.x86_64.xml
@@ -650,6 +650,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_9.0.0-q35.x86_64.xml
index 01e31c538f4c..024375a3548f 100644
--- a/tests/domaincapsdata/qemu_9.0.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.0.0-q35.x86_64.xml
@@ -650,6 +650,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_9.0.0-tcg.x86_64.xml
index 6449ffefb224..f379930ff7c3 100644
--- a/tests/domaincapsdata/qemu_9.0.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.0.0-tcg.x86_64.xml
@@ -691,6 +691,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.0.0.sparc.xml b/tests/domaincapsdata/qemu_9.0.0.sparc.xml
index ab5c3dc4e9ba..e48cdd0ae587 100644
--- a/tests/domaincapsdata/qemu_9.0.0.sparc.xml
+++ b/tests/domaincapsdata/qemu_9.0.0.sparc.xml
@@ -129,6 +129,7 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='no'/>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.0.0.x86_64.xml b/tests/domaincapsdata/qemu_9.0.0.x86_64.xml
index 3f3f25cf239f..42d38288929c 100644
--- a/tests/domaincapsdata/qemu_9.0.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.0.0.x86_64.xml
@@ -650,6 +650,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_9.1.0-q35.x86_64.xml
index 6dd5dcd7a5b1..945e783a25e5 100644
--- a/tests/domaincapsdata/qemu_9.1.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.1.0-q35.x86_64.xml
@@ -681,6 +681,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.1.0-tcg-virt.riscv64.xml b/tests/domaincapsdata/qemu_9.1.0-tcg-virt.riscv64.xml
index 0ae1d0b614fe..b4327bf8783b 100644
--- a/tests/domaincapsdata/qemu_9.1.0-tcg-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_9.1.0-tcg-virt.riscv64.xml
@@ -180,6 +180,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_9.1.0-tcg.x86_64.xml
index 739af1fa3558..9ad8eca8452e 100644
--- a/tests/domaincapsdata/qemu_9.1.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.1.0-tcg.x86_64.xml
@@ -710,6 +710,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.1.0-virt.riscv64.xml b/tests/domaincapsdata/qemu_9.1.0-virt.riscv64.xml
index d3b3971127e3..73e5ba1bc376 100644
--- a/tests/domaincapsdata/qemu_9.1.0-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_9.1.0-virt.riscv64.xml
@@ -169,6 +169,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.1.0.s390x.xml b/tests/domaincapsdata/qemu_9.1.0.s390x.xml
index 2df3dab0173b..be46cfe6ba43 100644
--- a/tests/domaincapsdata/qemu_9.1.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_9.1.0.s390x.xml
@@ -285,6 +285,11 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>s390</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.1.0.x86_64.xml b/tests/domaincapsdata/qemu_9.1.0.x86_64.xml
index 46a54d8c5369..0a131bb15180 100644
--- a/tests/domaincapsdata/qemu_9.1.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.1.0.x86_64.xml
@@ -681,6 +681,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml
index deff784eeb20..64c841667244 100644
--- a/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml
@@ -681,6 +681,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml
index 40da25e78bfd..8a4fc13443db 100644
--- a/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml
@@ -710,6 +710,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
diff --git a/tests/domaincapsdata/qemu_9.2.0.x86_64.xml b/tests/domaincapsdata/qemu_9.2.0.x86_64.xml
index 393d24c2baa9..00f3b78e7e5e 100644
--- a/tests/domaincapsdata/qemu_9.2.0.x86_64.xml
+++ b/tests/domaincapsdata/qemu_9.2.0.x86_64.xml
@@ -681,6 +681,13 @@
         <value>passt</value>
       </enum>
     </interface>
+    <panic supported='yes'>
+      <enum name='model'>
+        <value>isa</value>
+        <value>hyperv</value>
+        <value>pvpanic</value>
+      </enum>
+    </panic>
   </devices>
   <features>
     <gic supported='no'/>
-- 
2.47.0
Re: [PATCH] qemu: Report supported panic device models in domcapabilities
Posted by Ján Tomko 2 weeks, 2 days ago
On a Tuesday in 2024, Martin Kletzander wrote:
>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>
>---
> docs/formatdomaincaps.rst                     | 24 ++++++++++++++
> src/conf/domain_capabilities.c                | 13 ++++++++

[...]

> .../domaincapsdata/qemu_9.2.0-q35.x86_64.xml  |  7 +++++
> .../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml  |  7 +++++
> tests/domaincapsdata/qemu_9.2.0.x86_64.xml    |  7 +++++
> 77 files changed, 502 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano