kvm: Free current_cpu identifier

Since CPU loops are done as last step, we do not need to distinguish
between invoking CPU and iterated CPUs and can thereby free the
identifier for use as a global variable.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Replace cpu_single_env with CPUState current_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>