aboutsummaryrefslogtreecommitdiff
path: root/hw/core/machine.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-11-13 10:10:47 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-12-17 19:32:26 +0100
commit6f6e1698a68ceb49e57676528612f22eaf2c16c3 (patch)
treef6d9b5d646eaec9965450b044957b02ebf827182 /hw/core/machine.c
parente5db4bd863c8fdf155b003446b98a7aec65a931c (diff)
vl: configure accelerators from -accel options
Drop the "accel" property from MachineState, and instead desugar "-machine accel=" to a list of "-accel" options. This has a semantic change due to removing merge_lists from -accel. For example: - "-accel kvm -accel tcg" all but ignored "-accel kvm". This is a bugfix. - "-accel kvm -accel thread=single" ignored "thread=single", since it applied the option to KVM. Now it fails due to not specifying the accelerator on "-accel thread=single". - "-accel tcg -accel thread=single" chose single-threaded TCG, while now it will fail due to not specifying the accelerator on "-accel thread=single". Also, "-machine accel" and "-accel" become incompatible. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core/machine.c')
-rw-r--r--hw/core/machine.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 023548b4f3..e661fa609e 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -178,21 +178,6 @@ GlobalProperty hw_compat_2_1[] = {
};
const size_t hw_compat_2_1_len = G_N_ELEMENTS(hw_compat_2_1);
-static char *machine_get_accel(Object *obj, Error **errp)
-{
- MachineState *ms = MACHINE(obj);
-
- return g_strdup(ms->accel);
-}
-
-static void machine_set_accel(Object *obj, const char *value, Error **errp)
-{
- MachineState *ms = MACHINE(obj);
-
- g_free(ms->accel);
- ms->accel = g_strdup(value);
-}
-
static void machine_set_kernel_irqchip(Object *obj, Visitor *v,
const char *name, void *opaque,
Error **errp)
@@ -813,11 +798,6 @@ static void machine_class_init(ObjectClass *oc, void *data)
mc->numa_mem_align_shift = 23;
mc->numa_auto_assign_ram = numa_default_auto_assign_ram;
- object_class_property_add_str(oc, "accel",
- machine_get_accel, machine_set_accel, &error_abort);
- object_class_property_set_description(oc, "accel",
- "Accelerator list", &error_abort);
-
object_class_property_add(oc, "kernel-irqchip", "on|off|split",
NULL, machine_set_kernel_irqchip,
NULL, NULL, &error_abort);
@@ -976,7 +956,6 @@ static void machine_finalize(Object *obj)
{
MachineState *ms = MACHINE(obj);
- g_free(ms->accel);
g_free(ms->kernel_filename);
g_free(ms->initrd_filename);
g_free(ms->kernel_cmdline);