Statistics
| Branch: | Revision:

root / target-ppc / translate_init.c @ 5b50e790

History | View | Annotate | Download (298.6 kB)

# Date Author Comment
5b50e790 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_{read,write}_register()

Completes migration of target-specific code to new target-*/gdbstub.c.

Acked-by: Michael Walle <> (for lm32)
Acked-by: Max Filippov <> (for xtensa)
Signed-off-by: Andreas Färber <>

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

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

gdbstub: Change gdb_register_coprocessor() argument to CPUState

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

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

7162bdea 07/11/2013 07:51 pm Julio Guerra

e600 core for MPC86xx processors

MPC86xx processors are based on the e600 core, which is not the case
in qemu where it is based on the 7400 processor.

This patch creates the e600 core and instantiates the MPC86xx
processors based on it. Therefore, adding the high BATs, the SPRG...

8d43ea1c 07/11/2013 07:51 pm Prerna Saxena

target-ppc: Add POWER8 v1.0 CPU model

This patch adds CPU PVR definition for POWER8,
and enables QEMU to launch guests on POWER8 hardware.

Signed-off-by: Prerna Saxena

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Paul Mackerras <paulus@samba.org>...

a0762859 07/09/2013 10:33 pm Andreas Färber

log: Change log_cpu_state[_mask]() argument to CPUState

Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turn
cpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is no
longer needed.

Add documentation and make the functions available through qemu/log.h...

91b1df8c 07/09/2013 10:33 pm Andreas Färber

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.

Acked-by: Michael Walle <> (for lm32)
Reviewed-by: Richard Henderson <>...

9761ad75 07/01/2013 02:11 am Alexander Graf

PPC: Introduce an alias cache for faster lookups

When running QEMU with "-cpu ?" we walk through every alias for every
target CPU we know about. This takes several seconds on my very fast
host system.

Let's introduce a class object cache in the alias table. Using that we...

2345f1c0 07/01/2013 02:11 am Alexander Graf

PPC: Ignore writes to L2CR

The L2CR register contains a number of bits that either impose configuration
which we can't deal with or mean "something is in progress until the bit is
0 again".

Since we don't model the former and we do want to accomodate guests using the...

b048960f 07/01/2013 02:11 am Andreas Färber

target-ppc: Introduce unrealizefn for PowerPCCPU

Use it to clean up the opcode table, resolving a former TODO from Jocelyn.
Also switch from malloc() to g_malloc().

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

1e3438df 07/01/2013 02:11 am Andreas Färber

target-ppc: Drop redundant flags assignments from CPU families

Previous code has #define POWERPC_INSNS2_<family> PPC_NONE in some
places for macrofied assignment to insns_flags2 field.

PPC_NONE is defined as zero though and QOM classes are zero-initialized,...

9fea2ae2 07/01/2013 02:11 am Hervé Poussineau

ppc: do not register IABR SPR twice for 603e

IABR SPR is already registered in gen_spr_603(), called from init_proc_603E().

Signed-off-by: Hervé Poussineau <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

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

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

04559d52 05/06/2013 06:22 pm Anton Blanchard

target-ppc: Add read and write of PPR SPR

Recent Linux kernels save and restore the PPR across exceptions
so we need to handle it.

Signed-off-by: Anton Blanchard <>
Signed-off-by: Alexander Graf <>

9c2627b0 04/27/2013 12:02 am Aurelien Jarno

target-ppc: add instruction flags for Book I 2.05

.. and enable it on POWER7 CPU.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>
Signed-off-by: Alexander Graf <>

0cbad81f 04/27/2013 12:02 am David Gibson

pseries: Fixes and enhancements to L1 cache properties

PAPR requires that the device tree's CPU nodes have several properties
with information about the L1 cache. We already create two of these
properties, but with incorrect names - "[id]cache-block-size" instead...

702763fa 04/27/2013 12:02 am David Gibson

target-ppc: Add more stubs for POWER7 PMU registers

In addition to the performance monitor registers found on nearly all
6xx chips, the POWER7 has two additional counters (PMC5 & PMC6) and an
extra control register (MMCRA). This patch adds stub support for them to...

2cf3eb6d 04/27/2013 12:02 am Fabien Chouteau

PPC: Remove env->hreset_excp_prefix

This value is not needed if we use correctly the MSR[IP] bit.

excp_prefix is always 0x00000000, except when the MSR[IP] bit is
implemented and set to 1, in that case excp_prefix is 0xfff00000.

The handling of MSR[IP] was already implemented but not used at reset...

09d9828a 04/27/2013 12:02 am Fabien Chouteau

PPC: fix hreset_vector for 60x, 7x0, 7x5, G2, MPC8xx, MPC5xx, 7400 and 7450

According to the different user's manuals, the vector offset for system
reset (both /HRESET and /SRESET) is 0x00100.

This patch may break support of some executables, as the power-on start...

2bc17322 04/27/2013 12:02 am Fabien Chouteau

PPC: Add breakpoint registers for 603 and e300

Signed-off-by: Fabien Chouteau <>
Signed-off-by: Alexander Graf <>

e71ec2e9 04/27/2013 12:02 am Aurelien Jarno

target-ppc: Enable ISEL on POWER7

ISEL is a Power ISA 2.06 instruction and thus is available on POWER7.
Given this is trapped and emulated by the Linux kernel, I guess it went
unnoticed.

Signed-off-by: Aurelien Jarno <>
Signed-off-by: Alexander Graf <>

f80872e2 03/22/2013 04:28 pm David Gibson

mmu-hash64: Implement Virtual Page Class Key Protection

Version 2.06 of the Power architecture describes an additional page
protection mechanism. Each virtual page has a "class" (0-31) recorded in
the PTE. The AMR register contains bits which can prohibit reads and/or...

b632a148 03/22/2013 04:28 pm David Gibson

target-ppc: Use QOM method dispatch for MMU fault handling

After previous cleanups, the many scattered checks of env->mmu_model in
the ppc MMU implementation have, at least for "classic" hash MMUs been
reduced (almost) to a single switch at the top of
cpu_ppc_handle_mmu_fault()....

d6478bc7 03/22/2013 04:28 pm Fabien Chouteau

PPC/GDB: handle read and write of fpscr

Although the support of this register may be uncomplete, there are no
reason to prevent the debugger from reading or writing it.

Signed-off-by: Fabien Chouteau <>
Signed-off-by: Alexander Graf <>

9baea4a3 03/22/2013 04:28 pm David Gibson

target-ppc: Remove vestigial PowerPC 620 support

The PowerPC 620 was the very first 64-bit PowerPC implementation, but
hardly anyone ever actually used the chips. qemu notionally supports the
620, but since we don't actually have code to implement the segment table,...

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

edbe35e0 03/08/2013 10:04 pm Andreas Färber

target-ppc: Fix PPC_DUMP_SPR_ACCESS build

A victim of the d523dd00a7d73b28f2e99acf45a4b3f92e56e40a AREG0
conversion, insert the missing cpu_env arguments.

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

5ba4576b 03/08/2013 10:04 pm Andreas Färber

target-ppc: Make host CPU a subclass of the host's CPU model

This avoids assigning individual class fields and contributors
forgetting to add field assignments in KVM-only code.

ppc_cpu_class_find_by_pvr() requires the CPU model classes to be
registered, so defer host CPU type registration to kvm_arch_init()....

55d3d1a4 03/08/2013 10:04 pm Andreas Färber

target-ppc: List alias names alongside CPU models

Revert adding a separate -cpu ? output section for aliases and list them
per CPU subclass.

Requested-by: Alexander Graf <>
Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

35e21d3f 03/08/2013 10:04 pm Andreas Färber

target-ppc: Report CPU aliases for QMP

The QMP query-cpu-definitions implementation iterated over CPU classes
only, which were getting less and less as aliases were extracted.

Keep them in QMP as valid -cpu arguments even if not guaranteed stable.

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

e9a96075 03/08/2013 10:04 pm Andreas Färber

target-ppc: Move CPU aliases out of translate_init.c

Move array of CPU aliases to cpu-models.c, alongside model definitions.
This requires to zero-terminate the aliases array since ARRAY_SIZE() can
no longer be used in translate_init.c then.

Suggested-by: Alexander Graf <>...

e0233c9a 03/08/2013 10:04 pm Andreas Färber

target-ppc: Turn descriptive CPU model comments into device descriptions

Fix microcontroller typo while at it.

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

09cc86f2 03/08/2013 10:04 pm Andreas Färber

target-ppc: Update Coding Style for CPU models

Drop the space in #if defined (TODO).

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

953af181 03/08/2013 10:04 pm Andreas Färber

target-ppc: Split model definitions out of translate_init.c

Now that model definitions only reference their parent type, model
definitions are independent of the family definitions and can be
compiled independently of TCG translation.

Keep all #if defined(TODO) code local to cpu-models.c....

befa8af3 03/08/2013 10:04 pm Andreas Färber

target-ppc: Change "POWER7" CPU alias

Let it resolve to v2.3 rather than v2.0.

Suggested-by: David Gibson <>
Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

d67d40ea 03/08/2013 10:04 pm David Gibson

target-ppc: Add mechanism for synchronizing SPRs with KVM

Currently when runing under KVM on ppc, we synchronize a certain number of
vital SPRs to KVM through the SET_SREGS call. This leaves out quite a lot
of important SPRs which are maintained in KVM. It would be helpful to...

cfe34f44 03/08/2013 10:04 pm Andreas Färber

target-ppc: Convert CPU definitions

Turn the array of model definitions into a set of self-registering QOM
types with their own class_init. Unique identifiers are obtained from
the combination of PVR, SVR and family identifiers; this requires all
alias #defines to be removed from the list. Possibly there are some more...

7856e3a4 03/08/2013 10:04 pm Andreas Färber

target-ppc: Introduce abstract CPU family types

Instead of assigning *_<family> constants, set .parent to a family type.

Introduce a POWERPC_FAMILY() macro to keep type registration close to
its implementation. This macro will need tweaking later.

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

53116ebf 03/08/2013 10:04 pm Andreas Färber

target-ppc: Set instruction flags on CPU family classes

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

4d7fb187 03/08/2013 10:04 pm Andreas Färber

target-ppc: Register all types for TARGET_PPCEMB

Don't attempt to suppress registration of CPU types, since the criteria
is actually a property of the class and should thus become a field.
Since we can't check a field set in a class_init function before
registering the type that leads to execution of that function, guard the...

ba9fd9f1 03/08/2013 10:04 pm Andreas Färber

target-ppc: Set remaining fields on CPU family classes

Now POWERPC_DEF_SVR() no longer sets family-specific fields itself.

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

ca5dff0a 03/08/2013 10:04 pm Andreas Färber

target-ppc: Turn descriptive CPU family comments into device descriptions

This gets rid of some more overly long comments that have lost most of
their purpose now that in most cases there's only two functions left per
CPU family.

The class field is inherited by the actual CPU models, so override it....

df43f4b8 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 970 aliases

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

f591784b 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract POWER7 alias

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

de400129 03/08/2013 10:04 pm Andreas Färber

target-ppc: Get model name from type name

We are about to drop the redundant name field along with ppc_def_t.

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

d329ceb2 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC82xx_HiP{3, 4} aliases

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

cf9314cd 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC52xx alias

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

236824f2 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC5200/MPC5200B aliases

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

7b48a1ad 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC8240 alias

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

4bdba7fd 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 405GPe alias

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

91b5d028 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 604e alias

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

52d80768 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC85xx aliases

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

6d4decb4 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract e500v1/e500v2 aliases

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

9538de4f 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC83xx aliases

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

0683641c 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract e300 alias

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

4475e98f 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract e200 alias

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

63499f21 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC82xx alias

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

4d55320f 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC8247/MPC8248/MPC8270-80 aliases

This depends on the fix for "G2leGP3" PVR.

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

f172e4b9 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC82xx aliases to *_HiP4

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

08546b91 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 7410 alias

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

06704e9c 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 7400 alias

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

80c7abd3 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 7x5 aliases

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

8fc82f9e 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 750 aliases

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

0446aecd 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 740/750 aliases

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

16a17733 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 603e alias

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

4ae0e9d8 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 603r alias

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

336c8632 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 601/601v aliases

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

20267b6f 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MGT823/MPC8xx as aliases

They used different PVRs but were defined to MPC8xx.

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

8f43bc78 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 40x aliases

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

8c00a999 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 440 aliases

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

a7de06e1 03/08/2013 10:04 pm Andreas Färber

target-ppc: Turn "ppc32" and "ppc64" CPUs into aliases

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

4c739207 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 74x7[A] aliases

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

d96c8a23 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 74x5 as aliases

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

078840e1 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 74x1 aliases

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

e9a7cf3b 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 7450 alias

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

df502ce8 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract 7448 alias

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

5e95acc8 03/08/2013 10:04 pm Andreas Färber

target-ppc: Update error handling in ppc_cpu_realize()

Commit fe828a4d4b7a5617cda7b24e95e327bfb71d790e added a new fatal error
message while QOM realize'ification was in flight.

Convert it to return an Error instead of exit()ing.

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

9a135053 03/08/2013 10:04 pm Andreas Färber

target-ppc: Drop nested TARGET_PPC64 guard for POWER7

It is within a large TARGET_PPC64 section from 970 to 620,
so an #endif /* TARGET_PPC64 */ is confusing. Clean this up.

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

c4d0a36c 03/08/2013 10:04 pm Andreas Färber

target-ppc: Inline comma into POWERPC_DEF_SVR() macro

To repurpose the POWERPC_DEF_SVR() macro outside of an array,
move the comma into the macro. No functional change.

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

fd5ed418 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract aliases from definitions list

Move definitions that were 100% identical except for the name into a
list of aliases so that we don't register duplicate CPU types.
Drop the accompanying comments since they don't really add value.

We need to support recursive lookup due to code names referencing a...

f7851859 03/08/2013 10:04 pm Andreas Färber

target-ppc: Make -cpu "ppc" an alias to "ppc32"

Drop the #if 0'ed alternative to make it "ppc64" for TARGET_PPC64.
If we ever want to change it, we can more easily do so now.

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

e0b9a74e 03/08/2013 10:04 pm Andreas Färber

target-ppc: Extract MPC5xx aliases

Their PVR differed but was defined to MPC5xx.

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

0136d715 03/08/2013 10:04 pm Andreas Färber

target-ppc: Fix CPU_POWERPC_MPC8547E

It was defined to ..._MPC8545E_v21 rather than ..._MPC8547E_v21.
Due to both resolving to CPU_POWERPC_e500v2_v21 this did not show.

Fixing this nontheless helps with QOM'ifying CPU aliases.

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

bfe6d5b0 03/08/2013 10:04 pm Andreas Färber

target-ppc: Fix "G2leGP3" PVR

Unlike derived PVR constants mapped to CPU_POWERPC_G2LEgp3, the
"G2leGP3" model definition itself used the CPU_POWERPC_G2LEgp1 PVR.

Fixing this will allow to alias CPU_POWERPC_G2LEgp3-using types to
"G2leGP3".

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

da91a00f 02/23/2013 07:25 pm Richard Henderson

target-ppc: Split out SO, OV, CA fields from XER

In preparation for more efficient setting of these fields.

Cc: Alexander Graf <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

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

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

target-ppc: Move TCG initialization to PowerPCCPU initfn

Ensures that a QOM-created PowerPCCPU is usable.

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

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

target-ppc: Update PowerPCCPU to QOM realizefn

Adapt ppc_cpu_realize() signature, hook it up to DeviceClass and set
realized = true in cpu_ppc_init().

Reviewed-by: Eduardo Habkost <>
Signed-off-by: Andreas Färber <>

312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
5c099537 02/01/2013 11:53 pm Paolo Bonzini

cpu: do not use object_delete

CPUs are never added to the composition tree, so delete is achieved
simply by removing the last references to them.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

8e33944f 02/01/2013 02:52 am Alexander Graf

PPC: Unify dcbzl code path

The bit that makes a dcbz instruction a dcbzl instruction was declared as
reserved in ppc32 ISAs. However, hardware simply ignores the bit, making
code valid if it simply invokes dcbzl instead of dcbz even on 750 and G4.

Thus, mark the bit as unreserved so that we properly emulate a simple dcbz...

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

fe828a4d 01/25/2013 11:02 pm Mike Qiu

target-ppc: Give a meaningful error if too many threads are specified

Currently the target-ppc tcg code only supports a single thread. You can
specify more, but they're treated identically to multiple cores. On KVM
we obviously can't support more threads than the hardware; if more are...

746a870b 01/18/2013 08:06 pm Alexander Graf

PPC: Provide zero SVR for -cpu e500mc and e5500

Even though our -cpu types for e500mc and e5500 are no real CPUs that
actually have version registers, a guest might still want to access
said version register and that has to succeed for a guest to be happy....

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative 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()....

68c2dd70 01/07/2013 06:37 pm Alexander Graf

PPC: Bring EPR support closer to reality

We already used to support the external proxy facility of FSL MPICs,
but only implemented it halfway correctly.

This patch adds support for

  • dynamic enablement of the EPR facility
  • interrupt acknowledgement only when the interrupt is delivered...
2985b86b 01/07/2013 06:37 pm Andreas Färber

target-ppc: Slim conversion of model definitions to QOM subclasses

Since the model list is highly macrofied, keep ppc_def_t for now and
save a pointer to it in PowerPCCPUClass. This results in a flat list of
subclasses including aliases, to be refined later....