[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 9/9] vl: exit if a bad property value is passed to -g
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 9/9] vl: exit if a bad property value is passed to -global |
Date: |
Wed, 27 Jul 2016 11:29:21 -0300 |
From: Greg Kurz <address@hidden>
When passing '-global driver=host-powerpc64-cpu,property=compat,value=foo'
on the command line, without this patch, we get the following warning per
device (which means many lines if the guests has many cpus):
qemu-system-ppc64: Warning: can't apply global host-powerpc64-cpu.compat=foo:
Invalid compatibility mode "foo"
... and QEMU continues execution, ignoring the property.
With this patch, we get a single line:
qemu-system-ppc64: can't apply global host-powerpc64-cpu.compat=foo:
Invalid compatibility mode "foo"
... and QEMU exits.
The previous behavior is kept for hotplugged devices since we don't want
QEMU to exit when doing device_add.
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
vl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vl.c b/vl.c
index a455947..e7c2c62 100644
--- a/vl.c
+++ b/vl.c
@@ -2922,6 +2922,7 @@ static int global_init_func(void *opaque, QemuOpts *opts,
Error **errp)
g->property = qemu_opt_get(opts, "property");
g->value = qemu_opt_get(opts, "value");
g->user_provided = true;
+ g->errp = &error_fatal;
qdev_prop_register_global(g);
return 0;
}
--
2.5.5
- [Qemu-devel] [PULL 0/9] x86 and machine queue, 2016-07-27, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 1/9] exec: Reduce CONFIG_USER_ONLY ifdeffenery, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 2/9] exec: Don't use cpu_index to detect if cpu_exec_init()'s been called, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 3/9] exec: Set cpu_index only if it's not been explictly set, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 4/9] qdev: Fix object reference leak in case device.realize() fails, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 6/9] Revert "pc: Enforce adding CPUs contiguously and removing them in opposite order", Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 5/9] pc: Init CPUState->cpu_index with index in possible_cpus[], Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 7/9] machine: Add comment to abort path in machine_set_kernel_irqchip, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 8/9] qdev: ignore GlobalProperty.errp for hotplugged devices, Eduardo Habkost, 2016/07/27
- [Qemu-devel] [PULL 9/9] vl: exit if a bad property value is passed to -global,
Eduardo Habkost <=
- Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2016-07-27, Peter Maydell, 2016/07/28