mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: Sometimes the default panic model doesn't exist
Right now the fallback behavior is to use MODEL_ISA if we haven't been able to find a better match, but that's not very useful as we're still going to hit an error later, when QEMU_CAPS_DEVICE_PANIC is not found at Validate time. Instead of doing that, allow MODEL_DEFAULT to get all the way to Validate and report an error upon encountering it. The reported error changes slightly, but other than that the set of configurations that are allowed and blocked remains the same. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9e1970efa5
commit
6d92185a49
@ -4159,7 +4159,10 @@ qemuDomainDefaultPanicModel(const virDomainDef *def)
|
||||
if (ARCH_IS_S390(def->os.arch))
|
||||
return VIR_DOMAIN_PANIC_MODEL_S390;
|
||||
|
||||
return VIR_DOMAIN_PANIC_MODEL_ISA;
|
||||
if (ARCH_IS_X86(def->os.arch))
|
||||
return VIR_DOMAIN_PANIC_MODEL_ISA;
|
||||
|
||||
return VIR_DOMAIN_PANIC_MODEL_DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1048,8 +1048,12 @@ qemuValidateDomainDefPanic(const virDomainDef *def,
|
||||
}
|
||||
break;
|
||||
|
||||
/* default model value was changed before in post parse */
|
||||
case VIR_DOMAIN_PANIC_MODEL_DEFAULT:
|
||||
/* PostParse couldn't figure out a sensible default model */
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("no panic model provided, and no default for the architecture and machine type"));
|
||||
return -1;
|
||||
|
||||
case VIR_DOMAIN_PANIC_MODEL_LAST:
|
||||
break;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
unsupported configuration: the QEMU binary does not support the ISA panic device
|
||||
unsupported configuration: no panic model provided, and no default for the architecture and machine type
|
||||
|
@ -1 +1 @@
|
||||
unsupported configuration: the QEMU binary does not support the ISA panic device
|
||||
unsupported configuration: no panic model provided, and no default for the architecture and machine type
|
||||
|
Loading…
Reference in New Issue
Block a user