From patchwork Sun Mar 4 13:33:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 144511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 70FDCB6FA2 for ; Mon, 5 Mar 2012 00:34:17 +1100 (EST) Received: from localhost ([::1]:59798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BZk-000729-LE for incoming@patchwork.ozlabs.org; Sun, 04 Mar 2012 08:34:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BZe-000724-4g for qemu-devel@nongnu.org; Sun, 04 Mar 2012 08:34:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4BZc-00082N-96 for qemu-devel@nongnu.org; Sun, 04 Mar 2012 08:34:05 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:48314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4BZc-0007zM-1d for qemu-devel@nongnu.org; Sun, 04 Mar 2012 08:34:04 -0500 Received: by iafj26 with SMTP id j26so4732381iaf.4 for ; Sun, 04 Mar 2012 05:34:02 -0800 (PST) Received-SPF: pass (google.com: domain of blauwirbel@gmail.com designates 10.50.160.196 as permitted sender) client-ip=10.50.160.196; Authentication-Results: mr.google.com; spf=pass (google.com: domain of blauwirbel@gmail.com designates 10.50.160.196 as permitted sender) smtp.mail=blauwirbel@gmail.com; dkim=pass header.i=blauwirbel@gmail.com Received: from mr.google.com ([10.50.160.196]) by 10.50.160.196 with SMTP id xm4mr4030252igb.24.1330868042217 (num_hops = 1); Sun, 04 Mar 2012 05:34:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Q6oJwK7EepjzZJq0Na48n+CKmHB5kN7TD7P91P7+hl0=; b=t833m7ZZxcZH2ncVjl3jie9KrFX/dmcDrYkVNxrVAlIQvkFbv0HVkMRQ3EzXlQpmJa ajZLGp03RwNWmCQupK6vycs1az0MHRfxGmx/K5VHCEVaLna79NK+6Yx+NVUtcP3asT1g s5e/PTRnMOEYwp4Zc2j3CeLckaOdzQ6As8+0Ms4c2aGvYboHIvnDqTx8FdLMoU5m+ZyC Q5YHduVHkY1cvaJELU/ycwTd0L13Dx5L8DzQ96l+9qLQJjTC0sG7kLfY/0rfnIyiV0M6 z9CPKZgy377W2yzce6od6kx3ws9iuX7RAGn4FT/jDOzBrsTvPpW+KfrNBaL1wz/ckax8 0ziA== Received: by 10.50.160.196 with SMTP id xm4mr3320561igb.24.1330868042152; Sun, 04 Mar 2012 05:34:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.22.40 with HTTP; Sun, 4 Mar 2012 05:33:42 -0800 (PST) In-Reply-To: <20120304132225.GB12047@redhat.com> References: <20120304094614.GA8158@redhat.com> <4F535FD4.2000905@redhat.com> <4F5362FD.5060305@redhat.com> <20120304132225.GB12047@redhat.com> From: Blue Swirl Date: Sun, 4 Mar 2012 13:33:42 +0000 Message-ID: To: "Michael S. Tsirkin" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.173 Cc: Mark Cave-Ayland , Avi Kivity , Anthony Liguori , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] pci: fix bridge IO/BASE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Sun, Mar 4, 2012 at 13:22, Michael S. Tsirkin wrote: > On Sun, Mar 04, 2012 at 02:41:33PM +0200, Avi Kivity wrote: >> On 03/04/2012 02:38 PM, Blue Swirl wrote: >> > >> >> > >> This unassigned memory exception is triggered because CMD646 IDE I/O >> > >> registers are not accessible: >> > >> >> > >> (qemu) info pci >> > >>   Bus  0, device   5, function 0: >> > >>     IDE controller: PCI device 1095:0646 >> > >>       IRQ 1. >> > >>       BAR0: I/O at 0xffffffffffffffff [0x0006]. >> > >>       BAR1: I/O at 0xffffffffffffffff [0x0002]. >> > >>       BAR2: I/O at 0xffffffffffffffff [0x0006]. >> > >>       BAR3: I/O at 0xffffffffffffffff [0x0002]. >> > >>       BAR4: I/O at 0xffffffffffffffff [0x000e]. >> > >>       id "" >> > > >> > > The BARs are not initialized, so they aren't accessible. >> > > >> > > But perhaps the dump was not taken at the point of failure, can you >> > > provide a relevant dump if so? >> > >> > No, this is after failure. >> >> I don't see why the guest expects the BARs to work then. > > I don't belive it does - it probably got hang before > initializing BARs. This is later, the crash happens when IDE driver is accessing CMD646 registers after the PCI device is configured. I changed OpenBIOS to disable any bridges with no devices, but that didn't help. It looks like this is not related to bridges, I disabled the secondary bridges with this patch and still there is the crash. > >> -- >> error compiling committee.c: too many arguments to function diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 1d25da8..ed9dc68 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -256,11 +256,13 @@ static const MemoryRegionOps pci_ioport_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; +#if 0 /* The APB host has an IRQ line for each IRQ line of each slot. */ static int pci_apb_map_irq(PCIDevice *pci_dev, int irq_num) { return ((pci_dev->devfn & 0x18) >> 1) + irq_num; } +#endif static int pci_pbm_map_irq(PCIDevice *pci_dev, int irq_num) { @@ -322,8 +324,10 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base, SysBusDevice *s; APBState *d; unsigned int i; +#if 0 PCIDevice *pci_dev; PCIBridge *br; +#endif /* Ultrasparc PBM main bus */ dev = qdev_create(NULL, "pbm"); @@ -352,6 +356,7 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base, pci_create_simple(d->bus, 0, "pbm-pci"); +#if 0 /* APB secondary busses */ pci_dev = pci_create_multifunction(d->bus, PCI_DEVFN(1, 0), true, "pbm-bridge"); @@ -368,7 +373,7 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base, pci_apb_map_irq); qdev_init_nofail(&pci_dev->qdev); *bus3 = pci_bridge_get_sec_bus(br); - +#endif return d->bus; }