History | View | Annotate | Download (6.3 kB)
cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"
Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".
The reason for the failure is that CPUClass::kvm_fd is not yet...
cpu: Introduce CPUClass::gdb_{read,write}_register()
Completes migration of target-specific code to new target-*/gdbstub.c.
Acked-by: Michael Walle <michael@walle.cc> (for lm32)Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa)Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Introduce CPUClass::gdb_core_xml_file for GDB_CORE_XML
Replace the GDB_CORE_XML define in gdbstub.c with a CPUClass field.Use first_cpu for qSupported and qXfer:features:read: for now.Add a stub for xml_builtin.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs
CPUState::gdb_num_regs replaces num_g_regs.CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.
Allows building gdb_register_coprocessor() for xtensa, too.
As a side effect this should fix coprocessor register numbering for SMP....
cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook
Change breakpoint_invalidate() argument to CPUState alongside.
Since all targets now assign a softmmu-only field, we can drop helperscpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....
target-m68k: Implement CPUClass::set_pc()
This adds support for GDB's c addr (Continue) and s addr (Single Step).
Prepares for dropping cpu_pc_from_tb().
log: Change log_cpu_state[_mask]() argument to CPUState
Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turncpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is nolonger needed.
Add documentation and make the functions available through qemu/log.h...
cpu: Move reset logging to CPUState
x86 was using additional CPU_DUMP_* flags, so make that configurable inCPUClass::reset_dump_flags.
This adds reset logging for alpha, unicore32 and xtensa.
Acked-by: Michael Walle <michael@walle.cc> (for lm32)Reviewed-by: Richard Henderson <rth@twiddle.net>...
cpu: Change qemu_init_vcpu() argument to CPUState
This allows to move the call into CPUState's realizefn.Therefore move the stub into libqemustub.a.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks
Make cpustats monitor command available unconditionally.
Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()arguments to CPUState.
cpu: Replace do_interrupt() by CPUClass::do_interrupt method
This removes a global per-target function and thus takes us one stepcloser to compiling multiple targets into one executable.
It will also allow to override the interrupt handling for certain CPU...
cpu: Add CPUArchState pointer to CPUState
The target-specific ENV_GET_CPU() macros have allowed us to navigatefrom CPUArchState to CPUState. The reverse direction was not supported.Avoid introducing CPU_GET_ENV() macros by initializing an untypedpointer that is initialized in derived instance_init functions....
target-m68k: Move TCG initialization to M68kCPU initfn
Add a tcg_enabled() check to suppress it for qtest.
target-m68k: Introduce QOM realizefn for M68kCPU
Introduce realizefn and set realized = true in cpu_m68k_init().
Split off GDB registration to a new m68k_cpu_init_gdb() so that it canbe called from the realizefn.
target-m68k: Mark as unmigratable
It neither defined CPU_SAVE_VERSION nor implemented cpu_{save,load}().Mark M68kCPU as unmigratable at device level.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Juan Quintela <quintela@redhat.com>
target-m68k: Rename CPU subtypes
In the initial conversion of CPU models to QOM types, model names weremapped 1:1 to type names. As a side effect this gained us a type "any",which is now a device.
To avoid "-device any" silliness and to pave the way for compiling...
target-m68k: Use type_register() instead of type_register_static()
According to its documentation, type_register_static()'s TypeInfoargument should exist for the life type of the type.Therefore use type_register() when registering the list of CPU subtypes....
target-m68k: Catch attempt to instantiate abstract type in cpu_init()
This fixes -cpu m68k-cpu asserting.
Cc: qemu-stable@nongnu.orgSigned-off-by: Andreas Färber <afaerber@suse.de>
target-m68k: Detect attempt to instantiate non-CPU type in cpu_init()
Consolidate model checking into a new m68k_cpu_class_by_name().
If the name matches an existing type, also check whether that type is(a sub-type of) TYPE_M68K_CPU.
This fixes, e.g., -cpu ide-hd asserting....
cpu: Move cpu_index field to CPUState
Note that target-alpha accesses this field from TCG, now using anegative offset. Therefore the field is placed last in CPUState.
Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.
Move common parts of mips cpu_state_reset() to mips_cpu_reset()....
target-m68k: Start QOM'ifying CPU init
Move model-independent code from cpu_m68k_init() into a QOM initfn.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Laurent Vivier <Laurent@Vivier.EU>Tested-by: Laurent Vivier <Laurent@Vivier.EU>
target-m68k: Add QOM CPU subclasses
Move code from cpu_m68k_set_model() into model-specific initfnsand inline the remaining parts into cpu_m68k_init().
Let m68k_cpu_list() print CPU classes alphabetically except for "any".
Signed-off-by: Andreas Färber <afaerber@suse.de>...
target-m68k: QOM'ify CPU reset
Move code from cpu_state_reset() into QOM m68k_cpu_reset().
target-m68k: QOM'ify CPU
Embed CPUM68KState as first member of QOM M68kCPU.Drop cpu_m68k_close() in favor of object_delete().
Let CPUClass::reset() call cpu_state_reset() for now.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Laurent Vivier <Laurent@Vivier.EU>...