1. 09 Oct, 2014 1 commit
  2. 04 Oct, 2014 2 commits
    • Eduardo Habkost's avatar
      accel: Rename 'init' method to 'init_machine' · 0d15da8e
      Eduardo Habkost authored
      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: default avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0d15da8e
    • Eduardo Habkost's avatar
      accel: Move Xen registration code to xen-common.c · b152b05a
      Eduardo Habkost authored
      Note that this has an user-visible side-effect: instead of reporting
      "Xen is not supported for this target", QEMU binaries not supporting Xen
      will report "xen accelerator does not exist".
      
      As xen_available() always return 1 when CONFIG_XEN is enabled, we don't
      need to set AccelClass.available anymore. xen_enabled() is not being
      removed yet, but only because vl.c is still using it.
      
      This also allows us to make xen_init() static.
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b152b05a
  3. 07 May, 2014 1 commit