Statistics
| Branch: | Revision:

root / target-alpha / cpu.c @ 986a2998

History | View | Annotate | Download (7.7 kB)

# Date Author Comment
a0e372f0 07/27/2013 12:23 am Andreas Färber

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....

00b941e5 07/23/2013 03:41 am Andreas Färber

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 helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

f45748f1 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()

This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.

Signed-off-by: Andreas Färber <>

c643bed9 06/28/2013 02:25 pm Andreas Färber

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 <>
Signed-off-by: Andreas Färber <>

c658b94f 06/28/2013 02:25 pm Andreas Färber

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 <>

fe31e737 06/28/2013 02:25 pm Andreas Färber

target-alpha: Register VMStateDescription for AlphaCPU

Commit b758aca1f6cdb175634812b79f5560c36c902d00 (target-alpha: Enable
the alpha-softmmu target.) introduced cpu_{save,load}() functions but
didn't define CPU_SAVE_VERSION, so they were never registered....

878096ee 06/28/2013 02:25 pm Andreas Färber

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.

Signed-off-by: Andreas Färber <>

97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

c05efcb1 02/16/2013 03:51 pm Andreas Färber

cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions....

bd1b2828 02/16/2013 03:50 pm Andreas Färber

target-alpha: Update AlphaCPU to QOM realizefn

Update the alpha_cpu_realize() signature and hook up to
DeviceClass::realize. Set realized = true in cpu_alpha_init().

qapi/error.h is included through qdev now and no longer needed.

Acked-by: Richard Henderson <>...

a120c287 01/28/2013 12:33 am Andreas Färber

target-alpha: Catch attempt to instantiate abstract type in cpu_init()

This fixes -cpu alpha-cpu asserting.

Cc:
Signed-off-by: Andreas Färber <>

0e44a023 01/27/2013 03:52 pm Andreas Färber

target-alpha: Detect attempt to instantiate non-CPU type in cpu_init()

Check in alpha_cpu_class_by_name() whether the type found is actually
(a sub-type of) TYPE_ALPHA_CPU.

This fixes, e.g., -cpu typhoon-pcihost asserting.

Signed-off-by: Andreas Färber <>

2b8c2754 01/27/2013 03:52 pm Andreas Färber

cpu: Add model resolution support to CPUClass

Introduce CPUClass::class_by_name and add a default implementation.
Hook up the alpha and ppc implementations.

Introduce a wrapper function cpu_class_by_name().

Signed-off-by: Andreas Färber <>

75a192aa 01/08/2013 10:03 pm Andreas Färber

qemu-common.h: Make qemu_init_vcpu() stub static inline

Turn the *-user macro into a no-op inline function to avoid
unused-variable warnings and band-aiding #ifdef'ery.

This allows to drop an #ifdef for alpha and avoids more for unicore32
and other upcoming trivial realizefn implementations....

501a7ce7 12/23/2012 01:40 am Andreas Färber

Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu

Adapt header include paths.

Signed-off-by: Andreas Färber <>

92a31361 12/19/2012 03:08 pm Andreas Färber

cpu: Introduce CPUListState struct

This generalizes {ARM,M68k,Alpha}CPUListState to avoid declaring it for
each target. Place it in cpu-common.h to avoid circular dependencies.

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>...

494342b3 12/19/2012 02:01 am Andreas Färber

target-alpha: Add support for -cpu ?

Implement alphabetical listing of CPU subclasses.

Signed-off-by: Andreas Färber <>
Acked-by: Richard Henderson <>

0c28246f 12/19/2012 02:01 am Andreas Färber

target-alpha: Turn CPU definitions into subclasses

Make TYPE_ALPHA_CPU abstract and add types <name>-alpha-cpu.
Use type inheritence, and turn "2*" models into aliases.

Move cpu_alpha_init() to cpu.c and split out CPU realization.
Default to creating type "ev67-alpha-cpu" as before....

3993c6bd 10/31/2012 05:11 am Andreas Färber

cpus: Pass CPUState to [qemu_]cpu_has_work()

For target-mips also change the return type to bool.

Make include paths for cpu-qom.h consistent for alpha and unicore32.

Signed-off-by: Andreas Färber <>
[AF: Updated new target-openrisc function accordingly]...

9444006f 04/15/2012 10:26 pm Andreas Färber

target-alpha: QOM'ify CPU init

Move code from cpu_alpha_init() into a CPU initializer.

Signed-off-by: Andreas Färber <>
Acked-by: Richard Henderson <>

25ebd80f 04/15/2012 10:26 pm Andreas Färber

target-alpha: QOM'ify CPU

Embed CPUAlphaState as first member of AlphaCPU.

Signed-off-by: Andreas Färber <>
Acked-by: Richard Henderson <>