kvm: Change kvm_cpu_synchronize_state() argument to CPUState

It no longer relies on CPUArchState since 20d695a.

Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.
In cpu_synchronize_all_states() use qemu_for_each_cpu() now.

Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
gdbstub: Simplify find_cpu()

Use qemu_get_cpu() and CPUState::env_ptr.

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

It no longer depends on CPUArchState, so move it to qom/cpu.c.

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

It no longer needs CPUArchState.

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

It no longer uses CPUArchState.

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

CPUArchState is no longer needed.

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

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

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

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

Signed-off-by: Andreas Färber <afaerber@suse.de>
gdbstub: Set gdb_set_stop_cpu() argument to CPUState

Use CPUState::env_ptr for now.

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

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

Pass it on to qemu_kvm_cpu_thread_fn().

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

Pass it to qemu_dummy_cpu_thread_fn().
Use CPUState::env_ptr for cpu_single_env.

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

This allows to move the call to CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Signed-off-by: Andreas Färber <afaerber@suse.de>
hwaddr: Make hwaddr type usable beyond softmmu

While not normally needed for *-user, it can safely be used there since
always based on uint64_t, to avoid ifdeffery.

To avoid accidental uses, move the guards from exec/hwaddr.h to its
inclusion sites.  No need for them in include/hw/.

Prepares for hwaddr use in qom/cpu.h.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Turn cpu_unassigned_access() into a CPUState hook

Use it for all targets, but be careful not to pass invalid CPUState.
cpu_single_env can be NULL, e.g. on Xen.

Signed-off-by: Andreas Färber <afaerber@suse.de>
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>