cpus: Pass CPUState to qemu_cpu_is_self()

Change return type to bool, move to include/qemu/cpu.h and
add documentation.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
[AF: Updated new caller qemu_in_vcpu_thread()]
cpus: Pass CPUState to qemu_cpu_kick_thread()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
cpu: Move created field to CPUState

Change its type to bool.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move stop field to CPUState

Change its type to bool.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ppce500_spin: Store PowerPCCPU in SpinKick

Needed for moving stopped field to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move stopped field to CPUState

Change its type to bool.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to cpu_is_stopped()

CPUArchState is no longer needed there.

Also change the return type to bool.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to cpu_can_run()

CPUArchState is no longer needed there.

Also change its return type to bool.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move halt_cond to CPUState

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to qemu_tcg_cpu_thread_fn

CPUArchState is no longer needed except for iterating the CPUs.

Needed for qemu_tcg_init_vcpu().

KVM and dummy threads still need CPUArchState for cpu_single_env.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to qemu_tcg_init_vcpu()

CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ppc: Pass PowerPCCPU to {ppc6xx,ppc970,power7,ppc40x,ppce500}_set_irq()

Needed for changing qemu_cpu_kick() argument type to CPUState and
for moving halted field into CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-ppc: Rename kvm_kick_{env => cpu} and pass PowerPCCPU

Needed for changing qemu_cpu_kick() argument type to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to qemu_cpu_kick()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move queued_work_{first,last} to CPUState

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to flush_queued_work()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpus: Pass CPUState to qemu_wait_io_event_common()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <afaerber@suse.de>
xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb()

Needed for changing cpu_has_work() argument type to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
target-ppc: Pass PowerPCCPU to powerpc_excp()

Needed for changing cpu_ppc_hypercall() argument type to PowerPCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall

Adapt emulate_spapr_hypercall() accordingly.

Needed for changing spapr_hypercall() argument type to PowerPCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>