On 04/18/2013 06:44 PM, Paolo Bonzini wrote:
Signed-off-by: Paolo Bonzini<pbonz...@redhat.com>
---
arch_init.c | 16 +++++++++++-----
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
hw/mips/mips_jazz.c | 2 +-
hw/mips/mips_malta.c | 2 +-
hw/ppc/prep.c | 2 +-
include/sysemu/arch_init.h | 2 +-
7 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 88b74c0..cbcb3ed 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -992,20 +992,26 @@ void select_soundhw(const char *optarg)
}
}
-void audio_init(ISABus *isa_bus, PCIBus *pci_bus)
+void audio_init(void)
{
struct soundhw *c;
+ ISABus *isa_bus = (ISABus *) object_resolve_path_type("", TYPE_ISA_BUS,
NULL);
+ PCIBus *pci_bus = (PCIBus *) object_resolve_path_type("", TYPE_PCI_BUS,
NULL);
We don't have PCI or ISA on s390. So with this patch applied,
qemu-system-s390x breaks on init.
qemu-system-s390x: qom/object.c:190: type_is_ancestor: Assertion
`target_type' failed.
Program received signal SIGABRT, Aborted.
0x000003fffd94287e in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x000003fffd94287e in raise () from /lib64/libc.so.6
#1 0x000003fffd943ec8 in abort () from /lib64/libc.so.6
#2 0x000003fffd939aa0 in __assert_fail () from /lib64/libc.so.6
#3 0x00000000800cfdb2 in type_is_ancestor (type=<optimized out>,
target_type=0x0) at qom/object.c:190
#4 0x00000000800cfeae in object_class_dynamic_cast (class=0x80b617d0,
typename=<optimized out>) at qom/object.c:474
#5 0x00000000800cff90 in object_dynamic_cast (obj=0x80b91d40,
typename=<optimized out>) at qom/object.c:427
#6 0x00000000800d0aea in object_resolve_partial_path (parent=<optimized
out>, parts=<optimized out>,
typename=<optimized out>, ambiguous=0x0) at qom/object.c:1084
#7 0x00000000800d1fca in object_resolve_path_type (path=<optimized
out>, typename=0x801fa1a8 "PCI", ambiguous=0x0)
at qom/object.c:1126
#8 0x0000000080110b28 in audio_init () at
/temporaer/agraf/qemu/arch_init.c:994
#9 0x000000008010a6e0 in main (argc=<optimized out>, argv=<optimized
out>, envp=<optimized out>) at vl.c:4297
(gdb) l /temporaer/agraf/qemu/arch_init.c:994
989
990 void audio_init(void)
991 {
992 struct soundhw *c;
993 ISABus *isa_bus = (ISABus *) object_resolve_path_type("",
TYPE_ISA_BUS, NULL);
994 PCIBus *pci_bus = (PCIBus *) object_resolve_path_type("",
TYPE_PCI_BUS, NULL);
995
996 for (c = soundhw; c->name; ++c) {
997 if (c->enabled) {
998 if (c->isa) {
Alex