ppc patch queue 2011-11-11 for 1.0
Hi Blue,
This is my current patch queue for ppc on QEMU 1.0. Please pull.
Alex
The following changes since commit 0e3b800e71cb7759d099eabbd8ad4c4fe848e381:
Peter Maydell (1):
hw/lan9118.c: Add missing 'break' to fix buffer overrun
are available in the git repository at:
git://repo.or.cz/qemu/agraf.git ppc-1.0
David Gibson (2):
pseries: Fix initialization of sPAPREnvironment structure
tcg-ppc64: Fix compile errors for userspace only builds with gcc 4.6
Sebastian Bauer (1):
PPC: Fix for the gdb single step problem on an rfi instruction
hw/spapr.c | 4 +++- target-ppc/translate.c | 4 +++- tcg/ppc64/tcg-target.c | 14 ++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-)
PATCH 1/3 pseries: Fix initialization of sPAPREnvironment structure
From: David Gibson <[email protected]>
Since we added PCI support to the pseries machine, we include a qlist of PCI host bridges in the sPAPREnvironment structure. However this list was never properly initialized it. Somehow we got away with this until some other recent change broke it, and we now segfault immediately on startup.
This patch adds the required QLIST_INIT(), and while we're at it makes sure we initialize the rest of the sPAPREnvironment structure to 0, to avoid future nasty surprises.
--- hw/spapr.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
hw/spapr.c +3 -1
@@ -407,7 +407,9 @@ static void ppc_spapr_init(ram_addr_t ram_size,long pteg_shift =17 ;char *filename; - spapr =g_malloc (sizeof (*spapr)); + spapr =g_malloc0 (sizeof (*spapr)); +QLIST_INIT (&spapr->phbs); + cpu_ppc_hypercall = emulate_spapr_hypercall;/* Allocate RMA if necessary */
Signature · 1 line
1.6.0.2
PATCH 2/3 tcg-ppc64: Fix compile errors for userspace only builds with gcc 4.6
In reply to Alexander GrafFrom: David Gibson <[email protected]>
tcg/ppc64/tcg-target.c has a couple of places where variables are set unconditionally, but otherwise used only for softmmu builds, not userspace only builds. This causes compiler warnings (which are fatal by default) when compiling for a ppc64 host with gcc 4.6. This patch fixes the problem by moving the code which defines and sets the variables into the CONFIG_SOFTMMU guarded regions.
--- tcg/ppc64/tcg-target.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
tcg/ppc64/tcg-target.c +8 -6
@@ -616,18 +616,19 @@ static void tcg_out_tlb_read (TCGContext *s, int r0, int r1, int r2,static void tcg_out_qemu_ld (TCGContext *s,const TCGArg *args,int opc) { -int addr_reg, data_reg, r0, r1, rbase, mem_index, s_bits, bswap; +int addr_reg, data_reg, r0, r1, rbase, bswap;#ifdef CONFIG_SOFTMMU -int r2; +int r2, mem_index, s_bits;void *label1_ptr, *label2_ptr;#endif data_reg = *args++; addr_reg = *args++; + +#ifdef CONFIG_SOFTMMU mem_index = *args; s_bits = opc &3 ; -#ifdef CONFIG_SOFTMMU r0 =3 ; r1 =4 ; r2 =0 ;
@@ -763,17 +764,18 @@ static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc)static void tcg_out_qemu_st (TCGContext *s,const TCGArg *args,int opc) { -int addr_reg, r0, r1, rbase, data_reg, mem_index, bswap; +int addr_reg, r0, r1, rbase, data_reg, bswap;#ifdef CONFIG_SOFTMMU -int r2; +int r2, mem_index;void *label1_ptr, *label2_ptr;#endif data_reg = *args++; addr_reg = *args++; - mem_index = *args;#ifdef CONFIG_SOFTMMU + mem_index = *args; + r0 =3 ; r1 =4 ; r2 =0 ;
Signature · 1 line
1.6.0.2
PATCH 3/3 PPC: Fix for the gdb single step problem on an rfi instruction
In reply to Alexander GrafFrom: Sebastian Bauer <[email protected]>
When using gdb to single step a ppc interrupt routine, the execution flow passes the rfi instruction without actually returning from the interrupt.
The patch fixes this by avoiding to update the nip when the debug exception is raised and a previous POWERPC_EXCP_SYNC was set.
The latter is the case only, if code for rfi or a related instruction was generated.
--- target-ppc/translate.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
target-ppc/translate.c +3 -1
@@ -298,8 +298,10 @@ static inline void gen_debug_exception(DisasContext *ctx) {TCGv_i32 t0; -if (ctx->exception !=POWERPC_EXCP_BRANCH ) +if ((ctx->exception !=POWERPC_EXCP_BRANCH ) && + (ctx->exception !=POWERPC_EXCP_SYNC )) {gen_update_nip (ctx, ctx->nip); + } t0 =tcg_const_i32 (EXCP_DEBUG );gen_helper_raise_exception (t0);tcg_temp_free_i32 (t0);
Signature · 1 line
1.6.0.2
Quoted 3 lines · Alexander Graf
Hi Blue,
This is my current patch queue for ppc on QEMU 1.0. Please pull.
Thanks, pulled.
Quoted 23 lines
Alex
The following changes since commit
0e3b800e71cb7759d099eabbd8ad4c4fe848e381:
Peter Maydell (1):
hw/lan9118.c: Add missing 'break' to fix buffer overrunare available in the git repository at:
git://repo.or.cz/qemu/agraf.git ppc-1.0
David Gibson (2):
pseries: Fix initialization of sPAPREnvironment structure
tcg-ppc64: Fix compile errors for userspace only builds with gcc 4.6Sebastian Bauer (1):
PPC: Fix for the gdb single step problem on an rfi instructionhw/spapr.c | 4 +++-
target-ppc/translate.c | 4 +++-
tcg/ppc64/tcg-target.c | 14 ++++++++------3 files changed, 14 insertions(+), 8 deletions(-)