From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6P12-0005s6-6R for qemu-devel@nongnu.org; Wed, 31 Dec 2014 14:33:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6P0z-0000V7-1g for qemu-devel@nongnu.org; Wed, 31 Dec 2014 14:33:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6P0y-0000Uu-R7 for qemu-devel@nongnu.org; Wed, 31 Dec 2014 14:33:04 -0500 Message-ID: <54A44F6B.5090801@redhat.com> Date: Wed, 31 Dec 2014 20:32:59 +0100 From: Laszlo Ersek 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> <54A44D98.4070806@redhat.com> In-Reply-To: <54A44D98.4070806@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Paolo Bonzini Cc: Peter Maydell , Drew Jones , Gerd Hoffmann , Alexander Graf , qemu devel list On 12/31/14 20:25, Paolo Bonzini wrote: > > > 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. I disagree with the wording "give up". I owe you a great deal of gratitude for the technical advice and the time & attention you've spent helping me with this. I hope I can reciprocate sometime. Laszlo