From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXvV-0002qY-0E for qemu-devel@nongnu.org; Fri, 12 Jul 2013 03:38:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxXvU-0001Sq-03 for qemu-devel@nongnu.org; Fri, 12 Jul 2013 03:38:00 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:45878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXvT-0001SX-Pa for qemu-devel@nongnu.org; Fri, 12 Jul 2013 03:37:59 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf11so8764675pab.10 for ; Fri, 12 Jul 2013 00:37:59 -0700 (PDT) From: Alexey Kardashevskiy Date: Fri, 12 Jul 2013 17:37:19 +1000 Message-Id: <1373614639-15523-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] spapr-pci: change endianness for io ports space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, 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 --- 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