From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6OtU-000341-Dn for qemu-devel@nongnu.org; Wed, 31 Dec 2014 14:25:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6OtR-0005c0-9T for qemu-devel@nongnu.org; Wed, 31 Dec 2014 14:25:20 -0500 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:56995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6OtR-0005bh-35 for qemu-devel@nongnu.org; Wed, 31 Dec 2014 14:25:17 -0500 Received: by mail-wg0-f43.google.com with SMTP id k14so4643361wgh.2 for ; Wed, 31 Dec 2014 11:25:16 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54A44D98.4070806@redhat.com> Date: Wed, 31 Dec 2014 20:25:12 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1420024880-15416-1-git-send-email-lersek@redhat.com> <54A3F829.4000509@redhat.com> <54A4032A.7050808@redhat.com> <54A42304.7030909@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alexander Graf , Drew Jones , Laszlo Ersek , Gerd Hoffmann , qemu devel list On 31/12/2014 18:29, Peter Maydell wrote: > On 31 December 2014 at 16:23, Paolo Bonzini wrote: >> $ arm-softmmu/qemu-system-arm -M virt -machine accel=qtest \ >> -qtest stdio -uuid 4600cb32-38ec-4b2f-8acb-81c6ea54f2d8 >> writew 0x9020008 0x0200 >> readl 0x9020000 >> >> The readl should return "OK 0x000000004600cb32". > > On BE ppc64 host I get: > OK 0x0000000032cb0046 > with or without Laszlo's patch. > > On LE x86-64 host I get > OK 0x000000004600cb32 > without the patch, and > OK 0x0000000032cb0046 > with it. > > So I think that the patch is good (in that it removes a host-endian > dependency which we should not have) and your intuition for the > correct result is possibly not so good :-) Indeed. I give up until at least the end of the holiday break. Paolo