qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Avi Kivity <avi@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pci: fix bridge IO/BASE
Date: Sun, 4 Mar 2012 16:08:54 +0200	[thread overview]
Message-ID: <20120304140853.GA12776@redhat.com> (raw)
In-Reply-To: <CAAu8pHuP5hwZ_g4dc9wvdGvpswUEwLaqmKMyqquEJR3EhLRsQQ@mail.gmail.com>

On Sun, Mar 04, 2012 at 01:33:42PM +0000, Blue Swirl wrote:
> On Sun, Mar 4, 2012 at 13:22, Michael S. Tsirkin <mst@redhat.com> 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.

It seems to have to do with the host bridge.
It's unusual to have host bridge present itself
as a pci to pci bridge but there it is.

> 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;
>  }
> 
> >
> >> --
> >> error compiling committee.c: too many arguments to function

  reply	other threads:[~2012-03-04 14:09 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04  9:46 [Qemu-devel] [PATCH] pci: fix bridge IO/BASE Michael S. Tsirkin
2012-03-04 10:27 ` Blue Swirl
2012-03-04 12:21   ` Michael S. Tsirkin
2012-03-04 12:37     ` Blue Swirl
2012-03-04 13:28       ` Michael S. Tsirkin
2012-03-04 13:38         ` Blue Swirl
2012-03-04 14:23           ` Michael S. Tsirkin
2012-03-04 14:35             ` Blue Swirl
2012-03-04 15:22               ` Michael S. Tsirkin
2012-03-04 17:07                 ` Blue Swirl
2012-03-04 17:35                   ` Michael S. Tsirkin
2012-03-04 19:51                     ` Blue Swirl
2012-03-04 20:02                       ` Michael S. Tsirkin
2012-03-04 20:32                         ` Blue Swirl
2012-03-04 21:28                           ` Michael S. Tsirkin
2012-03-04 21:54                             ` Blue Swirl
2012-03-04 22:29                               ` Michael S. Tsirkin
2012-03-05 18:34                                 ` Blue Swirl
2012-03-06 13:42                                   ` Michael S. Tsirkin
2012-03-04 21:56                       ` Mark Cave-Ayland
2012-03-04 15:41               ` Michael S. Tsirkin
2012-03-04 13:38       ` Michael S. Tsirkin
2012-03-04 12:28   ` Avi Kivity
2012-03-04 12:38     ` Blue Swirl
2012-03-04 12:41       ` Avi Kivity
2012-03-04 12:46         ` Blue Swirl
2012-03-04 13:21           ` Michael S. Tsirkin
2012-03-04 13:22         ` Michael S. Tsirkin
2012-03-04 13:33           ` Blue Swirl
2012-03-04 14:08             ` Michael S. Tsirkin [this message]
2012-03-04 14:26               ` Blue Swirl
2012-03-04 16:42                 ` Michael S. Tsirkin
2012-03-04 17:49                   ` Blue Swirl
2012-03-04 18:11                     ` Mark Cave-Ayland
2012-03-04 19:27                       ` Michael S. Tsirkin
2012-03-04 19:43                       ` Michael S. Tsirkin
2012-03-04 19:27                     ` Michael S. Tsirkin
2012-03-04 12:33   ` Michael S. Tsirkin
2012-03-04 12:35     ` Avi Kivity
2012-03-04 12:35     ` Michael S. Tsirkin
2012-03-04 12:42     ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120304140853.GA12776@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).