From patchwork Wed Dec 12 14:12:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 205544 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 331432C0086 for ; Thu, 13 Dec 2012 01:31:29 +1100 (EST) Received: from localhost ([::1]:37721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tin4V-000277-Em for incoming@patchwork.ozlabs.org; Wed, 12 Dec 2012 09:14:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tin38-0008ET-7F for qemu-devel@nongnu.org; Wed, 12 Dec 2012 09:12:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tin2y-000212-0L for qemu-devel@nongnu.org; Wed, 12 Dec 2012 09:12:38 -0500 Received: from cantor2.suse.de ([195.135.220.15]:37598 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tin2x-00020i-Qe; Wed, 12 Dec 2012 09:12:27 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5DE58A50E4; Wed, 12 Dec 2012 15:12:27 +0100 (CET) From: Alexander Graf To: "qemu-ppc@nongnu.org List" Date: Wed, 12 Dec 2012 15:12:19 +0100 Message-Id: <1355321539-23685-20-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1355321539-23685-1-git-send-email-agraf@suse.de> References: <1355321539-23685-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: qemu-devel qemu-devel Subject: [Qemu-devel] [PATCH 19/19] MSI-X: Fix endianness X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The MSI-X vector tables are usually stored in little endian in memory, so let's mark the accessors as such. This fixes MSI-X on e500 for me. Signed-off-by: Alexander Graf Acked-by: Michael S. Tsirkin --- hw/msix.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 136ef09..b57ae60 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -180,8 +180,7 @@ static void msix_table_mmio_write(void *opaque, hwaddr addr, static const MemoryRegionOps msix_table_mmio_ops = { .read = msix_table_mmio_read, .write = msix_table_mmio_write, - /* TODO: MSIX should be LITTLE_ENDIAN. */ - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, .valid = { .min_access_size = 4, .max_access_size = 4, @@ -198,8 +197,7 @@ static uint64_t msix_pba_mmio_read(void *opaque, hwaddr addr, static const MemoryRegionOps msix_pba_mmio_ops = { .read = msix_pba_mmio_read, - /* TODO: MSIX should be LITTLE_ENDIAN. */ - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, .valid = { .min_access_size = 4, .max_access_size = 4,