cpu: Replace cpu_single_env with CPUState cpu_single_cpu

Move it to qom/cpu.h.

Signed-off-by: Andreas Färber <afaerber@suse.de>
kvm: Change kvm_remove_all_breakpoints() argument to CPUState

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Make first_cpu and next_cpu CPUState

Move first_cpu to qom/cpu.h.

gdbstub needs to use CPUState::env_ptr for now.

Signed-off-by: Andreas Färber <afaerber@suse.de>
linux-user: Change thread_env to CPUState

Signed-off-by: Andreas Färber <afaerber@suse.de>
bsd-user: Change thread_env to CPUState

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Drop qemu_for_each_cpu()

Revert commit d6b9e0d60cc511eca210834428bb74508cff3d33 (cpu: Add
qemu_for_each_cpu()) and its usage in favor of open-coding CPU loops,
now that they are based on CPUState.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
intc/arm_gic: Build arm_gic only once

Since cpu_single_cpu is CPUState it no longer needs CPUArchState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
intc/openpic: Build openpic only once

Since cpu_single_cpu is CPUState it no longer depends on CPUPPCState.

Move ppce500_set_mpic_proxy() to a new hw/ppc/ppc_e500.h because
hw/ppc/ppc.h is too heavily using CPUPPCState and PowerPCCPU.

Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
timer/arm_mptimer: Build arm_mptimer only once

Since cpu_single_cpu is CPUState it no longer depends on CPUArchState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
log: Change log_cpu_state[_mask]() argument to CPUState

Make them available outside NEED_CPU_H and add documentation.

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

x86 was using additional CPU_DUMP_* flags, so make that configurable in
CPUClass::reset_dump_flags.

This adds reset logging for alpha, unicore32 and xtensa.

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