qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Sparc64 breakage by 16eaedf2668e9b347a59d73346fcc4c764c58348
@ 2009-07-10 19:10 Blue Swirl
  2009-07-10 19:36 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2009-07-10 19:10 UTC (permalink / raw)
  To: Paul Brook, qemu-devel

Hi,

APB is not converted to qdev yet, so pci_register_secondary_bus
shouldn't use FROM_QBUS. Sparc64 is currently broken.

Partially reverting 16eaed... fixes the breakage:
diff --git a/hw/pci.c b/hw/pci.c
index 71d9227..f592925 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -135,7 +135,7 @@ static PCIBus
*pci_register_secondary_bus(PCIDevice *dev, pci_map_irq_fn map_irq
 {
     PCIBus *bus;

-    bus = FROM_QBUS(PCIBus, qbus_create(&pci_bus_info, &dev->qdev, NULL));
+    bus = qemu_mallocz(sizeof(PCIBus));
     bus->map_irq = map_irq;
     bus->parent_dev = dev;
     bus->next = dev->bus->next;

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

* Re: [Qemu-devel] Sparc64 breakage by 16eaedf2668e9b347a59d73346fcc4c764c58348
  2009-07-10 19:10 [Qemu-devel] Sparc64 breakage by 16eaedf2668e9b347a59d73346fcc4c764c58348 Blue Swirl
@ 2009-07-10 19:36 ` Anthony Liguori
  2009-07-10 19:47   ` Gerd Hoffmann
  2009-07-10 19:48   ` Blue Swirl
  0 siblings, 2 replies; 4+ messages in thread
From: Anthony Liguori @ 2009-07-10 19:36 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Gerd Hoffmann, Paul Brook, qemu-devel

Blue Swirl wrote:
> Hi,
>
> APB is not converted to qdev yet, so pci_register_secondary_bus
> shouldn't use FROM_QBUS. Sparc64 is currently broken.
>
> Partially reverting 16eaed... fixes the breakage:
> diff --git a/hw/pci.c b/hw/pci.c
> index 71d9227..f592925 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -135,7 +135,7 @@ static PCIBus
> *pci_register_secondary_bus(PCIDevice *dev, pci_map_irq_fn map_irq
>  {
>      PCIBus *bus;
>
> -    bus = FROM_QBUS(PCIBus, qbus_create(&pci_bus_info, &dev->qdev, NULL));
> +    bus = qemu_mallocz(sizeof(PCIBus));
>      bus->map_irq = map_irq;
>      bus->parent_dev = dev;
>      bus->next = dev->bus->next;
>   

Gerd, could you take a look?

Blue, you mentioned that you have an openbios-sparc64 image for 
testing?  Would that have uncovered this and if so, do you have a link 
handy?

Regards,

Anthony Liguori

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

* Re: [Qemu-devel] Sparc64 breakage by 16eaedf2668e9b347a59d73346fcc4c764c58348
  2009-07-10 19:36 ` Anthony Liguori
@ 2009-07-10 19:47   ` Gerd Hoffmann
  2009-07-10 19:48   ` Blue Swirl
  1 sibling, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2009-07-10 19:47 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Blue Swirl, Paul Brook, qemu-devel

On 07/10/09 21:36, Anthony Liguori wrote:
> Blue Swirl wrote:
>> Hi,
>>
>> APB is not converted to qdev yet, so pci_register_secondary_bus
>> shouldn't use FROM_QBUS. Sparc64 is currently broken.

>> Partially reverting 16eaed... fixes the breakage:
>> --- a/hw/pci.c
>> +++ b/hw/pci.c
>> - bus = FROM_QBUS(PCIBus, qbus_create(&pci_bus_info, &dev->qdev, NULL));
>> + bus = qemu_mallocz(sizeof(PCIBus));

> Gerd, could you take a look?

As sparc64 is the only user of pci_register_secondary_bus() the partial 
reverse is fine IMHO.  Just let us defer this until APB is qdev-ified.

cheers,
   Gerd

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

* Re: [Qemu-devel] Sparc64 breakage by 16eaedf2668e9b347a59d73346fcc4c764c58348
  2009-07-10 19:36 ` Anthony Liguori
  2009-07-10 19:47   ` Gerd Hoffmann
@ 2009-07-10 19:48   ` Blue Swirl
  1 sibling, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2009-07-10 19:48 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Gerd Hoffmann, Paul Brook, qemu-devel

On 7/10/09, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Blue Swirl wrote:
>
> > Hi,
> >
> > APB is not converted to qdev yet, so pci_register_secondary_bus
> > shouldn't use FROM_QBUS. Sparc64 is currently broken.
> >
> > Partially reverting 16eaed... fixes the breakage:
> > diff --git a/hw/pci.c b/hw/pci.c
> > index 71d9227..f592925 100644
> > --- a/hw/pci.c
> > +++ b/hw/pci.c
> > @@ -135,7 +135,7 @@ static PCIBus
> > *pci_register_secondary_bus(PCIDevice *dev,
> pci_map_irq_fn map_irq
> >  {
> >     PCIBus *bus;
> >
> > -    bus = FROM_QBUS(PCIBus, qbus_create(&pci_bus_info, &dev->qdev,
> NULL));
> > +    bus = qemu_mallocz(sizeof(PCIBus));
> >     bus->map_irq = map_irq;
> >     bus->parent_dev = dev;
> >     bus->next = dev->bus->next;
> >
> >
>
>  Gerd, could you take a look?
>
>  Blue, you mentioned that you have an openbios-sparc64 image for testing?
> Would that have uncovered this and if so, do you have a link handy?

We deliver the latest (r505) OpenBIOS image at pc-bios/openbios-sparc64.

To test this bug, the following is enough:
./obj-amd64/sparc64-softmmu/qemu-system-sparc64 -L ./pc-bios/
Segmentation fault

With my patch applied, you get the OpenBIOS Forth prompt.

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

end of thread, other threads:[~2009-07-10 19:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 19:10 [Qemu-devel] Sparc64 breakage by 16eaedf2668e9b347a59d73346fcc4c764c58348 Blue Swirl
2009-07-10 19:36 ` Anthony Liguori
2009-07-10 19:47   ` Gerd Hoffmann
2009-07-10 19:48   ` Blue Swirl

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).