From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSqc-0004AH-GQ for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:57:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsSqX-0001VQ-Gh for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:57:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSqX-0001Uz-AO for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:57:45 -0400 References: <1475835267-7300-1-git-send-email-lvivier@redhat.com> <20161007124849.7c867d79@bahia> From: Laurent Vivier Message-ID: Date: Fri, 7 Oct 2016 12:57:41 +0200 MIME-Version: 1.0 In-Reply-To: <20161007124849.7c867d79@bahia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, David Gibson , Peter Maydell On 07/10/2016 12:48, Greg Kurz wrote: > On Fri, 7 Oct 2016 12:14:27 +0200 > Laurent Vivier wrote: > >> The target endianness is not deduced anymore from >> the architecture name but asked directly to the guest, >> using a new qtest command: "endianness". As it can't >> change (this is the value of TARGET_WORDS_BIGENDIAN), >> we store it to not have to ask every time we want to >> know if we have to byte-swap a value. >> >> Signed-off-by: Laurent Vivier >> CC: Greg Kurz >> CC: David Gibson >> CC: Peter Maydell >> --- >> v2: >> - move the "endianness" command to a function and >> don't move the qtest_init()/qtest_quit() functions >> > > Not speaking about the current discussion on TARGET_WORDS_BIGENDIAN, > I guess a consensus could be that this only makes sense when testing > legacy virtio. People should not be tempted to use this anywhere else > actually. I can rename target_big_endian() into qvirtio_is_big_endian() on the test side (and put it in libqos/virtio.h). I'd like to keep the qtest_big_endian() as it returns TARGET_WORDS_BIGENDIAN, and qvirtio_is_big_endian() will depend also on virtio-1.0 or not. Laurent