On Fri, Nov 13, 2015 at 20:16:39 +0300, Dmitry Andreev wrote: > Choose 'ise' or 'pseries' model for panic device 'default' model s/ise/isa/ > value. > > Fixed tests and add two new outputs for xml-2-xml tests. > > Set value Did you want to say something more here? Anyway, most of this patch should either go before 2/6 qemu: add support for hv_crash feature as a panic device or it can alternatively be squashed into it. > --- > src/qemu/qemu_command.c | 14 ++-------- > src/qemu/qemu_domain.c | 9 +++++++ > .../qemuxml2argvdata/qemuxml2argv-panic-double.xml | 2 +- > .../qemuxml2argv-panic-no-address.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +- > .../qemuxml2argv-pseries-nvram.xml | 2 +- > tests/qemuxml2xmloutdata/qemuxml2xmlout-panic.xml | 31 ++++++++++++++++++++++ > .../qemuxml2xmlout-pseries-panic-missing.xml | 2 +- > .../qemuxml2xmlout-pseries-panic-no-address.xml | 30 +++++++++++++++++++++ > tests/qemuxml2xmltest.c | 4 +-- > 10 files changed, 79 insertions(+), 19 deletions(-) > create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-panic.xml > create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-panic-no-address.xml > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > index 965b68e..2a44c25 100644 > --- a/src/qemu/qemu_command.c > +++ b/src/qemu/qemu_command.c > @@ -11162,17 +11162,7 @@ qemuBuildCommandLine(virConnectPtr conn, > } > > for (i = 0; i < def->npanics; i++) { > - virDomainPanicModel model = def->panics[i]->model; > - > - if (model == VIR_DOMAIN_PANIC_MODEL_DEFAULT) { > - if (ARCH_IS_PPC64(def->os.arch) && > - STRPREFIX(def->os.machine, "pseries")) > - model = VIR_DOMAIN_PANIC_MODEL_PSERIES; > - else > - model = VIR_DOMAIN_PANIC_MODEL_ISA; > - } > - > - switch (model) { > + switch ((virDomainPanicModel) def->panics[i]->model) { > case VIR_DOMAIN_PANIC_MODEL_HYPERV: > /* Panic with model 'hyperv' is not a device, it should > * be configured in cpu commandline. The address > @@ -11230,7 +11220,7 @@ qemuBuildCommandLine(virConnectPtr conn, > goto error; > } > > - /* default model value was changed before switch */ > + /* default model value was changed is PostParse */ s/is/in/ > case VIR_DOMAIN_PANIC_MODEL_DEFAULT: > case VIR_DOMAIN_PANIC_MODEL_LAST: > break; ... Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list