From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Lpi-0000WY-Un for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:37:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Lpi-0003PB-4x for qemu-devel@nongnu.org; Mon, 30 Nov 2015 05:37:22 -0500 References: <1448388091-117282-1-git-send-email-pbonzini@redhat.com> <1448388091-117282-6-git-send-email-pbonzini@redhat.com> <20151130094721.GB5038@ad.usersys.redhat.com> From: Paolo Bonzini Message-ID: <565C26D8.3020107@redhat.com> Date: Mon, 30 Nov 2015 11:37:12 +0100 MIME-Version: 1.0 In-Reply-To: <20151130094721.GB5038@ad.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/40] virtio: read/write the VirtQueueElement a field at a time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org On 30/11/2015 10:47, Fam Zheng wrote: >> > + swap = (elem->out_num & 0xFFFF0000) || (elem->in_num & 0xFFFF0000); > This is interesting, out_num and in_num are 32 bit numbers but there max values > are both VIRTQUEUE_MAX_SIZE (thanks for explaining this on IRC), so it can be a > clue for the source using a different endianness. Yes, good idea. Paolo