Received: from eggs.gnu.org ([2001:4830:134:3::10]:55877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cP5GE-0008P8-HO for qemu-devel@nongnu.org; Thu, 05 Jan 2017 05:27:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cP5GA-0000UE-I7 for qemu-devel@nongnu.org; Thu, 05 Jan 2017 05:27:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39358) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cP5GA-0000U6-Cz for qemu-devel@nongnu.org; Thu, 05 Jan 2017 05:27:02 -0500 Reply-To: uril@redhat.com References: <20161213173354.jffasav66gdl7v4q@wingsuit> From: Uri Lublin Message-ID: Date: Thu, 5 Jan 2017 12:26:59 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] Do endian swapping. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Suchanek Cc: qemu-devel@nongnu.org On 01/03/2017 08:16 PM, Michal Suchanek wrote: > This allows running big endian and little endian guest side by side using > cut & paste between them. > > There is a general design idea that swapping should come as close to > virtio_read/virtio_write as possible. In particular, the protocol > between vdagent and vdagentd is guest-specific and in native endian. > With muliple layers of headers this is a bit tricky. A few message types > have to be swapped fully before passing through vdagentd. > > Signed-off-by: Michal Suchanek Hi Michal, Please send these patches to spice-devel mailing list. Thanks, Uri. > > --- > v2: > - introduce helper functions to swap (a portion of) a message wholesale > - pollute fewer places with swapping sometimes at the cost of slightly > more verbose code > --- > src/vdagentd/vdagentd.c | 99 +++++++++++++++++++++++++++++++++++++--------- > src/vdagentd/virtio-port.c | 35 ++++++++++------ > 2 files changed, 102 insertions(+), 32 deletions(-) >