From 0d15da8e6fc3cbcd088476c561dcc88b9aae493a Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 26 Sep 2014 17:45:29 -0300 Subject: 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 Signed-off-by: Paolo Bonzini --- xen-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xen-common.c') diff --git a/xen-common.c b/xen-common.c index acc64d5cc8..acb738f2ff 100644 --- a/xen-common.c +++ b/xen-common.c @@ -126,7 +126,7 @@ static void xen_accel_class_init(ObjectClass *oc, void *data) { AccelClass *ac = ACCEL_CLASS(oc); ac->name = "Xen"; - ac->init = xen_init; + ac->init_machine = xen_init; ac->allowed = &xen_allowed; } -- cgit v1.2.3-55-g7522