Re: [Qemu-devel] [PATCH v3] spapr: Add "memop" hypercall

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 08:21, Benjamin Herrenschmidt wrote: > 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

Re: [Qemu-devel] [PATCH] spapr_vscsi: Error handling fixes

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 08:02, Benjamin Herrenschmidt wrote: > 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 Thanks,

Re: [Qemu-devel] [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 07:56, Benjamin Herrenschmidt wrote: > 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, > which combinations are supported

[Qemu-devel] [PATCH 03/31] dt: add helper for phandle references

2012-06-19 Thread Alexander Graf
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. Signed-off-by: Alexander Graf --- v2 -> v3: -

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 22:30, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 16:59 +0200, Juan Quintela wrote: - The hash table (mentioned above). This is just a big chunk of >> memory (it will routinely be 16M), so I really don't want to start >> iterating all elements, just a b

[Qemu-devel] [PATCH 07/31] dt: add helper for phandle allocation

2012-06-19 Thread Alexander Graf
pace. This patch adds an allocator for these properties. Signed-off-by: Alexander Graf --- device_tree.c |7 +++ device_tree.h |1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/device_tree.c b/device_tree.c index d037896..7541274 100644 --- a/device_tree.c +++ b/dev

Re: [Qemu-devel] [PATCH 21/31] dt: Add -machine dumpdtb option to dump the current dtb

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 22:51, Peter Maydell wrote: > On 19 June 2012 20:15, Alexander Graf wrote: >> Now that we are dynamically creating the dtb, it's really useful to >> be able to dump the created blob for debugging. > >> @@ -300,6 +302,22 @@ static int mpc8544_load

[Qemu-devel] [PATCH 13/31] PPC: e500: dt: create / node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |8 pc-bios/mpc8544ds.dtb | Bin 1904 -> 1810 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 54e7ec7..28c7

[Qemu-devel] [PATCH 00/31] PPC: mpc8544ds: Create device tree dynamically

2012-06-19 Thread Alexander Graf
v3: - [phandle helper] rename "string" to target_node_path - [phandle helper] add correct header includes - use snprintf - create and use new multi-cell setting api Alexander Graf (31): dt: allow add_subnode to create root subnodes dt: add helpers for multi-cell adds dt: add

[Qemu-devel] [PATCH 22/31] PPC: e500: dt: use 64bit cell helper

2012-06-19 Thread Alexander Graf
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 --- v1 -> v2: - rename cell64 -> u64 - don't treat memory as single

[Qemu-devel] [PATCH 28/31] PPC: e500: Define addresses as always 64bit

2012-06-19 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c | 34 +- 1 files changed, 17 insertions(+), 17 dele

[Qemu-devel] [PATCH 15/31] PPC: e500: dt: create /soc8544 node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf - use new multi-cell setting api --- hw/ppce500_mpc8544ds.c | 17 + pc-bios/mpc8544ds.dts |9 - 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b

[Qemu-devel] [PATCH 25/31] Revert "dt: temporarily disable subtree creation failure check"

2012-06-19 Thread Alexander Graf
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 longer necessary. Signed-off-by:

[Qemu-devel] [PATCH 05/31] dt: add helper for phandle enumeration

2012-06-19 Thread Alexander Graf
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. Signed-off-by: Alexander Graf --- device_tree.c |

[Qemu-devel] [PATCH 23/31] PPC: e500: dt: use target_phys_addr_t for ramsize

2012-06-19 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ppce500_mpc854

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 23:13, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 23:00 +0200, Alexander Graf wrote: >> How is the problem different from RAM? It's a 16MB region that can be >> accessed by the guest even during transfer time, so it can get dirty >> du

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 23:51, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 23:48 +0200, Alexander Graf wrote: >>> We could keep track manually maybe using some kind of dirty bitmap of >>> changes to the hash table but that would add overhead to things like >>&g

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 20.06.2012, at 01:28, Benjamin Herrenschmidt wrote: > On Wed, 2012-06-20 at 01:11 +0200, Juan Quintela wrote: >> >>> I am confident I can come up with something as far as the kernel and >>> qemu <-> kernel interface goes. I need to get my head around the details >>> on how to implement that t

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 20.06.2012, at 01:52, Benjamin Herrenschmidt wrote: > On Wed, 2012-06-20 at 01:30 +0200, Alexander Graf wrote: >>> We support the paravirtualized -M pseries in full emu as well, in which >>> case the hashed page table is handled by qemu itself who implements the >&g

Re: [Qemu-devel] [PATCH] raw-posix: Fix build without is_allocated support

2012-06-20 Thread Alexander Graf
e "variables have to be declared on the top of a block" methodology. Tested-by: Alexander Graf Alex

Re: [Qemu-devel] [PATCH] raw-posix: Fix build without is_allocated support

2012-06-20 Thread Alexander Graf
On 20.06.2012, at 11:49, Kevin Wolf wrote: > Am 20.06.2012 11:36, schrieb Alexander Graf: >> >> On 20.06.2012, at 10:02, Kevin Wolf wrote: >> >>> Move the declaration of s into the #ifdef sections that actually make >>> use of it. >>> >>

[Qemu-devel] [PATCH 6/8] PPC: BookE: Implement EPR SPR

2012-06-20 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c |1 + target-ppc/Makefile.objs |1 + t

[Qemu-devel] [PATCH 4/8] PPC: Add some booke SPR defines

2012-06-20 Thread Alexander Graf
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 --- target-ppc/cpu.h | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 5/8] PPC: Add support for MSR_CM

2012-06-20 Thread Alexander Graf
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 --- target-ppc/cpu.h |9 + target-ppc/excp_helper.c |9 + target-ppc/mem_helper.c |2 +- target-ppc

[Qemu-devel] [PATCH 8/8] PPC: Add e5500 CPU target

2012-06-20 Thread Alexander Graf
This patch adds e5500's CPU initialization to the TCG CPU initialization code. Signed-off-by: Alexander Graf --- target-ppc/translate_init.c | 104 +- 1 files changed, 101 insertions(+), 3 deletions(-) diff --git a/target-ppc/translate_init.c b/t

[Qemu-devel] [PATCH 7/8] PPC: Turn hardcoded reset mask into env variable

2012-06-20 Thread Alexander Graf
Some machines have MSR bits they reset with as enabled. Don't hardcode the logic, but let the individual core implementations save their own reset mask into an env variable. Signed-off-by: Alexander Graf --- target-ppc/cpu.h|1 + target-ppc/translate_init.c |

[Qemu-devel] [PATCH 1/8] dt: make setprop argument static

2012-06-20 Thread Alexander Graf
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 --- device_tree.c |2 +- device_tree.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH 3/8] uImage: increase the gzip load size

2012-06-20 Thread Alexander Graf
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 --- hw/loader.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 2/8] PPC: e500: allow users to set the /compatible property via -machine

2012-06-20 Thread Alexander Graf
s the /compatible contents to its value. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 12 +--- qemu-config.c |4 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index f6da25b..d38ad99 100644 ---

[Qemu-devel] [PATCH 0/8] PPC: e5500 emulation

2012-06-20 Thread Alexander Graf
020DS This should get you a working kernel. Everything after that works just the same as with e500v2 or e500mc. Alex Alexander Graf (8): dt: make setprop argument static PPC: e500: allow users to set the /compatible property via -machine uImage: increase the gzip load size PPC: Add some

Re: [Qemu-devel] [PATCH 8/8] PPC: Add e5500 CPU target

2012-06-20 Thread Alexander Graf
On 21.06.2012, at 00:26, Scott Wood wrote: > On 06/20/2012 03:11 PM, Alexander Graf wrote: >> +/* XXX better abstract into Emb.xxx features */ >> +if (version == fsl_e5500) { >> +spr_register(env, SPR_BOOKE_EPCR, "EPCR", >> +

Re: [Qemu-devel] [PATCH 8/8] PPC: Add e5500 CPU target

2012-06-20 Thread Alexander Graf
On 21.06.2012, at 01:07, Scott Wood wrote: > On 06/20/2012 05:59 PM, Alexander Graf wrote: >> >> On 21.06.2012, at 00:26, Scott Wood wrote: >> >>> On 06/20/2012 03:11 PM, Alexander Graf wrote: >>>> +/* XXX better abstract into Emb.xxx feat

[Qemu-devel] [PATCH v2 11/11] PPC: BookE206: Bump MAS2 to 64bit

2012-06-21 Thread Alexander Graf
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 --- target-ppc/cpu.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 652a35a

[Qemu-devel] [PATCH v2 05/11] PPC: Add support for MSR_CM

2012-06-21 Thread Alexander Graf
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 --- target-ppc/cpu.h |9 + target-ppc/excp_helper.c |9 + target-ppc/mem_helper.c |2 +- target-ppc

[Qemu-devel] [PATCH v2 07/11] PPC: BookE: Make ivpr selectable by CPU type

2012-06-21 Thread Alexander Graf
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 --- target-ppc/translate_init.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH v2 09/11] PPC: Extract SPR dump generation into its own function

2012-06-21 Thread Alexander Graf
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 --- target-ppc/translate_init.c | 30 ++ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/t

[Qemu-devel] [PATCH v2 04/11] PPC: Add some booke SPR defines

2012-06-21 Thread Alexander Graf
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 --- target-ppc/cpu.h | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH v2 00/11] PPC: e5500 emulation

2012-06-21 Thread Alexander Graf
020DS This should get you a working kernel. Everything after that works just the same as with e500v2 or e500mc. v1 -> v2: - remove reset msr vector - clean up ivpr_mask code - make MAS2 64bit aware Alex Alexander Graf (11): dt: make setprop argument static PPC: e500: allow users to

[Qemu-devel] [PATCH v2 02/11] PPC: e500: allow users to set the /compatible property via -machine

2012-06-21 Thread Alexander Graf
s the /compatible contents to its value. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 12 +--- qemu-config.c |4 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index f6da25b..d38ad99 100644 ---

[Qemu-devel] [PATCH v2 10/11] PPC: BookE: Support 32 and 64 bit wide MAS2

2012-06-21 Thread Alexander Graf
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. Signed-off-by: Alexander Graf --- target-ppc/translate_init.c | 19

[Qemu-devel] [PATCH v2 03/11] uImage: increase the gzip load size

2012-06-21 Thread Alexander Graf
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 --- hw/loader.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v2 08/11] PPC: Add e5500 CPU target

2012-06-21 Thread Alexander Graf
This patch adds e5500's CPU initialization to the TCG CPU initialization code. Signed-off-by: Alexander Graf --- v1 -> v2: - remove reset msr vector - clean up ivpr_mask code --- target-ppc/translate_init.c | 96 +- 1 files changed, 93 in

[Qemu-devel] [PATCH v2 06/11] PPC: BookE: Implement EPR SPR

2012-06-21 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c |1 + target-ppc/Makefile.objs |1 + t

[Qemu-devel] [PATCH v2 01/11] dt: make setprop argument static

2012-06-21 Thread Alexander Graf
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 --- device_tree.c |2 +- device_tree.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH v2 10/11] PPC: BookE: Support 32 and 64 bit wide MAS2

2012-06-21 Thread Alexander Graf
On 21.06.2012, at 18:04, Scott Wood wrote: > On 06/21/2012 08:33 AM, Alexander Graf wrote: >> 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 ca

Re: [Qemu-devel] [PATCH 7/8] PPC: Turn hardcoded reset mask into env variable

2012-06-21 Thread Alexander Graf
On 21.06.2012, at 20:09, Blue Swirl wrote: > On Wed, Jun 20, 2012 at 8:11 PM, Alexander Graf wrote: >> Some machines have MSR bits they reset with as enabled. Don't hardcode the >> logic, but let the individual core implementations save their own reset >>

Re: [Qemu-devel] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Alexander Graf
iner for the time being, unless someone else wants to stand up and take on it. Acked-by: Alexander Graf Alex

Re: [Qemu-devel] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-23 Thread Alexander Graf
On 23.06.2012, at 02:45, Peter Crosthwaite wrote: > On Sat, Jun 23, 2012 at 7:14 AM, Alexander Graf wrote: >> >> On 22.06.2012, at 15:17, Peter Crosthwaite wrote: >> >>> CC device-tree.c original contributors. (Jerome Young and Hollis Blanchard). >>>

[Qemu-devel] [PATCH] TCG: Fix compile breakage in tcg_dump_ops

2012-06-23 Thread Alexander Graf
Commit eeacee4d865 changed the syntax of tcg_dump_ops, but didn't convert all users (notably missing the ppc ones) to it. Fix them to the new syntax. Signed-off-by: Alexander Graf --- tcg/ppc/tcg-target.c |2 +- tcg/ppc64/tcg-target.c |2 +- 2 files changed, 2 insertions(

[Qemu-devel] [PULL 00/72] ppc patch queue 2012-06-24

2012-06-23 Thread Alexander Graf
Hi Blue / Aurelien, This is my current patch queue for ppc. Please pull. Alex The following changes since commit affe5189907f397514cdd4ee7446595c1246a0e9: Alexander Graf (1): TCG: Fix compile breakage in tcg_dump_ops are available in the git repository at: git://repo.or.cz/qemu

[Qemu-devel] [PATCH 12/72] ppc: Avoid a warning with the next patch

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf

[Qemu-devel] [PATCH 45/72] PPC: e500: dt: create /soc8544 node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 17 + pc-bios/mpc8544ds.dts |9 - 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index a078e24..c7c16c1 100644 --- a/hw/ppce500_mpc8544ds.c

[Qemu-devel] [PATCH 44/72] PPC: e500: dt: create /chosen node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 28c7c8c..a078e24 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -101,6 +101,7 @@ static int

[Qemu-devel] [PATCH 36/72] dt: add helper for empty dt creation

2012-06-23 Thread Alexander Graf
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. Signed-off-by: Alexander Graf Reviewed-by

[Qemu-devel] [PATCH 43/72] PPC: e500: dt: create / node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |8 pc-bios/mpc8544ds.dtb | Bin 1904 -> 1810 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 54e7ec7..28c7

[Qemu-devel] [PATCH 47/72] PPC: e500: dt: create mpic node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index c68e994..5c2b6ab 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -83,6 +83,8

[Qemu-devel] [PATCH 29/72] spapr: Add "memop" hypercall

2012-06-23 Thread Alexander Graf
vided by qemu (including SLOF) which internally calls H_RTAS. We might in the future implement part (or even all) of RTAS inside the guest like IBM's firmware does and replace H_RTAS with some finer grained set of private hypercalls. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Alex

[Qemu-devel] [PATCH 38/72] dt: add helper for 64bit cell adds

2012-06-23 Thread Alexander Graf
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 --- device_tree.c |7 +++ device_tree.h |2 ++ 2 files

[Qemu-devel] [PATCH 11/72] ppc: Avoid AREG0 for MMU etc. helpers

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/Makefile.objs|1 - target-ppc/helper.h | 74

[Qemu-devel] [PATCH 15/72] ppc: Split off timebase helpers

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/Makefile.objs |2 + target-ppc/op_helper.c | 135

[Qemu-devel] [PATCH 20/72] ppc: Move load and store helpers, switch to AREG0 free mode

2012-06-23 Thread Alexander Graf
, cpu_{ld,st}{l,uw}_data in loads and stores. Signed-off-by: Blue Swirl Signed-off-by: Alexander Graf Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf --- configure|2 +- cpu-all.h|9 +++ target-ppc/Makefile.objs

[Qemu-devel] [PATCH 72/72] PPC: BookE206: Bump MAS2 to 64bit

2012-06-23 Thread Alexander Graf
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 --- target-ppc/cpu.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 652a35a

[Qemu-devel] [PATCH 61/72] PPC: e500: Refactor serial dt generation

2012-06-23 Thread Alexander Graf
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. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 54

[Qemu-devel] [PATCH 60/72] dt: Add global option to set phandle start offset

2012-06-23 Thread Alexander Graf
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 id for phandles in QEMU. Signed-off-by: Alexander Graf --- device_t

[Qemu-devel] [PATCH 10/72] ppc: Split MMU etc. helpers from op_helper.c

2012-06-23 Thread Alexander Graf
From: Blue Swirl Move MMU, TLB, SLB and BAT ops to mmu_helper.c. Signed-off-by: Blue Swirl Signed-off-by: Alexander Graf Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf --- target-ppc/Makefile.objs |2 + target-ppc/mmu_helper.c | 882

[Qemu-devel] [PATCH 17/72] ppc: Split off misc helpers

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/Makefile.objs |2 + target-ppc/misc_helper.c | 116

[Qemu-devel] [PATCH 69/72] PPC: Add e5500 CPU target

2012-06-23 Thread Alexander Graf
This patch adds e5500's CPU initialization to the TCG CPU initialization code. Signed-off-by: Alexander Graf --- target-ppc/translate_init.c | 96 +- 1 files changed, 93 insertions(+), 3 deletions(-) diff --git a/target-ppc/translate_init.c b/t

[Qemu-devel] [PATCH 28/72] spapr_vscsi: Error handling fixes

2012-06-23 Thread Alexander Graf
From: Benjamin Herrenschmidt 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 Signed-off-by: Alexander Gra

[Qemu-devel] [PATCH 67/72] PPC: BookE: Implement EPR SPR

2012-06-23 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c |1 + target-ppc/Makefile.objs |1 + t

[Qemu-devel] [PATCH 27/72] pseries: Correctly create ibm, segment-page-sizes property

2012-06-23 Thread Alexander Graf
roperty in the guest device tree. This patch generates this property using the supported page size information that's already in the CPUState. Signed-off-by: Nishanth Aravamudan Signed-off-by: David Gibson Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Alexander Gra

[Qemu-devel] [PATCH 48/72] PPC: e500: dt: create global-utils node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |9 + pc-bios/mpc8544ds.dts |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 5c2b6ab..03938b2 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw

[Qemu-devel] [PATCH 71/72] PPC: BookE: Support 32 and 64 bit wide MAS2

2012-06-23 Thread Alexander Graf
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. Signed-off-by: Alexander Graf --- target-ppc/translate_init.c | 19

[Qemu-devel] [PATCH 18/72] ppc: Avoid AREG0 for misc helpers

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/Makefile.objs|1 - target-ppc/helper.h | 18

[Qemu-devel] [PATCH 58/72] PPC: e500: Define addresses as always 64bit

2012-06-23 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c | 34 +- 1 files changed, 17 insertions(+), 17 dele

[Qemu-devel] [PATCH 41/72] PPC: e500: dt: create /cpus node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |5 + pc-bios/mpc8544ds.dtb | Bin 1972 -> 1924 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 3ec9013..c046

[Qemu-devel] [PATCH 59/72] PPC: e500: Extend address/size of / to 64bit

2012-06-23 Thread Alexander Graf
so - map devices above 32bit. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 28 ++-- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index c6a09bb..bf48bc7 100644 --- a/hw/ppce500_mpc8544ds.c

[Qemu-devel] [PATCH 09/72] ppc: Avoid AREG0 for integer and vector helpers

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 [fix unwanted whitespace line in Makefile.target] Signed-off-by: Alexander Graf --- target-ppc/Makefile.objs |1

[Qemu-devel] [PATCH 56/72] PPC: e500: Use new MPIC dt format

2012-06-23 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c | 33 ++--- 1 files changed, 18 inser

[Qemu-devel] [PATCH 24/72] Avoid segfault in cpu_dump_state

2012-06-23 Thread Alexander Graf
From: Fabien Chouteau 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 --- qemu-log.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/qemu-log.h b/qemu-log.h index

[Qemu-devel] [PATCH 32/72] dt: add helpers for multi-cell adds

2012-06-23 Thread Alexander Graf
that allows us to pass the cells as arguments. Signed-off-by: Alexander Graf Reviewed-by: Peter Crosthwaite --- device_tree.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/device_tree.h b/device_tree.h index 4378685..1e671e2 100644 --- a/device_tree.h +++ b

[Qemu-devel] [PATCH 53/72] PPC: e500: dt: use target_phys_addr_t for ramsize

2012-06-23 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ppce500_mpc854

[Qemu-devel] [PATCH 33/72] dt: add helper for phandle references

2012-06-23 Thread Alexander Graf
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. Signed-off-by: Alexander Graf Reviewed-by: Pe

[Qemu-devel] [PATCH 19/72] ppc: Move misc helpers from helper.c to misc_helper.c

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/helper.c |9 - target-ppc/misc_helper.c |9 + 2 files

[Qemu-devel] [PATCH 64/72] uImage: increase the gzip load size

2012-06-23 Thread Alexander Graf
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 --- hw/loader.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 54/72] PPC: e500: enable manual loading of dtb blob

2012-06-23 Thread Alexander Graf
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 --- hw/ppce500_mpc8544ds.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 31/72] dt: allow add_subnode to create root subnodes

2012-06-23 Thread Alexander Graf
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 Reviewed-by: Peter Crosthwaite --- device_tree.c |7 ++- 1 files change

[Qemu-devel] [PATCH 25/72] booke_206_tlbwe: Discard invalid bits in MAS2

2012-06-23 Thread Alexander Graf
represent offsets within a page are ignored and should be cleared. There is a similar (but more complicated) definition in PowerISA V2.06. Signed-off-by: Fabien Chouteau Signed-off-by: Alexander Graf --- target-ppc/mmu_helper.c | 17 +++-- 1 files changed, 15 insertions(+), 2

[Qemu-devel] [PATCH 49/72] PPC: e500: dt: create pci node dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 50 pc-bios/mpc8544ds.dtb | Bin 1810 -> 72 bytes pc-bios/mpc8544ds.dts | 46 3 files changed, 50 insertions(+), 46 deletions(-) d

[Qemu-devel] [PATCH 22/72] ppc: Make hbrev table const

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/int_helper.c |2 +- 1 files changed, 1 insert

[Qemu-devel] [PATCH 66/72] PPC: Add support for MSR_CM

2012-06-23 Thread Alexander Graf
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 --- target-ppc/cpu.h |9 + target-ppc/excp_helper.c |9 + target-ppc/mem_helper.c |2 +- target-ppc

[Qemu-devel] [PATCH 46/72] PPC: e500: dt: create serial nodes dynamically

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 35 +++ pc-bios/mpc8544ds.dts | 26 -- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index c7c16c1..c68e994

[Qemu-devel] [PATCH 51/72] dt: Add -machine dumpdtb option to dump the current dtb

2012-06-23 Thread Alexander Graf
ation about the guest configuration. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 18 ++ qemu-config.c |4 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 880ed55..7c6edc2 100644

[Qemu-devel] [PATCH 35/72] dt: add helper for phandle enumeration

2012-06-23 Thread Alexander Graf
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. Signed-off-by: Alexander Graf Reviewed-by: Peter Crosth

[Qemu-devel] [PATCH 62/72] dt: make setprop argument static

2012-06-23 Thread Alexander Graf
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 --- device_tree.c |2 +- device_tree.h |2 +- 2 files changed, 2 insertions

[Qemu-devel] [PATCH 37/72] dt: add helper for phandle allocation

2012-06-23 Thread Alexander Graf
pace. This patch adds an allocator for these properties. Signed-off-by: Alexander Graf --- device_tree.c |7 +++ device_tree.h |1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/device_tree.c b/device_tree.c index d037896..7541274 100644 --- a/device_tree.c +++ b/dev

[Qemu-devel] [PATCH 16/72] ppc: Avoid AREG0 for timebase helpers

2012-06-23 Thread Alexander Graf
From: Blue Swirl 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 --- target-ppc/Makefile.objs |1 - target-ppc/helper.h | 42

[Qemu-devel] [PATCH 65/72] PPC: Add some booke SPR defines

2012-06-23 Thread Alexander Graf
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 --- target-ppc/cpu.h | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 63/72] PPC: e500: allow users to set the /compatible property via -machine

2012-06-23 Thread Alexander Graf
s the /compatible contents to its value. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 12 +--- qemu-config.c |4 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index f6da25b..d38ad99 100644 ---

[Qemu-devel] [PATCH 26/72] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-06-23 Thread Alexander Graf
Signed-off-by: Alexander Graf --- target-ppc/cpu.h| 31 +++ target-ppc/kvm.c| 208 +++ target-ppc/kvm_ppc.h|5 + target-ppc/mmu_helper.c |7 ++ target-ppc/translate_init.c | 21 + 5 files changed,

[Qemu-devel] [PATCH 39/72] PPC: e500: require libfdt

2012-06-23 Thread Alexander Graf
which was the only way to boot the mpc8544ds machine. This patch only manifests said requirement in the build system. Signed-off-by: Alexander Graf --- hw/ppc/Makefile.objs |2 +- hw/ppce500_mpc8544ds.c |5 - 2 files changed, 1 insertions(+), 6 deletions(-) diff --git a/h

<    1   2   3   4   5   6   7   8   9   10   >