qom: Make info qom-tree sort children more efficiently
[qemu/armbru.git] / accel / qtest.c
blob5b88f55921920d9525c55afa34d729f6384fea69
1 /*
2 * QTest accelerator code
4 * Copyright IBM, Corp. 2011
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
14 #include "qemu/osdep.h"
15 #include "qapi/error.h"
16 #include "qemu/module.h"
17 #include "qemu/option.h"
18 #include "qemu/config-file.h"
19 #include "sysemu/accel.h"
20 #include "sysemu/qtest.h"
21 #include "sysemu/cpus.h"
23 static int qtest_init_accel(MachineState *ms)
25 QemuOpts *opts = qemu_opts_create(qemu_find_opts("icount"), NULL, 0,
26 &error_abort);
27 qemu_opt_set(opts, "shift", "0", &error_abort);
28 configure_icount(opts, &error_abort);
29 qemu_opts_del(opts);
30 return 0;
33 static void qtest_accel_class_init(ObjectClass *oc, void *data)
35 AccelClass *ac = ACCEL_CLASS(oc);
36 ac->name = "QTest";
37 ac->init_machine = qtest_init_accel;
38 ac->allowed = &qtest_allowed;
41 #define TYPE_QTEST_ACCEL ACCEL_CLASS_NAME("qtest")
43 static const TypeInfo qtest_accel_type = {
44 .name = TYPE_QTEST_ACCEL,
45 .parent = TYPE_ACCEL,
46 .class_init = qtest_accel_class_init,
49 static void qtest_type_init(void)
51 type_register_static(&qtest_accel_type);
54 type_init(qtest_type_init);