cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook

Note that while such functions may exist both for *-user and softmmu,
only *-user uses the CPUState hook, while softmmu reuses the prototype
for calling it directly.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move mem_io_{pc,vaddr} fields from CPU_COMMON to CPUState

Reset them.

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

Rename can_do_io() to cpu_can_do_io() and change argument to CPUState.

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

Reset it.

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

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

Clear it on reset.

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

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

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

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

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

Most targets were using offsetof(CPUFooState, breakpoints) to determine
how much of CPUFooState to clear on reset. Use the next field after
CPU_COMMON instead, if any, or sizeof(CPUFooState) otherwise.

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

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

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

This lets us drop some local variables in tlb_fill() functions.

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

And normalize the argument order.

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

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

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

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

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook

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