aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-03-10 18:59:54 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-03-11 18:14:23 +0100
commit446f16a6906e9d05aa9ce0dde727d4f731a89298 (patch)
tree872eba40ba77b857f33b1fb339cba11dfd82d87f /kvm-all.c
parentd8870d0217216478888c2d3dd6bf62e155d978c8 (diff)
machine: query kernel-irqchip property
Running x86_64-softmmu/qemu-system-x86_64 -machine pc,kernel_irqchip=on -enable-kvm leads to crash: qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core dumped) This happens because the commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Fix this by querying machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 07ef62cb32..729f3345ac 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1360,11 +1360,11 @@ int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq)
false);
}
-static int kvm_irqchip_create(KVMState *s)
+static int kvm_irqchip_create(MachineState *machine, KVMState *s)
{
int ret;
- if (!qemu_opt_get_bool(qemu_get_machine_opts(), "kernel_irqchip", true) ||
+ if (!machine_kernel_irqchip_allowed(machine) ||
(!kvm_check_extension(s, KVM_CAP_IRQCHIP) &&
(kvm_vm_enable_cap(s, KVM_CAP_S390_IRQCHIP, 0) < 0))) {
return 0;
@@ -1603,7 +1603,7 @@ static int kvm_init(MachineState *ms)
goto err;
}
- ret = kvm_irqchip_create(s);
+ ret = kvm_irqchip_create(ms, s);
if (ret < 0) {
goto err;
}