From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXA2a-0003uP-M8 for qemu-devel@nongnu.org; Tue, 30 Apr 2013 08:52:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXA2Y-00022V-P5 for qemu-devel@nongnu.org; Tue, 30 Apr 2013 08:52:16 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39712 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXA2Y-000221-FA for qemu-devel@nongnu.org; Tue, 30 Apr 2013 08:52:14 -0400 Message-ID: <517FBE7D.5060905@suse.de> Date: Tue, 30 Apr 2013 14:52:13 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1366303444-24620-1-git-send-email-pbonzini@redhat.com> <1366303444-24620-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1366303444-24620-8-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/8] audio: look for the ISA and PCI buses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Christian Borntraeger , Anthony Liguori , av1474@comtv.ru, qemu-devel@nongnu.org, Dominik Dingel On 04/18/2013 06:44 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > 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=, target_type=0x0) at qom/object.c:190 #4 0x00000000800cfeae in object_class_dynamic_cast (class=0x80b617d0, typename=) at qom/object.c:474 #5 0x00000000800cff90 in object_dynamic_cast (obj=0x80b91d40, typename=) at qom/object.c:427 #6 0x00000000800d0aea in object_resolve_partial_path (parent=, parts=, typename=, ambiguous=0x0) at qom/object.c:1084 #7 0x00000000800d1fca in object_resolve_path_type (path=, 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=, argv=, envp=) 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