All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr-pci: change endianness for io ports space
@ 2013-07-12  7:37 Alexey Kardashevskiy
  2013-07-12  8:59 ` [Qemu-devel] BUG report " Alexey Kardashevskiy
  2013-07-13  8:03 ` [Qemu-devel] " David Gibson
  0 siblings, 2 replies; 11+ messages in thread
From: Alexey Kardashevskiy @ 2013-07-12  7:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf, David Gibson

sPAPR PHB emulates IO ports on PCI via a special memory region which
routes all reads/writes further via cpu_in*/cpu_out* which are eventually
processed by MemoryRegionOps implemented by devices.

As devices normally take care of endianness themselves by setting
correct MemoryRegionOps::endianness for their memory regions, it is
better to set endianness in spapr_io_ops to NATIVE.

Tested on sPAPR KVM with e1000, rtl8139, virtio-net.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

I would really appreciate if someone told me what exactly changed
in QEMU and broke spapr-pci. It used to work... Thanks!

---
 hw/ppc/spapr_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index ca588aa..dfe4d04 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -472,7 +472,7 @@ static void spapr_io_write(void *opaque, hwaddr addr,
 }
 
 static const MemoryRegionOps spapr_io_ops = {
-    .endianness = DEVICE_LITTLE_ENDIAN,
+    .endianness = DEVICE_NATIVE_ENDIAN,
     .read = spapr_io_read,
     .write = spapr_io_write
 };
-- 
1.8.3.2

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

end of thread, other threads:[~2013-07-16  2:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12  7:37 [Qemu-devel] [PATCH] spapr-pci: change endianness for io ports space Alexey Kardashevskiy
2013-07-12  8:59 ` [Qemu-devel] BUG report " Alexey Kardashevskiy
2013-07-12 11:25   ` Alexander Graf
2013-07-13  8:03 ` [Qemu-devel] " David Gibson
2013-07-14 13:22   ` Alexey Kardashevskiy
2013-07-15 15:02     ` Anthony Liguori
2013-07-15 23:06       ` Alexey Kardashevskiy
2013-07-16  0:28         ` Anthony Liguori
2013-07-16  0:39           ` Alexey Kardashevskiy
2013-07-16  2:05             ` Anthony Liguori
2013-07-16  2:17               ` Alexey Kardashevskiy

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.