Statistics
| Branch: | Revision:

root / target-ppc @ 834574ea

# Date Author Comment
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 <>

350ed2fc 02/01/2013 06:43 pm Andreas Färber

target-ppc: Fix target_ulong vs. hwaddr format mismatches

Since HWADDR_PRIx is always the same now, use %016 for TARGET_PPC64 and
%08 for common code. This may slightly change the ppc64 debug output.

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

476b6d16 02/01/2013 02:52 am Andreas Färber

target-ppc: Fix build for PPC_DEBUG_DISAS

In r5949 / 76db3ba44ee8db671f804755f13b016eefd13288 (target-ppc: memory
load/store rework) variable little_endian was replaced with ctx.le_mode.
Update the debug code.

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

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

cca48a93 02/01/2013 02:52 am Andreas Färber

target-ppc: Fix unused variable warning for FLUSH_ALL_TLBS

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

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

b164e48e 01/27/2013 03:34 pm Eduardo Habkost

kvm: Create kvm_arch_vcpu_id() function

This will allow each architecture to define how the VCPU ID is set on
the KVM_CREATE_VCPU ioctl call.

Signed-off-by: Eduardo Habkost <>
Acked-by: Gleb Natapov <>
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....

5b95b8b9 01/18/2013 08:06 pm Alexander Graf

PPC: KVM: Add support for EPR with KVM

This patch links KVM EPR support to the existing TCG support we have now.

Signed-off-by: Alexander Graf <>

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

1a61a9ae 01/07/2013 06:37 pm Stuart Yoder

PPC: KVM: set has-idle in guest device tree

On e500mc, the platform doesn't provide a way for the CPU to go idle.

To still not uselessly burn CPU time, expose an idle hypercall to the guest
if kvm supports it.

Signed-off-by: Stuart Yoder <>...

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

1b7ce68f 01/07/2013 06:37 pm Andreas Färber

target-ppc: Error out for -cpu host on unknown PVR

Previously we silently exited, with subclasses we got an opcode warning.
Instead, explicitly tell the user what's wrong.

An indication for this is -cpu ? showing "host" with an all-zero PVR.

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

a1bb7384 01/07/2013 06:37 pm Scott Wood

ppc/booke: fix crit/mcheck/debug exceptions

Book E does not play games with certain bits of xSRR1 being MSR save
bits and others being error status. xSRR1 is the old MSR, period.
This was causing things like MSR[CE] to be lost, even in the saved
version, as soon as you take an exception....

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

a60f24b5 12/19/2012 03:09 pm Andreas Färber

cpu: Move kvm_state field into CPUState

Adapt some functions to take CPUState / {PowerPC,S390}CPU argument.

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

20d695a9 12/19/2012 03:09 pm Andreas Färber

kvm: Pass CPUState to kvm_arch_*

Move kvm_vcpu_dirty field into CPUState to simplify things and change
its type to bool while at it.

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

1bc22652 12/19/2012 03:09 pm Andreas Färber

kvm: Pass CPUState to kvm_vcpu_ioctl()

Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.

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

6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

14cccb61 12/19/2012 09:31 am Paolo Bonzini

qom: move include files to include/qom/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

76cad711 12/19/2012 09:29 am Paolo Bonzini

build: kill libdis, move disassemblers to disas/

Signed-off-by: Paolo Bonzini <>

a8a826a3 12/16/2012 10:35 am Blue Swirl

exec: refactor cpu_restore_state

Refactor common code around calls to cpu_restore_state().

tb_find_pc() has now no external users, make it static.

Signed-off-by: Blue Swirl <>

b162d02e 12/14/2012 02:12 pm David Gibson

target-ppc: Don't use hwaddr to represent hardware state

The hwaddr type is somewhat vaguely defined as being able to contain bus
addresses on the widest possible bus in the system. For that reason it's
discouraged for representing specific pieces of persistent hardware state,...

ab1103de 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_instr_start from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

25983cad 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_pc from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

c9c99c22 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_icount from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

f0cc4aa8 11/26/2012 08:53 pm Julio Guerra

PPC: Fix missing TRACE exception

This patch fixes bug 1031698 :
https://bugs.launchpad.net/qemu/+bug/1031698

If we look at the (truncated) translation of the conditional branch
instruction in the test submitted in the bug post, the call to the
exception helper is missing in the "bne-false" chunk of translated...

92414b31 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_buf from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

efd7f486 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_ptr from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

f4359b9f 11/10/2012 03:49 pm Blue Swirl

disas: avoid using cpu_single_env

Pass around CPUArchState instead of using global cpu_single_env.

Signed-off-by: Blue Swirl <>
Acked-by: Richard Henderson <>
Acked-by: Aurelien Jarno <>
Acked-by: Guan Xuetao <>

ef84755e 11/03/2012 02:55 pm Blue Swirl

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    pc: Drop redundant test for ROM memory region
    exec: make some functions static
    target-ppc: make some functions static
    ppc: add missing static...
43448292 11/01/2012 08:49 pm Blue Swirl

ppc: add missing static

Add missing 'static' qualifiers.

Signed-off-by: Blue Swirl <>
Acked-by: Alexander Graf <>
Signed-off-by: Stefan Hajnoczi <>

6575c289 11/01/2012 08:49 pm Blue Swirl

target-ppc: make some functions static

Signed-off-by: Blue Swirl <>
Acked-by: Alexander Graf <>
Signed-off-by: Stefan Hajnoczi <>

98c8a73b 11/01/2012 06:12 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  • afaerber/qom-cpu: (35 commits)
    target-i386: Pass X86CPU to kvm_handle_halt()
    target-i386: Pass X86CPU to kvm_get_mp_state()
    cpu: Move thread_id to CPUState
    cpus: Pass CPUState to run_on_cpu()...
ac7d12ba 11/01/2012 02:02 pm David Gibson

target-ppc: Rework storage of VPA registration state

We change the storage of the VPA information to explicitly use fixed
size integer types which will make life easier for syncing this data with
KVM, which we will need in future.

Signed-off-by: David Gibson <>...

30304420 11/01/2012 02:02 pm David Gibson

target-ppc: Extend FPU state for newer POWER CPUs

This patch adds some extra FPU state to CPUPPCState. Specifically,
fpscr is extended to a target_ulong bits, since some recent (64 bit)
CPUs now have more status bits than fit inside 32 bits. Also, we add...

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

d5a68146 10/31/2012 02:02 am Andreas Färber

target-ppc: Rename kvm_kick_{env => cpu} and pass PowerPCCPU

Needed for changing qemu_cpu_kick() argument type to CPUState.

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

c08d7424 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_cpu_kick()

CPUArchState is no longer needed there.

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

5c26a5b3 10/31/2012 02:02 am Andreas Färber

target-ppc: Pass PowerPCCPU to powerpc_excp()

Needed for changing cpu_ppc_hypercall() argument type to PowerPCCPU.

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

1b14670a 10/31/2012 02:02 am Andreas Färber

target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall

Adapt emulate_spapr_hypercall() accordingly.

Needed for changing spapr_hypercall() argument type to PowerPCCPU.

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

aa100fa4 10/31/2012 02:02 am Andreas Färber

spapr: Pass PowerPCCPU to spapr_hypercall()

Needed for changing the hypercall handlers' argument type to PowerPCCPU.

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

d262cb02 10/29/2012 03:56 pm Aurelien Jarno

Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf

  • 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (22 commits)
    PPC: pseries: Remove hack for PIO window
    PPC: e500: Map PIO space into core memory region
    xen_platform: convert PIO to new memory api read/write...
e598a9c5 10/29/2012 12:45 pm Alexander Graf

PPC: 440: Emulate DCBR0

The DCBR0 register on 440 is used to implement system reset. The same
register is used on 405 as well, so just reuse the code.

Signed-off-by: Alexander Graf <>

1bfb37d1 10/29/2012 12:45 pm David Gibson

target-ppc: Rework storage of VPA registration state

With PAPR guests, hypercalls allow registration of the Virtual Processor
Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow
for certain communication between the guest and hypervisor. Currently, we...

21b2f13a 10/29/2012 12:45 pm Peter Maydell

Drop unnecessary check of TARGET_PHYS_ADDR_SPACE_BITS

For all our PPC targets the physical address space is at least
36 bits, so drop an unnecessary preprocessor conditional check
on TARGET_PHYS_ADDR_SPACE_BITS (erroneously introduced as part
of the change from target_phys_addr_t to hwaddr). This brings...

8f885ef8 10/28/2012 03:54 pm Aurelien Jarno

target-ppc: rename helper flags

Rename helper flags to the new ones. This is purely a mechanical change,
it's possible to use better flags by looking at the helpers.

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

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

6b2f90fb 10/06/2012 07:51 pm Aurelien Jarno

Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf

  • 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (35 commits)
    PPC: KVM: Fix BAT put
    PPC: e500: Only expose even TLB sizes in initial TLB
    ppc/pseries: Reset VPA registration on CPU reset...
ae215068 10/05/2012 03:58 pm Jim Meyering

ppc: avoid buffer overrun: use pstrcpy, not strncpy

A terminal NUL is required by caller's use of strchr.
It's better not to use strncpy at all, since there is no need
to zero out hundreds of trailing bytes for each iteration.

Signed-off-by: Jim Meyering <>...

ef8beb0e 10/05/2012 05:38 am Alexander Graf

PPC: KVM: Fix BAT put

In the sregs API, upper and lower 32bit segments of the BAT registers
are swapped when doing a set. Since we need to support old kernels out
there, don't bother to fix it in the kernel, but instead work around
the problem in QEMU by swapping on put....

4be403c8 10/05/2012 03:46 am Avi Kivity

Make target_phys_addr_t 64 bits unconditionally

The hassle and compile time overhead of maintaining both 32-bit and 64-bit
capable source isn't worth the tiny performance advantage which is seen on
a minority of configurations. Switch to compiling libhw only once, with...

2b15811c 10/05/2012 03:35 am David Gibson

ppc/pseries: Reset VPA registration on CPU reset

The ppc specific CPU state contains several variables which track the
VPA, SLB shadow and dispatch trace log. These are structures shared
between OS and hypervisor that are used on the pseries machine to track...

ace9a2cb 10/04/2012 04:54 pm David Gibson

target-ppc: KVM: Fix some kernel version edge cases for kvmppc_reset_htab()

The kvmppc_reset_htab() function invokes the KVM_PPC_ALLOCATE_HTAB vm ioctl
to request KVM to allocate and reset a hash page table for the guest - it
returns the size of hash table allocated, or 0 to indicate that qemu needs...

011aba24 10/04/2012 04:54 pm David Gibson

target-ppc: Remove unused power_mode field from cpu state

CPUPPCState includes a variable 'power_mode' which is used nowhere. This
patch removes it. This includes saving a dummy zero in its place during
vmsave, to avoid breaking the save format.

Signed-off-by: David Gibson <>...

2f93c23f 10/04/2012 04:54 pm Aurelien Jarno

target-ppc: use the softfloat float32_muladd function

Use the new softfloat float32_muladd() function to implement the vmaddfp
and vnmsubfp instructions. As a bonus we can get rid of the call to the
HANDLE_NAN3 macro, as the NaN handling is directly done at the softfloat...

89243b3b 10/04/2012 04:54 pm Aurelien Jarno

target-ppc: get rid of the HANDLE_NAN{1, 2, 3} macros

We can finally get rid of the ugly HANDLE_NAN{1,2,3} macros.

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

f1af19d7 10/04/2012 04:54 pm David Gibson

ppc: Make kvm_arch_put_registers() put all the registers

At least when invoked with high enough 'level' arguments,
kvm_arch_put_registers() is supposed to copy essentially all the cpu state
as encoded in qemu's internal structures into the kvm state. Currently...

7f763a5d 10/04/2012 04:54 pm David Gibson

pseries: Add support for new KVM hash table control call

This adds support for then new "reset htab" ioctl which allows qemu
to properly cleanup the MMU hash table when the guest is reset. With
the corresponding kernel support, reset of a guest now works properly....

ef9bd150 10/04/2012 04:54 pm Aurelien Jarno

target-ppc: simplify NaN propagation for vector functions

Commit e024e881bb1a8b5085026589360d26ed97acdd64 provided a pickNaN()
function for PowerPC, implementing the correct NaN propagation rules.
Therefore there is no need to test the operands manually, we can rely...

db1babb8 10/04/2012 04:54 pm Aurelien Jarno

target-ppc: use the softfloat min/max functions

Use the new softfloat float32_min() and float32_max() to implement the
vminfp and vmaxfp instructions. As a bonus we can get rid of the call to
the HANDLE_NAN2 macro, as the NaN handling is directly done at the...

fdefe51c 09/27/2012 10:38 pm Richard Henderson

Emit debug_insn for CPU_LOG_TB_OP_OPT as well.

For all targets that currently call tcg_gen_debug_insn_start,
add CPU_LOG_TB_OP_OPT to the condition that gates it.

This is useful for comparing optimization dumps, when the
pre-optimization dump is merely noise....

54cddd21 08/28/2012 07:49 pm Aurelien Jarno

target-ppc: fix altivec instructions

Altivec instructions are not working anymore in PowerPC emulation,
following commit d15f74fb, which inverted two registers in the call
to helper. Fix that.

Reviewed-by: Peter Maydell <>
Reviewed-by: Andreas Färber <>...

0d16fdd7 08/15/2012 10:59 pm Anthony Liguori

Merge remote-tracking branch 'agraf/ppc-for-upstream' into staging

  • agraf/ppc-for-upstream: (24 commits)
    openpic: Added BRR1 register
    pseries: Update SLOF firmware image
    pseries dma: DMA window params added to PHB and DT population changed
    pseries: Add PCI MSI/MSI-X support...
76b64a7a 08/15/2012 09:26 pm Anthony Liguori

win32: provide separate macros for weak decls and definitions

mingw32 seems to want the declaration to also carry the weak attribute.
Strangely, gcc on Linux absolutely does not want the declaration to be marked
as weak. This may not be the right fix, but it seems to do the trick....

78e8fde2 08/15/2012 08:43 pm David Gibson

ppc: Fix bug in handling of PAPR hypercall exits

Currently for powerpc, kvm_arch_handle_exit() always returns 1, meaning
that its caller - kvm_cpu_exec() - will always exit immediately afterwards
to the loop in qemu_kvm_cpu_thread_fn().

There's no need to do this. Once we've handled the hypercall there's no...

70b7660a 08/13/2012 10:10 pm Anthony Liguori

target-ppc: add implementation of query-cpu-definitions (v2)

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

ad0ebb91 06/28/2012 12:33 am David Gibson

pseries: Convert sPAPR TCEs to use generic IOMMU infrastructure

The pseries platform already contains an IOMMU implementation, since it is
essential for the platform's paravirtualized VIO devices. This IOMMU
support is currently built into the implementation of the VIO "bus" and...

975e5463 06/24/2012 11:52 pm Stefan Weil

target-ppc: Fix build with --enable-debug

The order of the arguments was wrong (copy+paste error).

Signed-off-by: Stefan Weil <>
Signed-off-by: Alexander Graf <>

cfee0218 06/24/2012 11:52 pm Stefan Weil

target-ppc: Fix 2nd parameter for tcg_gen_shri_tl

This fixes a compiler error when QEMU was configured with --enable-debug.

Signed-off-by: Stefan Weil <>
Signed-off-by: Alexander Graf <>

2a7a47fc 06/24/2012 02:04 am Alexander Graf

PPC: BookE: Implement EPR SPR

On the e500 series, accessing SPR_EPR magically turns into an access at
that CPU's IACK register on the MPIC. Implement that logic to get kernels
that make use of that feature work.

Signed-off-by: Alexander Graf <>

e9cd84b9 06/24/2012 02:04 am Alexander Graf

PPC: BookE: Make ivpr selectable by CPU type

IVPR can either hold 32 or 64 bit addresses, depending on the CPU type. Let
the CPU initialization function pass in its mask itself, so we can easily
extend it.

Signed-off-by: Alexander Graf <>

b81ccf8a 06/24/2012 02:04 am Alexander Graf

PPC: Add e5500 CPU target

This patch adds e5500's CPU initialization to the TCG CPU initialization
code.

Signed-off-by: Alexander Graf <>

91f477fd 06/24/2012 02:04 am Alexander Graf

PPC: Extract SPR dump generation into its own function

This patch moves the debug #ifdef'ed SPR trace generation into its
own function, so we can call it from multiple places.

Signed-off-by: Alexander Graf <>

ba38ab8d 06/24/2012 02:04 am Alexander Graf

PPC: BookE: Support 32 and 64 bit wide MAS2

The MAS registers on BookE are all 32 bit wide, except for MAS2, which
can hold up to 64 bit on 64 bit capable CPUs. Reflect this in the SPR
setting code, so that the guest can never write invalid values in them....

96091698 06/24/2012 02:04 am Alexander Graf

PPC: BookE206: Bump MAS2 to 64bit

On 64bit capable systems, MAS2 can actually hold a 64bit virtual page
address. So increase the mask for its EPN.

Signed-off-by: Alexander Graf <>

84755ed5 06/24/2012 02:04 am Alexander Graf

PPC: Add some booke SPR defines

The number of SPRs avaiable in different PowerPC chip is still increasing. Add
definitions for the MAS7_MAS3 SPR and all currently known bits in EPCR.

Signed-off-by: Alexander Graf <>

e42a61f1 06/24/2012 02:04 am Alexander Graf

PPC: Add support for MSR_CM

The BookE variant of MSR_SF is MSR_CM. Implement everything it takes in TCG to
support running 64bit code with MSR_CM set.

Signed-off-by: Alexander Graf <>

77c2cf33 06/24/2012 02:04 am Fabien Chouteau

booke_206_tlbwe: Discard invalid bits in MAS2

The size of EPN field in MAS2 depends on page size. This patch adds a
mask to discard invalid bits in EPN field.

Definition of EPN field from e500v2 RM:
EPN Effective page number: Depending on page size, only the bits...

4656e1f0 06/24/2012 02:04 am Benjamin Herrenschmidt

ppc64: Rudimentary Support for extra page sizes on server CPUs

More recent Power server chips (i.e. based on the 64 bit hash MMU)
support more than just the traditional 4k and 16M page sizes. This
can get quite complicated, because which page sizes are supported,...

d0f1562d 06/24/2012 02:04 am Blue Swirl

ppc: Avoid AREG0 for timebase helpers

Add an explicit CPUPPCState parameter instead of relying on AREG0.

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

901c4eaf 06/24/2012 02:04 am Blue Swirl

ppc: Split off misc helpers

Move misc helpers from op_helper.c to misc_helpers.c.

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

d523dd00 06/24/2012 02:04 am Blue Swirl

ppc: Avoid AREG0 for misc helpers

Add an explicit CPUPPCState parameter instead of relying on AREG0.

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

8555f71d 06/24/2012 02:04 am Blue Swirl

ppc: Move misc helpers from helper.c to misc_helper.c

Move more misc helpers from helper.c to misc_helper.c.

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

2f5a189c 06/24/2012 02:04 am Blue Swirl

ppc: Move load and store helpers, switch to AREG0 free mode

Add an explicit CPUPPCState parameter instead of relying on AREG0
and rename op_helper.c (which only contains load and store helpers)
to mem_helper.c. Remove AREG0 swapping in
tlb_fill().

Switch to AREG0 free mode. Use cpu_ld{l,uw}_code in translation...

90638255 06/24/2012 02:04 am Blue Swirl

ppc: Add missing break

Add obviously missing 'break' statement.

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

ea6c0dac 06/24/2012 02:04 am Blue Swirl

ppc: Make hbrev table const

Lookup table 'hbrev' is never written to, so add a 'const' qualifier.

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

4cc2cc08 06/24/2012 02:04 am Blue Swirl

ppc: Avoid a warning with the next patch

When the code is moved together by the next patch, compiler
detects a possible uninitialized variable use. Avoid the warning
by initializing the variables.

Signed-off-by: Blue Swirl <>
Signed-off-by: Alexander Graf <>...

8cbbe385 06/24/2012 02:04 am Blue Swirl

ppc: Move MMU helpers from helper.c to mmu_helper.c

Move more MMU helpers from helper.c to mmu_helper.c.

Signed-off-by: Blue Swirl <>
Signed-off-by: Alexander Graf <>
Signed-off-by: Andreas Färber <>
[update to current helper.c state]...

9aa5b158 06/24/2012 02:04 am Blue Swirl

ppc: Cleanup MMU merge

Remove useless wrappers. In some cases 'int' parameters are
changed to uint32_t.

Make internal functions static.

Signed-off-by: Blue Swirl <>
[agraf: fix kvm compilation]
Signed-off-by: Alexander Graf <>...

6de673d4 06/24/2012 02:04 am Blue Swirl

ppc: Split off timebase helpers

Move decrementer and timebase helpers to a dedicated file.

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