[libvirt] [PATCH] conf: Ignore panic device on pSeries.
Daniel P. Berrange
berrange at redhat.com
Fri May 8 08:29:12 UTC 2015
On Thu, May 07, 2015 at 06:40:52PM +0200, Andrea Bolognani wrote:
> 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
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list