qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH] spapr-pci: change endianness for io ports space
Date: Fri, 12 Jul 2013 17:37:19 +1000	[thread overview]
Message-ID: <1373614639-15523-1-git-send-email-aik@ozlabs.ru> (raw)

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

             reply	other threads:[~2013-07-12  7:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12  7:37 Alexey Kardashevskiy [this message]
2013-07-12  8:59 ` [Qemu-devel] BUG report Re: [PATCH] spapr-pci: change endianness for io ports space 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

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=1373614639-15523-1-git-send-email-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).