All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011
@ 2011-06-02  6:32 Alexander Graf
  2011-06-02  6:32 ` [Qemu-devel] [PATCH 1/5] ppc: Fix compilation for ppc64-softmmu Alexander Graf
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alexander Graf @ 2011-06-02  6:32 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Aurelien Jarno

Howdy,

This is my current PPC patch queue, containing a compile fix for ppc64 and
some fixes I've come along while trying to get the e500 target working in
autotest.

Please pull.

The following changes since commit 578c7b2ca8ee9e97fa8693b1a83d517e8e3f962e:
  Juha Riihim?ki (1):
        audio: fix integer overflow expression

are available in the git repository at:

  git://repo.or.cz/qemu/agraf.git ppc-next


Alexander Graf (4):
  PPC: fix sregs usage on booke
  PPC: install mpc8544ds.dtb
  Fix segfault on screendump with -nographic
  PPC: fix mpc8544ds pci default devices

Stefan Weil (1):
  ppc: Fix compilation for ppc64-softmmu

 Makefile                    |    1 +
 console.c                   |    2 +-
 hw/ppce500_mpc8544ds.c      |    2 +-
 target-ppc/kvm.c            |   10 ++++------
 target-ppc/translate_init.c |   12 ++++++------
 5 files changed, 13 insertions(+), 14 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 1/5] ppc: Fix compilation for ppc64-softmmu
  2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
@ 2011-06-02  6:32 ` Alexander Graf
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 2/5] PPC: fix sregs usage on booke Alexander Graf
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2011-06-02  6:32 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Aurelien Jarno

From: Stefan Weil <weil@mail.berlios.de>

When QEMU was configured with --enable-debug-tcg,
compilation fails in spr_write_booke206_mmucsr0() and in
spr_write_booke_pid(). Similar changes are also needed
in conditional code which is normally unused.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-ppc/translate_init.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index b511afa..fc50ae3 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -73,7 +73,7 @@ static void spr_read_generic (void *opaque, int gprn, int sprn)
     gen_load_spr(cpu_gpr[gprn], sprn);
 #ifdef PPC_DUMP_SPR_ACCESSES
     {
-        TCGv t0 = tcg_const_i32(sprn);
+        TCGv_i32 t0 = tcg_const_i32(sprn);
         gen_helper_load_dump_spr(t0);
         tcg_temp_free_i32(t0);
     }
@@ -85,7 +85,7 @@ static void spr_write_generic (void *opaque, int sprn, int gprn)
     gen_store_spr(sprn, cpu_gpr[gprn]);
 #ifdef PPC_DUMP_SPR_ACCESSES
     {
-        TCGv t0 = tcg_const_i32(sprn);
+        TCGv_i32 t0 = tcg_const_i32(sprn);
         gen_helper_store_dump_spr(t0);
         tcg_temp_free_i32(t0);
     }
@@ -1367,16 +1367,16 @@ static void spr_write_e500_l1csr0 (void *opaque, int sprn, int gprn)
 
 static void spr_write_booke206_mmucsr0 (void *opaque, int sprn, int gprn)
 {
-    TCGv t0 = tcg_const_i32(sprn);
+    TCGv_i32 t0 = tcg_const_i32(sprn);
     gen_helper_booke206_tlbflush(t0);
-    tcg_temp_free(t0);
+    tcg_temp_free_i32(t0);
 }
 
 static void spr_write_booke_pid (void *opaque, int sprn, int gprn)
 {
-    TCGv t0 = tcg_const_i32(sprn);
+    TCGv_i32 t0 = tcg_const_i32(sprn);
     gen_helper_booke_setpid(t0, cpu_gpr[gprn]);
-    tcg_temp_free(t0);
+    tcg_temp_free_i32(t0);
 }
 #endif
 
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 2/5] PPC: fix sregs usage on booke
  2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
  2011-06-02  6:32 ` [Qemu-devel] [PATCH 1/5] ppc: Fix compilation for ppc64-softmmu Alexander Graf
@ 2011-06-02  6:33 ` Alexander Graf
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 3/5] PPC: install mpc8544ds.dtb Alexander Graf
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2011-06-02  6:33 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Scott Wood, Aurelien Jarno

When compiling qemu with kvm support on BookE PPC machines, I get
the following error:

  cc1: warnings being treated as errors
  /tmp/qemu/target-ppc/kvm.c: In function 'kvm_arch_get_registers':
  /tmp/qemu/target-ppc/kvm.c:188: error: unused variable 'sregs'

This is due to overly ambitious #ifdef'ery introduced in 90dc88.
Fix it by keeping code that doesn't depend on new headers alive
for the compiler, but never executed due to failing capability
checks.

CC: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-ppc/kvm.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index ccf4668..e7b1b10 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -45,9 +45,7 @@ const KVMCapabilityInfo kvm_arch_required_capabilities[] = {
 static int cap_interrupt_unset = false;
 static int cap_interrupt_level = false;
 static int cap_segstate;
-#ifdef KVM_CAP_PPC_BOOKE_SREGS
 static int cap_booke_sregs;
-#endif
 
 /* XXX We have a race condition where we actually have a level triggered
  *     interrupt, but the infrastructure can't expose that yet, so the guest
@@ -222,13 +220,13 @@ int kvm_arch_get_registers(CPUState *env)
     for (i = 0;i < 32; i++)
         env->gpr[i] = regs.gpr[i];
 
-#ifdef KVM_CAP_PPC_BOOKE_SREGS
     if (cap_booke_sregs) {
         ret = kvm_vcpu_ioctl(env, KVM_GET_SREGS, &sregs);
         if (ret < 0) {
             return ret;
         }
 
+#ifdef KVM_CAP_PPC_BOOKE_SREGS
         if (sregs.u.e.features & KVM_SREGS_E_BASE) {
             env->spr[SPR_BOOKE_CSRR0] = sregs.u.e.csrr0;
             env->spr[SPR_BOOKE_CSRR1] = sregs.u.e.csrr1;
@@ -325,16 +323,16 @@ int kvm_arch_get_registers(CPUState *env)
                 env->spr[SPR_BOOKE_PID2] = sregs.u.e.impl.fsl.pid2;
             }
         }
-    }
 #endif
+    }
 
-#ifdef KVM_CAP_PPC_SEGSTATE
     if (cap_segstate) {
         ret = kvm_vcpu_ioctl(env, KVM_GET_SREGS, &sregs);
         if (ret < 0) {
             return ret;
         }
 
+#ifdef KVM_CAP_PPC_SEGSTATE
         ppc_store_sdr1(env, sregs.u.s.sdr1);
 
         /* Sync SLB */
@@ -357,8 +355,8 @@ int kvm_arch_get_registers(CPUState *env)
             env->IBAT[0][i] = sregs.u.s.ppc32.ibat[i] & 0xffffffff;
             env->IBAT[1][i] = sregs.u.s.ppc32.ibat[i] >> 32;
         }
-    }
 #endif
+    }
 
     return 0;
 }
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 3/5] PPC: install mpc8544ds.dtb
  2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
  2011-06-02  6:32 ` [Qemu-devel] [PATCH 1/5] ppc: Fix compilation for ppc64-softmmu Alexander Graf
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 2/5] PPC: fix sregs usage on booke Alexander Graf
@ 2011-06-02  6:33 ` Alexander Graf
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic Alexander Graf
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2011-06-02  6:33 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Aurelien Jarno

We don't install mpc8544ds.dtb, which means that -M mpc8544ds doesn't
work when installed. Fix it by installing the file.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 2b0438c..b6466e7 100644
--- a/Makefile
+++ b/Makefile
@@ -185,6 +185,7 @@ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \
 pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
 pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
 bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
+mpc8544ds.dtb \
 multiboot.bin linuxboot.bin \
 s390-zipl.rom \
 spapr-rtas.bin slof.bin
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic
  2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
                   ` (2 preceding siblings ...)
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 3/5] PPC: install mpc8544ds.dtb Alexander Graf
@ 2011-06-02  6:33 ` Alexander Graf
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 5/5] PPC: fix mpc8544ds pci default devices Alexander Graf
  2011-06-03 16:15 ` [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Aurelien Jarno
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2011-06-02  6:33 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Aurelien Jarno

When running -nographic and calling "screendump" on the monitor, qemu
segfaults. Fix the invalid pointer dereference by checking for NULL.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 console.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/console.c b/console.c
index 871c1d4..9c6addf 100644
--- a/console.c
+++ b/console.c
@@ -180,7 +180,7 @@ void vga_hw_screen_dump(const char *filename)
     active_console = consoles[0];
     /* There is currently no way of specifying which screen we want to dump,
        so always dump the first one.  */
-    if (consoles[0]->hw_screen_dump)
+    if (consoles[0] && consoles[0]->hw_screen_dump)
         consoles[0]->hw_screen_dump(consoles[0]->hw, filename);
     active_console = previous_active_console;
 }
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 5/5] PPC: fix mpc8544ds pci default devices
  2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
                   ` (3 preceding siblings ...)
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic Alexander Graf
@ 2011-06-02  6:33 ` Alexander Graf
  2011-06-03 16:15 ` [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Aurelien Jarno
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2011-06-02  6:33 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Aurelien Jarno

After the Qdev'ification of the MPC8544DS board and PCI bus, the internal
PCI bus name changed from "pci" to "pci.0". Reflect this change in the
search for that bus.

This patch enables networking on e500 guests again.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/ppce500_mpc8544ds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index 17b0165..6b57fbf 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -275,7 +275,7 @@ static void mpc8544ds_init(ram_addr_t ram_size,
                                 mpic[pci_irq_nrs[0]], mpic[pci_irq_nrs[1]],
                                 mpic[pci_irq_nrs[2]], mpic[pci_irq_nrs[3]],
                                 NULL);
-    pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
+    pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
     if (!pci_bus)
         printf("couldn't create PCI controller!\n");
 
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011
  2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
                   ` (4 preceding siblings ...)
  2011-06-02  6:33 ` [Qemu-devel] [PATCH 5/5] PPC: fix mpc8544ds pci default devices Alexander Graf
@ 2011-06-03 16:15 ` Aurelien Jarno
  5 siblings, 0 replies; 7+ messages in thread
From: Aurelien Jarno @ 2011-06-03 16:15 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel@nongnu.org Developers

On Thu, Jun 02, 2011 at 08:32:58AM +0200, Alexander Graf wrote:
> Howdy,
> 
> This is my current PPC patch queue, containing a compile fix for ppc64 and
> some fixes I've come along while trying to get the e500 target working in
> autotest.
> 
> Please pull.

Done.

> The following changes since commit 578c7b2ca8ee9e97fa8693b1a83d517e8e3f962e:
>   Juha Riihim?ki (1):
>         audio: fix integer overflow expression
> 
> are available in the git repository at:
> 
>   git://repo.or.cz/qemu/agraf.git ppc-next
> 
> 
> Alexander Graf (4):
>   PPC: fix sregs usage on booke
>   PPC: install mpc8544ds.dtb
>   Fix segfault on screendump with -nographic
>   PPC: fix mpc8544ds pci default devices
> 
> Stefan Weil (1):
>   ppc: Fix compilation for ppc64-softmmu
> 
>  Makefile                    |    1 +
>  console.c                   |    2 +-
>  hw/ppce500_mpc8544ds.c      |    2 +-
>  target-ppc/kvm.c            |   10 ++++------
>  target-ppc/translate_init.c |   12 ++++++------
>  5 files changed, 13 insertions(+), 14 deletions(-)
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-03 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-02  6:32 [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Alexander Graf
2011-06-02  6:32 ` [Qemu-devel] [PATCH 1/5] ppc: Fix compilation for ppc64-softmmu Alexander Graf
2011-06-02  6:33 ` [Qemu-devel] [PATCH 2/5] PPC: fix sregs usage on booke Alexander Graf
2011-06-02  6:33 ` [Qemu-devel] [PATCH 3/5] PPC: install mpc8544ds.dtb Alexander Graf
2011-06-02  6:33 ` [Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic Alexander Graf
2011-06-02  6:33 ` [Qemu-devel] [PATCH 5/5] PPC: fix mpc8544ds pci default devices Alexander Graf
2011-06-03 16:15 ` [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011 Aurelien Jarno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.