[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] Do endian swapping.
From: |
Uri Lublin |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] Do endian swapping. |
Date: |
Thu, 5 Jan 2017 12:26:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
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 <address@hidden>
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(-)