summaryrefslogtreecommitdiffstats
path: root/include/sysemu/accel.h
diff options
context:
space:
mode:
authorEduardo Habkost2014-09-26 22:45:29 +0200
committerPaolo Bonzini2014-10-04 08:59:16 +0200
commit0d15da8e6fc3cbcd088476c561dcc88b9aae493a (patch)
tree562e5ca31930e9ed9383199f333ac429576e6469 /include/sysemu/accel.h
parentaccel: Move accel init/allowed code to separate function (diff)
downloadqemu-0d15da8e6fc3cbcd088476c561dcc88b9aae493a.tar.gz
qemu-0d15da8e6fc3cbcd088476c561dcc88b9aae493a.tar.xz
qemu-0d15da8e6fc3cbcd088476c561dcc88b9aae493a.zip
accel: Rename 'init' method to 'init_machine'
Today, all accelerator init functions affect some global state: * tcg_init() calls tcg_exec_init() and affects globals such as tcg_tcx, page size globals, and possibly others; * kvm_init() changes the kvm_state global, cpu_interrupt_handler, and possibly others; * xen_init() changes the xen_xc global, and registers a change state handler. With the new accelerator QOM classes, initialization may now be split in two steps: * instance_init() will do basic initialization that doesn't affect any global state and don't need MachineState or MachineClass data. This will allow probing code to safely create multiple accelerator objects on the fly just for reporting host/accelerator capabilities, for example. * accel_init_machine()/init_machine() will save the accelerator object in MachineState, and do initialization steps which still affect global state, machine state, or that need data from MachineClass or MachineState. To clarify the difference between those two steps, rename init() to init_machine(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu/accel.h')
-rw-r--r--include/sysemu/accel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h
index 120ca0e5c0..8812cdae21 100644
--- a/include/sysemu/accel.h
+++ b/include/sysemu/accel.h
@@ -39,7 +39,7 @@ typedef struct AccelClass {
const char *opt_name;
const char *name;
int (*available)(void);
- int (*init)(MachineClass *mc);
+ int (*init_machine)(MachineClass *mc);
bool *allowed;
} AccelClass;