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>
target-ppc: Don't overuse ENV_GET_CPU()

Commit b632a148b677b773ff155f9de840b37a653567b9 (target-ppc: QOM method
dispatch for MMU fault handling) introduced a use of ENV_GET_CPU()
inside target-ppc/ code. Use ppc_env_get_cpu() instead.

Purely cosmetic, non-functional change to aid in locating in removing
ENV_GET_CPU() usages.

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-s390x: Don't overuse ENV_GET_CPU()

Commit 3474b679486caa8f6448bae974e131370f360c13 (Utilize selective
runtime reg sync for hot code paths) introduced two uses of
ENV_GET_CPU() inside target-s390x/ KVM code. In one case we can use a
direct CPU() cast instead.

Cc: Jason J. Herne <jjherne@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
target-s390x: Change handle_{hypercall,diag}() to CPUState

This allows to get rid of the last remaining ENV_GET_CPU().

Cc: Jason J. Herne <jjherne@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Introduce CPUClass::set_pc() [WIP]

This moves setting the Program Counter from gdbstub into target code.

Signed-off-by: Andreas Färber <afaerber@suse.de>
gdbstub: Replace two find_cpu() with qemu_get_cpu()

Since changing cpu_synchronize_state() to CPUState one was no longer
accessing CPUArchState, the other was just checking existence.

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-alpha: Change gen_intermediate_code_internal() args to AlphaCPU/bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-arm: Change gen_intermediate_code_internal() args to ARMCPU and bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-cris: Change gen_intermediate_code_internal() args to CRISCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: Change gen_intermediate_code_internal() to X86CPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-lm32: Change gen_intermediate_code_internal() to LM32CPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-m68k: Change gen_intermediate_code_internal() to M68kCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-microblaze: Change gen_intermediate_code_internal() signature

MicroBlazeCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-mips: Change gen_intermediate_code_internal() to MIPSCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-ppc: Change gen_intermediate_code_internal() to PowerPCCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-s390x: Change gen_intermediate_code_internal() to S390CPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-sh4: Change gen_intermediate_code_internal() to SuperHCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-sparc: Change gen_intermediate_code_internal() to SPARCCPU+bool

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-unicore32: Change gen_intermediate_code_internal() signature

UniCore32CPU+bool

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