The guest firmware already provides the same functionality, so we
can
just safely drop the <panic/> element from the domain definition.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1182388
---
src/conf/domain_conf.c | 17 +++++++-----
.../qemuxml2argv-pseries-panic.args | 7 +++++
.../qemuxml2argv-pseries-panic.xml | 30 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 ++
.../qemuxml2xmlout-pseries-panic.xml | 29 +++++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
6 files changed, 80 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-panic.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-panic.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic.xml
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4cd36a1..a7d4efa 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15478,13 +15478,18 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
}
if (n > 0) {
- virDomainPanicDefPtr panic =
- virDomainPanicDefParseXML(nodes[0]);
- if (!panic)
- goto error;
+ /* Ignore the panic device on pSeries, as the guest
+ * firmware already provides the same functionality */
+ if (!(ARCH_IS_PPC64(def->os.arch) &&
+ STRPREFIX(def->os.machine, "pseries"))) {
+ virDomainPanicDefPtr panic =
+ virDomainPanicDefParseXML(nodes[0]);
+ if (!panic)
+ goto error;
- def->panic = panic;
- VIR_FREE(nodes);
+ def->panic = panic;
+ VIR_FREE(nodes);
+ }
No, this is totally wrong thing todo. Any fix should be in the QEMU
code, not the XML parser.
Regards,
Daniel
--
|: