All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
@ 2013-10-11 10:53 Mark Cave-Ayland
  2013-10-11 18:43 ` Hervé Poussineau
  2013-11-08  3:20 ` Alexander Graf
  0 siblings, 2 replies; 11+ messages in thread
From: Mark Cave-Ayland @ 2013-10-11 10:53 UTC (permalink / raw)
  To: qemu-ppc, qemu-devel
  Cc: Hervé Poussineau, Mark Cave-Ayland, Andreas Färber,
	Alexander Graf

OpenBIOS prior to SVN r1225 had a horrible bug when accessing PCI
configuration space for PPC Mac architectures - instead of writing the PCI
configuration data value to the data register address, it would instead write
it to the data register address plus the PCI configuration address.

For this reason, the MemoryRegions for the PCI data register for
grackle/uninorth were extremely large in order to accomodate the entire PCI
configuration space being accessed during OpenBIOS PCI bus enumeration. Now
that the OpenBIOS images have been updated, reduce the MemoryRegion sizes down
to a single 32-bit register as intended.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Hervé Poussineau <hpoussin@reactos.org>
CC: Andreas Färber <afaerber@suse.de>
CC: Alexander Graf <agraf@suse.de>
---
 hw/pci-host/grackle.c  |    4 ++--
 hw/pci-host/uninorth.c |   16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 4991ec4..d70c519 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -105,9 +105,9 @@ static int pci_grackle_init_device(SysBusDevice *dev)
     phb = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&phb->conf_mem, OBJECT(dev), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&phb->data_mem, OBJECT(dev), &pci_host_data_le_ops,
-                          dev, "pci-data-idx", 0x1000);
+                          dev, "pci-data-idx", 4);
     sysbus_init_mmio(dev, &phb->conf_mem);
     sysbus_init_mmio(dev, &phb->data_mem);
 
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 91530cd..ad92c35 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -153,9 +153,9 @@ static int pci_unin_main_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &unin_data_ops, dev,
-                          "pci-conf-data", 0x1000);
+                          "pci-conf-data", 4);
     sysbus_init_mmio(dev, &h->conf_mem);
     sysbus_init_mmio(dev, &h->data_mem);
 
@@ -171,9 +171,9 @@ static int pci_u3_agp_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &unin_data_ops, dev,
-                          "pci-conf-data", 0x1000);
+                          "pci-conf-data", 4);
     sysbus_init_mmio(dev, &h->conf_mem);
     sysbus_init_mmio(dev, &h->data_mem);
 
@@ -188,9 +188,9 @@ static int pci_unin_agp_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &pci_host_data_le_ops,
-                          dev, "pci-conf-data", 0x1000);
+                          dev, "pci-conf-data", 4);
     sysbus_init_mmio(dev, &h->conf_mem);
     sysbus_init_mmio(dev, &h->data_mem);
     return 0;
@@ -204,9 +204,9 @@ static int pci_unin_internal_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &pci_host_data_le_ops,
-                          dev, "pci-conf-data", 0x1000);
+                          dev, "pci-conf-data", 4);
     sysbus_init_mmio(dev, &h->conf_mem);
     sysbus_init_mmio(dev, &h->data_mem);
     return 0;
-- 
1.7.10.4

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-10-11 10:53 [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth Mark Cave-Ayland
@ 2013-10-11 18:43 ` Hervé Poussineau
  2013-11-08  3:20 ` Alexander Graf
  1 sibling, 0 replies; 11+ messages in thread
From: Hervé Poussineau @ 2013-10-11 18:43 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: Alexander Graf, qemu-ppc, qemu-devel, Andreas Färber

Mark Cave-Ayland a écrit :
> OpenBIOS prior to SVN r1225 had a horrible bug when accessing PCI
> configuration space for PPC Mac architectures - instead of writing the PCI
> configuration data value to the data register address, it would instead write
> it to the data register address plus the PCI configuration address.
> 
> For this reason, the MemoryRegions for the PCI data register for
> grackle/uninorth were extremely large in order to accomodate the entire PCI
> configuration space being accessed during OpenBIOS PCI bus enumeration. Now
> that the OpenBIOS images have been updated, reduce the MemoryRegion sizes down
> to a single 32-bit register as intended.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Hervé Poussineau <hpoussin@reactos.org>
> CC: Andreas Färber <afaerber@suse.de>
> CC: Alexander Graf <agraf@suse.de>

Tested-by: Hervé Poussineau <hpoussin@reactos.org>

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-10-11 10:53 [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth Mark Cave-Ayland
  2013-10-11 18:43 ` Hervé Poussineau
@ 2013-11-08  3:20 ` Alexander Graf
  2013-11-08 22:18   ` Mark Cave-Ayland
  1 sibling, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2013-11-08  3:20 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: Hervé Poussineau, qemu-ppc, QEMU Developers, Andreas Färber


On 11.10.2013, at 12:53, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:

> OpenBIOS prior to SVN r1225 had a horrible bug when accessing PCI
> configuration space for PPC Mac architectures - instead of writing the PCI
> configuration data value to the data register address, it would instead write
> it to the data register address plus the PCI configuration address.
> 
> For this reason, the MemoryRegions for the PCI data register for
> grackle/uninorth were extremely large in order to accomodate the entire PCI
> configuration space being accessed during OpenBIOS PCI bus enumeration. Now
> that the OpenBIOS images have been updated, reduce the MemoryRegion sizes down
> to a single 32-bit register as intended.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Hervé Poussineau <hpoussin@reactos.org>
> CC: Andreas Färber <afaerber@suse.de>
> CC: Alexander Graf <agraf@suse.de>

With this patch applied, mac99 emulation seems to break:

  http://award.ath.cx/results/288-alex/x86/kvm.qemu-git-tcg.ppc-debian.mac99-G4.etch.e1000.reboot/debug/serial-vm1.log


Alex

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-11-08  3:20 ` Alexander Graf
@ 2013-11-08 22:18   ` Mark Cave-Ayland
  2013-12-18 12:34     ` Alexander Graf
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Cave-Ayland @ 2013-11-08 22:18 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Hervé Poussineau, qemu-ppc, QEMU Developers, Andreas Färber

[-- Attachment #1: Type: text/plain, Size: 2473 bytes --]

On 08/11/13 03:20, Alexander Graf wrote:

> On 11.10.2013, at 12:53, Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>  wrote:
>
>> OpenBIOS prior to SVN r1225 had a horrible bug when accessing PCI
>> configuration space for PPC Mac architectures - instead of writing the PCI
>> configuration data value to the data register address, it would instead write
>> it to the data register address plus the PCI configuration address.
>>
>> For this reason, the MemoryRegions for the PCI data register for
>> grackle/uninorth were extremely large in order to accomodate the entire PCI
>> configuration space being accessed during OpenBIOS PCI bus enumeration. Now
>> that the OpenBIOS images have been updated, reduce the MemoryRegion sizes down
>> to a single 32-bit register as intended.
>>
>> Signed-off-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
>> CC: Hervé Poussineau<hpoussin@reactos.org>
>> CC: Andreas Färber<afaerber@suse.de>
>> CC: Alexander Graf<agraf@suse.de>
>
> With this patch applied, mac99 emulation seems to break:
>
>    http://award.ath.cx/results/288-alex/x86/kvm.qemu-git-tcg.ppc-debian.mac99-G4.etch.e1000.reboot/debug/serial-vm1.log
>
>
> Alex

Hi Alex,

Thanks for the heads-up - with the information above I was able to 
reproduce this fairly easily. I had look at some of the uninorth 
drivers, and while it's not particularly apparent from Linux that the 
PCI configuration data is accessed via MMIO rather than ioport access, 
FreeBSD seems to suggest that this is the case: 
http://code.google.com/p/freebsd-head/source/browse/sys/powerpc/powermac/uninorth.c?spec=svnc6989e24706228678e454517dad4ad465a36e556&r=c6989e24706228678e454517dad4ad465a36e556#274.

The key is that the QEMU uninorth host bridge contains a hack to allow 
PCI configuration mechanism #1 as used by OpenBIOS to work at all (see 
unin_get_config_reg() in hw/pci-host/uninorth.c) which is why I didn't 
notice it in my OpenBIOS boot tests; and in fact, the name of the 
uninorth PCI configuration data MemoryRegions have a "-data" rather than 
a "-idx" suffix is also a big clue.

Hence please find a revised version of the patch which is unaltered for 
grackle, and only changes the MemoryRegion size for the PCI 
configuration address register for uninorth so that the PCI 
configuration data space is still accessible using MMIO. This resolves 
the issue for me, so if you're satisifed that it works for you then I'll 
post a revised version to the list.


ATB,

Mark.

[-- Attachment #2: qemu-ppc-pci-fix.patch --]
[-- Type: text/x-diff, Size: 2727 bytes --]

diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 4991ec4..d70c519 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -105,9 +105,9 @@ static int pci_grackle_init_device(SysBusDevice *dev)
     phb = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&phb->conf_mem, OBJECT(dev), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&phb->data_mem, OBJECT(dev), &pci_host_data_le_ops,
-                          dev, "pci-data-idx", 0x1000);
+                          dev, "pci-data-idx", 4);
     sysbus_init_mmio(dev, &phb->conf_mem);
     sysbus_init_mmio(dev, &phb->data_mem);
 
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 91530cd..2238646 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -153,7 +153,7 @@ static int pci_unin_main_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &unin_data_ops, dev,
                           "pci-conf-data", 0x1000);
     sysbus_init_mmio(dev, &h->conf_mem);
@@ -171,7 +171,7 @@ static int pci_u3_agp_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &unin_data_ops, dev,
                           "pci-conf-data", 0x1000);
     sysbus_init_mmio(dev, &h->conf_mem);
@@ -188,7 +188,7 @@ static int pci_unin_agp_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &pci_host_data_le_ops,
                           dev, "pci-conf-data", 0x1000);
     sysbus_init_mmio(dev, &h->conf_mem);
@@ -204,7 +204,7 @@ static int pci_unin_internal_init_device(SysBusDevice *dev)
     h = PCI_HOST_BRIDGE(dev);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops,
-                          dev, "pci-conf-idx", 0x1000);
+                          dev, "pci-conf-idx", 4);
     memory_region_init_io(&h->data_mem, OBJECT(h), &pci_host_data_le_ops,
                           dev, "pci-conf-data", 0x1000);
     sysbus_init_mmio(dev, &h->conf_mem);

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-11-08 22:18   ` Mark Cave-Ayland
@ 2013-12-18 12:34     ` Alexander Graf
  2013-12-18 21:04       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2013-12-18 12:34 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: Hervé Poussineau, qemu-ppc, QEMU Developers, Andreas Färber


On 08.11.2013, at 23:18, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:

> On 08/11/13 03:20, Alexander Graf wrote:
> 
>> On 11.10.2013, at 12:53, Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>  wrote:
>> 
>>> OpenBIOS prior to SVN r1225 had a horrible bug when accessing PCI
>>> configuration space for PPC Mac architectures - instead of writing the PCI
>>> configuration data value to the data register address, it would instead write
>>> it to the data register address plus the PCI configuration address.
>>> 
>>> For this reason, the MemoryRegions for the PCI data register for
>>> grackle/uninorth were extremely large in order to accomodate the entire PCI
>>> configuration space being accessed during OpenBIOS PCI bus enumeration. Now
>>> that the OpenBIOS images have been updated, reduce the MemoryRegion sizes down
>>> to a single 32-bit register as intended.
>>> 
>>> Signed-off-by: Mark Cave-Ayland<mark.cave-ayland@ilande.co.uk>
>>> CC: Hervé Poussineau<hpoussin@reactos.org>
>>> CC: Andreas Färber<afaerber@suse.de>
>>> CC: Alexander Graf<agraf@suse.de>
>> 
>> With this patch applied, mac99 emulation seems to break:
>> 
>>   http://award.ath.cx/results/288-alex/x86/kvm.qemu-git-tcg.ppc-debian.mac99-G4.etch.e1000.reboot/debug/serial-vm1.log
>> 
>> 
>> Alex
> 
> Hi Alex,
> 
> Thanks for the heads-up - with the information above I was able to reproduce this fairly easily. I had look at some of the uninorth drivers, and while it's not particularly apparent from Linux that the PCI configuration data is accessed via MMIO rather than ioport access, FreeBSD seems to suggest that this is the case: http://code.google.com/p/freebsd-head/source/browse/sys/powerpc/powermac/uninorth.c?spec=svnc6989e24706228678e454517dad4ad465a36e556&r=c6989e24706228678e454517dad4ad465a36e556#274.
> 
> The key is that the QEMU uninorth host bridge contains a hack to allow PCI configuration mechanism #1 as used by OpenBIOS to work at all (see unin_get_config_reg() in hw/pci-host/uninorth.c) which is why I didn't notice it in my OpenBIOS boot tests; and in fact, the name of the uninorth PCI configuration data MemoryRegions have a "-data" rather than a "-idx" suffix is also a big clue.
> 
> Hence please find a revised version of the patch which is unaltered for grackle, and only changes the MemoryRegion size for the PCI configuration address register for uninorth so that the PCI configuration data space is still accessible using MMIO. This resolves the issue for me, so if you're satisifed that it works for you then I'll post a revised version to the list.

Hrm. Are you 100% sure this correct? This UniNorth is a real headache. The closest thing to a spec for it is the U4 spec which is generations ahead:

  http://www.datasheetarchive.com/dl/Datasheets-SW3/DSASW0048084.pdf

On that at page 109 you can see that you do indeed have a range of registers and a few fancy modes that can even be used to directly access config space registers without the usual index/data cycle.

Ben, do you have any more insight into how the original Uninorth worked?


Alex

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-12-18 12:34     ` Alexander Graf
@ 2013-12-18 21:04       ` Benjamin Herrenschmidt
  2013-12-18 21:24         ` Alexander Graf
  0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2013-12-18 21:04 UTC (permalink / raw)
  To: Alexander Graf
  Cc: qemu-ppc, Mark Cave-Ayland, QEMU Developers, Andreas Färber,
	Hervé Poussineau

On Wed, 2013-12-18 at 13:34 +0100, Alexander Graf wrote:
> Hrm. Are you 100% sure this correct? This UniNorth is a real headache.
> The closest thing to a spec for it is the U4 spec which is generations
> ahead:
> 
>   http://www.datasheetarchive.com/dl/Datasheets-SW3/DSASW0048084.pdf
> 
> On that at page 109 you can see that you do indeed have a range of
> registers and a few fancy modes that can even be used to directly
> access config space registers without the usual index/data cycle.
> 
> Ben, do you have any more insight into how the original Uninorth
> worked?

Just index/data. Look at Linux :-)

Cheers,
Ben.

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-12-18 21:04       ` Benjamin Herrenschmidt
@ 2013-12-18 21:24         ` Alexander Graf
  2013-12-18 22:04           ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2013-12-18 21:24 UTC (permalink / raw)
  To: Ben Herrenschmidt
  Cc: qemu-ppc, Mark Cave-Ayland, QEMU Developers, Andreas Färber,
	Hervé Poussineau


On 18.12.2013, at 22:04, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> On Wed, 2013-12-18 at 13:34 +0100, Alexander Graf wrote:
>> Hrm. Are you 100% sure this correct? This UniNorth is a real headache.
>> The closest thing to a spec for it is the U4 spec which is generations
>> ahead:
>> 
>>  http://www.datasheetarchive.com/dl/Datasheets-SW3/DSASW0048084.pdf
>> 
>> On that at page 109 you can see that you do indeed have a range of
>> registers and a few fancy modes that can even be used to directly
>> access config space registers without the usual index/data cycle.
>> 
>> Ben, do you have any more insight into how the original Uninorth
>> worked?
> 
> Just index/data. Look at Linux :-)

Then I don't understand why we break when we limit the data region to 4 bytes.


Alex

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-12-18 21:24         ` Alexander Graf
@ 2013-12-18 22:04           ` Benjamin Herrenschmidt
  2013-12-18 22:07             ` Alexander Graf
  0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2013-12-18 22:04 UTC (permalink / raw)
  To: Alexander Graf
  Cc: qemu-ppc, Mark Cave-Ayland, QEMU Developers, Andreas Färber,
	Hervé Poussineau

On Wed, 2013-12-18 at 22:24 +0100, Alexander Graf wrote:
> Then I don't understand why we break when we limit the data region to
> 4 bytes.

This is old uninorth, not U3 HT right ? The latter is memory mapped.

Ben.

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-12-18 22:04           ` Benjamin Herrenschmidt
@ 2013-12-18 22:07             ` Alexander Graf
  2013-12-18 22:10               ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
  2013-12-19  3:49               ` [Qemu-devel] " Benjamin Herrenschmidt
  0 siblings, 2 replies; 11+ messages in thread
From: Alexander Graf @ 2013-12-18 22:07 UTC (permalink / raw)
  To: Ben Herrenschmidt
  Cc: qemu-ppc, Mark Cave-Ayland, QEMU Developers, Andreas Färber,
	Hervé Poussineau


On 18.12.2013, at 23:04, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> On Wed, 2013-12-18 at 22:24 +0100, Alexander Graf wrote:
>> Then I don't understand why we break when we limit the data region to
>> 4 bytes.
> 
> This is old uninorth, not U3 HT right ? The latter is memory mapped.

Depends, we use the same code to cover both. With 32bit guests we expose an old UniNorth. With 64bit guests we have to expose a U3 as the guest doesn't know what old UniNorth is anymore.

So yeah, maybe that's biting us.


Alex

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

* Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-12-18 22:07             ` Alexander Graf
@ 2013-12-18 22:10               ` Alexander Graf
  2013-12-19  3:49               ` [Qemu-devel] " Benjamin Herrenschmidt
  1 sibling, 0 replies; 11+ messages in thread
From: Alexander Graf @ 2013-12-18 22:10 UTC (permalink / raw)
  To: Ben Herrenschmidt
  Cc: Hervé Poussineau, qemu-ppc, QEMU Developers, Andreas Färber


On 18.12.2013, at 23:07, Alexander Graf <agraf@suse.de> wrote:

> 
> On 18.12.2013, at 23:04, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> 
>> On Wed, 2013-12-18 at 22:24 +0100, Alexander Graf wrote:
>>> Then I don't understand why we break when we limit the data region to
>>> 4 bytes.
>> 
>> This is old uninorth, not U3 HT right ? The latter is memory mapped.
> 
> Depends, we use the same code to cover both. With 32bit guests we expose an old UniNorth. With 64bit guests we have to expose a U3 as the guest doesn't know what old UniNorth is anymore.
> 
> So yeah, maybe that's biting us.

But then again the breaking case was with a G4 which was 32bit so it should have emulated an old UniNorth. Hrm.


Alex

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

* Re: [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth
  2013-12-18 22:07             ` Alexander Graf
  2013-12-18 22:10               ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
@ 2013-12-19  3:49               ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2013-12-19  3:49 UTC (permalink / raw)
  To: Alexander Graf
  Cc: qemu-ppc, Mark Cave-Ayland, QEMU Developers, Andreas Färber,
	Hervé Poussineau

On Wed, 2013-12-18 at 23:07 +0100, Alexander Graf wrote:
> On 18.12.2013, at 23:04, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> 
> > On Wed, 2013-12-18 at 22:24 +0100, Alexander Graf wrote:
> >> Then I don't understand why we break when we limit the data region to
> >> 4 bytes.
> > 
> > This is old uninorth, not U3 HT right ? The latter is memory mapped.
> 
> Depends, we use the same code to cover both. With 32bit guests we expose an old UniNorth.
> With 64bit guests we have to expose a U3 as the guest doesn't know what old UniNorth is anymore.
> 
> So yeah, maybe that's biting us.

Well, it's different.

Old uninorth uses some form of indirect address/data registers, as does
U3 AGP... but U3 HT uses memory mapped. So U3 has a bit of both :)

I think U4 PCIe is yet another beast as well.

Cheers,
Ben.

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

end of thread, other threads:[~2013-12-19  3:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-11 10:53 [Qemu-devel] [PATCH] PPC: fix PCI configuration space MemoryRegions for grackle/uninorth Mark Cave-Ayland
2013-10-11 18:43 ` Hervé Poussineau
2013-11-08  3:20 ` Alexander Graf
2013-11-08 22:18   ` Mark Cave-Ayland
2013-12-18 12:34     ` Alexander Graf
2013-12-18 21:04       ` Benjamin Herrenschmidt
2013-12-18 21:24         ` Alexander Graf
2013-12-18 22:04           ` Benjamin Herrenschmidt
2013-12-18 22:07             ` Alexander Graf
2013-12-18 22:10               ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2013-12-19  3:49               ` [Qemu-devel] " Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.