Statistics
| Branch: | Revision:

root @ 9dd69d65

# Date Author Comment
20054ef0 06/28/2012 11:28 pm Blue Swirl

x86: prepare op_helper.c for splitting

Fix coding style and a few typos.

Signed-off-by: Blue Swirl <>

77b2bc2c 06/28/2012 11:28 pm Blue Swirl

x86: avoid AREG0 for exceptions

Add an explicit CPUX86State parameter instead of relying on AREG0.

Merge raise_exception_env() to raise_exception(), likewise with
raise_exception_err_env() and raise_exception_err().

Introduce cpu_svm_check_intercept_param() and cpu_vmexit()...

599b9a5a 06/28/2012 11:28 pm Blue Swirl

x86: split off exception handlers

Move exception handlers from op_helper.c to excp_helper.c.

Signed-off-by: Blue Swirl <>

9dd69d65 06/28/2012 11:28 pm Blue Swirl

x86: avoid an extern declaration

After the previous patch, we can use the proper
declaration in a common header file.

Signed-off-by: Blue Swirl <>

5fa45de5 06/28/2012 12:33 am David Gibson

iommu: Allow PCI to use IOMMU infrastructure

This patch adds some hooks to let PCI devices and busses use the new IOMMU
infrastructure. When IOMMU support is enabled, each PCI device now
contains a DMAContext * which is used by the pci_dma_*() wrapper functions....

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

pseries: Implement IOMMU and DMA for PAPR PCI devices

Currently the pseries machine emulation does not support DMA for emulated
PCI devices, because the PAPR spec always requires a (guest visible,
paravirtualized) IOMMU which was not implemented. Now that we have...

7a0bac4d 06/28/2012 12:33 am Benjamin Herrenschmidt

Add a memory barrier to DMA functions

The emulated devices can run simultaneously with the guest, so
we need to be careful with ordering of load and stores done by
them to the guest system memory, which need to be observed in
the right order by the guest operating system....

8292f75a 06/28/2012 12:33 am David Gibson

Better support for dma_addr_t variables

A while back, we introduced the dma_addr_t type, which is supposed to
be used for bus visible memory addresses. At present, this is an
alias for target_phys_addr_t, but this will change when we eventually
add support for guest visible IOMMUs....

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

iommu: Add universal DMA helper functions

Not that long ago, every device implementation using DMA directly
accessed guest memory using cpu_physical_memory_*(). This meant that
adding support for a guest visible IOMMU would require changing every
one of these devices to go through IOMMU translation....

9ac6a217 06/28/2012 12:33 am David Gibson

usb-ohci: Use universal DMA helper functions

The OHCI device emulation can provide both PCI and SysBus OHCI
implementations. Because of this, it was not previously converted to
use the PCI DMA helper functions.

This patch converts it to use the new universal DMA helper functions....

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

iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers

dma-helpers.c contains a number of helper functions for doing
scatter/gather DMA, and various block device related DMA. Currently,
these directly access guest memory using cpu_physical_memory_*(),...

10ca2943 06/28/2012 12:33 am David Gibson

ide/ahci: Use universal DMA helper functions

The AHCI device can provide both PCI and SysBus AHCI device
emulations. For this reason, it wasn't previously converted to use
the pci_dma_*() helper functions. Now that we have universal DMA
helper functions, this converts AHCI to use them....

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

usb: Convert usb_packet_{map, unmap} to universal DMA helpers

The USB UHCI and EHCI drivers were converted some time ago to use the
pci_dma_*() helper functions. However, this conversion was not complete
because in some places both these drivers do DMA via the usb_packet_map()...

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

iommu: Introduce IOMMU emulation infrastructure

This patch adds the basic infrastructure necessary to emulate an IOMMU
visible to the guest. The DMAContext structure is extended with
information and a callback describing the translation, and the various...

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

2624bab8 06/28/2012 12:27 am Daniel P. Berrange

Remove support for non-threaded VNC server

QEMU now has a fundamental requirement for pthreads, so there
is no compelling reason to retain support for the non-threaded
VNC server. Remove the --{enable,disable}-vnc-thread configure
arguments, and all CONFIG_VNC_THREAD conditionals...

fcce6fd2 06/28/2012 12:27 am Jason Wang

rtl8139: validate rx ring before receiving packets

Commit ff71f2e8cacefae99179993204172bc65e4303df prevent the possible
crash during initialization of linux driver by checking the operating
mode.This seems too strict as:

- the real card could still work in mode other than normal...

7de3abe5 06/28/2012 12:26 am Anthony Liguori

qdev: fix use-after-free in the error path of qdev_init_nofail

From Markus:

Before:

$ qemu-system-x86_64 -display none -drive if=ide
qemu-system-x86_64: Device needs media, but drive is empty
qemu-system-x86_64: Initialization of device ide-hd failed...
039380a8 06/28/2012 12:26 am Anthony Liguori

qtest: fix infinite loop when QEMU aborts abruptly

From Markus:

Makes "make check" hang:

QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test
TEST: tests/crash-test... (pid=972)
qemu-system-x86_64: Device needs media, but drive is empty...
b54fa7dd 06/28/2012 12:26 am Peter Maydell

Makefile.target: Update clean command to clean hw/ directory

Now we create object files in a hierarchy under hw/, so the
'clean' target must also be updated to delete those object files.
Rather than using a manual list of subdirectories which will
easily drift out of date, we just delete all .o and .d files...

a307beb6 06/28/2012 12:26 am Andreas Färber

configure: Assure existence of linux-headers/ build directory

Commit ec5b06d (configure: ensure directory exists when creating symlinks)
moved the creation of directories into the symlink() function but forgot
the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers....

d36e8ce7 06/27/2012 12:57 pm Peter A. G. Crosthwaite

MAINTAINERS: Add Petalogix ml605 machine model

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

ab61d240 06/27/2012 12:57 pm Peter A. G. Crosthwaite

MAINTAINERS: Added Xilinx EDK devices

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Edgar E. Iglesias <>

d24b569a 06/27/2012 12:57 pm Peter A. G. Crosthwaite

MAINTAINERS: Added device tree

Agreed between myself and Alex:
http://lists.nongnu.org/archive/html/qemu-devel/2012-06/msg03561.html

Signed-off-by: Peter A. G. Crosthwaite <>
Acked-by: Alexander Graf <>
Signed-off-by: Edgar E. Iglesias <>

e0a3dc7c 06/26/2012 11:09 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    tci: Support INDEX_op_bswap64_i64
    target-i386: Use QEMU instead of Qemu
    Makefile.hw: avoid overly large 'make clean' rm command
    configure: Fix typo
    arm_gic: Send dbg msgs to stderr not stdout...
3aa42d32 06/26/2012 11:07 pm Anthony Liguori

Merge remote-tracking branch 'spice/spice.v58' into staging

  • spice/spice.v58:
    vga: raise default vgamem size
    add pc-1.2
    qxl: add vgamem_size_mb and vgamem_size
    vga: make vram size configurable
    vga: raise xres+yres limits
    qxl: reset current_async on qxl_soft_reset...
675658d9 06/26/2012 11:06 pm Anthony Liguori

Merge remote-tracking branch 'mdroth/qga-pull-6-21-12' into staging

  • mdroth/qga-pull-6-21-12:
    qemu-ga: add guest-fstrim command
    qemu-ga: make names more generic for mount list functions
3978f461 06/26/2012 11:05 pm Anthony Liguori

Merge remote-tracking branch 'sstabellini/compile-xs' into staging

  • sstabellini/compile-xs:
    xenstore: Use <xenstore.h>
    xen: Reorganize includes of Xen headers.
7a542b67 06/26/2012 11:05 pm Anthony Liguori

Merge remote-tracking branch 'sstabellini/xen-pt' into staging

  • sstabellini/xen-pt:
    Introduce Xen PCI Passthrough, MSI
    Introduce apic-msidef.h
    Introduce Xen PCI Passthrough, PCI config space helpers
    Introduce Xen PCI Passthrough, qdevice
    qdev-properties: Introduce pci-host-devaddr....
b1a6609e 06/26/2012 11:01 pm Anthony Liguori

Merge remote-tracking branch 'kraxel/usb.54' into staging

  • kraxel/usb.54:
    uhci: fix uhci_async_cancel_all
    usb-host: live migration support
    usb-host: attach only to running guest
    ehci: tracing improvements
    usb: restore USBDevice->attached on vmload...
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 <>

3c01ae0e 06/24/2012 03:19 pm Scott Wood

tci: don't write zero for reloc in tci_out_label

If tci_out_label is called in the context of tcg_gen_code_search_pc, we
could be overwriting an already patched relocation with zero -- and not
repatch it because the set_label is past search_pc, causing a QEMU crash...

a483bdae 06/24/2012 03:17 pm Stefan Weil

make: Fix dependencies for fpu/*.c and tcg/*.c

Commit dcff25f2cd8c11a9368cc2369aeb0319c32d9e26 removed too many *.d
files. The directories fpu/ and tcg/ still don't use the recursive
subdir rules.

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

726f8cbf 06/24/2012 03:16 pm Stefan Weil

qemu-log: Add GCC format attribute

The new inline function qemu_log_vprintf should use this attribute.

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

4e469a43 06/24/2012 01:48 pm Blue Swirl

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

  • 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (72 commits)
    PPC: BookE206: Bump MAS2 to 64bit
    PPC: BookE: Support 32 and 64 bit wide MAS2
    PPC: Extract SPR dump generation into its own function...
959a255d 06/24/2012 01:48 pm Blue Swirl

Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: (33 commits)
    target-arm: Remove ARM_CPUID_* macros
    target-arm: Remove remaining old cp15 infrastructure...
8dacfcb4 06/24/2012 01:45 pm Blue Swirl

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

  • 's390-for-upstream' of git://repo.or.cz/qemu/agraf:
    s390: stop target cpu on sigp initial reset
    s390: make kvm_stat work on s390
    kvm: Update kernel headers
    s390x: fix s390 virtio aliases
99918cec 06/24/2012 10:09 am Blue Swirl

Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
    arm_boot: Conditionalised DTB command line update
    cadence_ttc: changed master clock frequency...
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 <>

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

PPC: e500: Refactor serial dt generation

When generating serial port device tree nodes, we duplicate quite a bit
of code, because there are 2 of them in the mpc8544ds board we emulate.

Shove the generating code into a function, so we duplicate less code....

45e9dfb2 06/24/2012 02:04 am Alexander Graf

dt: make setprop argument static

Whatever we pass in to qemu_devtree_setprop to put into the device tree
will not get modified by that function, so it can easily be declared const.

Signed-off-by: Alexander Graf <>
Reviewed-by: Peter Crosthwaite <>

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

PPC: e500: allow users to set the /compatible property via -machine

Device trees usually have a node /compatible, which indicate which machine
type we're looking at. For quick prototyping, it can be very useful to change
the contents of that node via the command line....

5025d542 06/24/2012 02:04 am Alexander Graf

uImage: increase the gzip load size

Recent u-boot has different defines for its gzip extract buffer, but the
common ground seems to be 64MB. So let's bump it up to that, enabling me
to load my test image again ;).

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

518c7fb4 06/24/2012 02:04 am Alexander Graf

PPC: e500: Use new MPIC dt format

Due to popular demand, we're updating the way we generate the MPIC
node and interrupt lines based on what the current state of art is.

Requested-by: Scott Wood <>
Signed-off-by: Alexander Graf <>

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

PPC: e500: Use new SOC dt format

Due to popular demand, let's clean up the soc node a bit and use
more recent dt notions.

Requested-by: Scott Wood <>
Signed-off-by: Alexander Graf <>

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

PPC: e500: Define addresses as always 64bit

Every time we use an address constant, it needs to potentially fit into
a 64bit physical address space. So let's define things accordingly.

Signed-off-by: Alexander Graf <>

3627757e 06/24/2012 02:04 am Alexander Graf

PPC: e500: Extend address/size of / to 64bit

We want to be able to support >= 4GB of RAM. To do so, we need to be able
to tell the guest OS how much RAM it has.

However, that information today is capped to 32bit. So let's extend the
offset and size fields to 64bit, so we can fit in big addresses and even...

4b1b1c89 06/24/2012 02:04 am Alexander Graf

dt: Add global option to set phandle start offset

If anyone outside of QEMU wants to mess with a QEMU generated device tree,
he needs to know which range phandles are valid in. So let's expose a
machine option that an external program can use to set the start allocate...

1d2e5c52 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: use 64bit cell helper

We have a nice 64bit helper to ease the device tree generation and
make the code more readable when creating 64bit 2-cell parameters.
Use it when generating the device tree.

Signed-off-by: Alexander Graf <>

7f47b41f 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: use target_phys_addr_t for ramsize

We're passing the ram size as uint32_t, capping it to 32 bits atm.
Change to target_phys_addr_t (uint64_t) to make sure we have all
the bits.

Signed-off-by: Alexander Graf <>

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

PPC: e500: enable manual loading of dtb blob

We want to be able to override the automatically created device tree
by using the -dtb option. Implement this for the mpc8544ds machine.

Signed-off-by: Alexander Graf <>

1337ae1e 06/24/2012 02:04 am Alexander Graf

Revert "dt: temporarily disable subtree creation failure check"

This reverts commit "dt: temporarily disable subtree creation
failure check" which was meant as a temporary solution to keep
external and dynamic device tree construction intact.

Now that we switched to fully dynamic dt construction, it's no...

5da96624 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: create /soc8544 node dynamically

Signed-off-by: Alexander Graf <>

0cfc6e8d 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: create serial nodes dynamically

Signed-off-by: Alexander Graf <>

19ac9dea 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: create mpic node dynamically

Signed-off-by: Alexander Graf <>

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

PPC: e500: dt: create global-utils node dynamically

Signed-off-by: Alexander Graf <>

0dbc0798 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: create pci node dynamically

Signed-off-by: Alexander Graf <>

2636fcb6 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: start with empty device tree

Now that all of the device tree bits are generated during runtime, we
can get rid of the device tree blob and instead start from scratch with
an empty device tree.

Signed-off-by: Alexander Graf <>

25b42708 06/24/2012 02:04 am Alexander Graf

dt: Add -machine dumpdtb option to dump the current dtb

Now that we are dynamically creating the dtb, it's really useful to
be able to dump the created blob for debugging.

This patch implements a -machine dumpdtb=<file> option for e500 that
dumps the dtb exactly in the form the guest would get it to disk. It...

63397dd0 06/24/2012 02:04 am Alexander Graf

PPC: e500: require libfdt

Now that we're moving all of the device tree generation from an external
pre-execution generated blob to runtime generation using libfdt, we absolutely
must have libfdt around.

This requirement was there before already, as the only way to not require libfdt...

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

PPC: e500: dt: create memory node dynamically

Signed-off-by: Alexander Graf <>

625e665b 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: create /cpus node dynamically

Signed-off-by: Alexander Graf <>

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

PPC: e500: dt: create /hypervisor node dynamically

Signed-off-by: Alexander Graf <>

51b852b7 06/24/2012 02:04 am Alexander Graf

PPC: e500: dt: create / node dynamically

Signed-off-by: Alexander Graf <>

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

PPC: e500: dt: create /chosen node dynamically

Signed-off-by: Alexander Graf <>

7ae2291e 06/24/2012 02:04 am Alexander Graf

dt: add helpers for multi-cell adds

We have device tree helpers that allow us to create single cell (u32)
wide properties. However, when creating properties that contain an array of
cells, we need to jump through hoops, manually passing in an array with
converted endianness....

8535ab12 06/24/2012 02:04 am Alexander Graf

dt: add helper for phandle references

Phandles are the fancy device tree name for "pointer to another node".
To create a phandle property, we most likely want to reference to the
node we're pointing to by its path. So create a helper that allows
us to do so....

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

dt: temporarily disable subtree creation failure check

Usually we want to know when creating a subtree fails. However, while
introducing this patch set we have to modify the device tree and some
times have the code to create a subtree in both the binary tree and...

7d5fd108 06/24/2012 02:04 am Alexander Graf

dt: add helper for phandle enumeration

This patch adds a helper to search for a node's phandle by its path. This
is especially useful when the phandle is part of an array, not just a single
cell in which case qemu_devtree_setprop_phandle would be the easy choice....

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

dt: add helper for empty dt creation

We want to get rid of the concept of loading an external device tree and instead
generate our own. However, to do this we need to also create a device tree
template programatically.

This patch adds a helper to create an empty device tree in memory....

3601b572 06/24/2012 02:04 am Alexander Graf

dt: add helper for phandle allocation

Phandle references work by having 2 pieces:

- a "phandle" 1-cell property in the device tree node
- a reference to the same value in a property we want to point
to the other node

To generate the 1-cell property, we need an allocation mechanism that...

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

dt: add helper for 64bit cell adds

Some times in the device tree, we find an array of 2 u32 cells that
really are a single u64 value. This patch adds a helper to make the
creation of these easy.

Signed-off-by: Alexander Graf <>
Reviewed-by: Peter Crosthwaite <>

5af9873d 06/24/2012 02:04 am Benjamin Herrenschmidt

pseries: Correctly create ibm,segment-page-sizes property

The core tcg/kvm code for ppc64 now has at least the outline
capability to support pagesizes beyond the standard 4k and 16MB. The
CPUState is initialized with information advertising the available...

a4d8e8da 06/24/2012 02:04 am Benjamin Herrenschmidt

spapr_vscsi: Error handling fixes

We were incorrectly g_free'ing an object that isn't allocated
in one error path and failed to release it completely in another

This fixes qemu crashes with some cases of IO errors.

Signed-off-by: Benjamin Herrenschmidt <>...

c73e3771 06/24/2012 02:04 am Benjamin Herrenschmidt

spapr: Add "memop" hypercall

This adds a qemu-specific hypervisor call to the pseries machine
which allows to do what amounts to memmove, memcpy and xor over
regions of physical memory such as the framebuffer.

This is the simplest way to get usable framebuffer speed from...

94282e71 06/24/2012 02:04 am Kevin Wolf

raw-posix: Fix build without is_allocated support

Move the declaration of s into the #ifdef sections that actually make
use of it.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Alexander Graf <>

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

dt: allow add_subnode to create root subnodes

Our subnode creation helper can't handle creation of root subnodes,
like "/memory". Fix this by allowing the parent node to be an empty
string, indicating the root node.

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

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

PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need

The initial TLB entry is supposed to help us run the guest -kernel payload.
This means the guest needs to be able to access its own memory, the initrd
memory and the device tree.

So far we only statically reserved a TLB entry from [0;256M[. This patch...

c8f803e7 06/24/2012 02:04 am Fabien Chouteau

Avoid segfault in cpu_dump_state

Do not call cpu_dump_state if logfile is NULL.

Signed-off-by: Fabien Chouteau <>
[agraf: adjust to inline functions]
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 <>