提交 afb4c6b6 编写于 作者: E Erik Skultety 提交者: Martin Kletzander

qemu: panic device: check for invalid address type

qemu now checks for invalid address type for a panic device, which is
currently implemented only to use ISA address type, thus rejecting
any other options, except for leaving XML attributes blank, in that case,
defaults are used (this behaviour remains the same from earlier verions).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1138125Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 03890605
......@@ -9418,12 +9418,18 @@ qemuBuildCommandLine(virConnectPtr conn,
if (def->panic) {
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PANIC)) {
if (def->panic->info.addr.isa.iobase > 0) {
if (def->panic->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA) {
virCommandAddArg(cmd, "-device");
virCommandAddArgFormat(cmd, "pvpanic,ioport=%d",
def->panic->info.addr.isa.iobase);
} else {
} else if (def->panic->info.type ==
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virCommandAddArgList(cmd, "-device", "pvpanic", NULL);
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("panic is supported only "
"with ISA address type"));
goto error;
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册