Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 01:58:43PM +0100, Geert Uytterhoeven wrote: > On Mon, Nov 24, 2014 at 1:15 PM, Michael S. Tsirkin wrote: > > On Mon, Nov 24, 2014 at 01:03:24PM +0100, Geert Uytterhoeven wrote: > >> On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin > >> wrote: > >> > virtio 1.0 makes

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Geert Uytterhoeven
On Mon, Nov 24, 2014 at 1:15 PM, Michael S. Tsirkin wrote: > On Mon, Nov 24, 2014 at 01:03:24PM +0100, Geert Uytterhoeven wrote: >> On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin wrote: >> > virtio 1.0 makes all memory structures LE, so >> > we need APIs to conditionally do a byteswap on

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 01:03:24PM +0100, Geert Uytterhoeven wrote: > On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin wrote: > > virtio 1.0 makes all memory structures LE, so > > we need APIs to conditionally do a byteswap on BE > > architectures. > > > > To make it easier to check code

[PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Michael S. Tsirkin
virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code statically, add virtio specific types for multi-byte integers in memory. Add low level wrappers that do a byteswap conditionally, these will be useful

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Geert Uytterhoeven
On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin wrote: > virtio 1.0 makes all memory structures LE, so > we need APIs to conditionally do a byteswap on BE > architectures. > > To make it easier to check code statically, > add virtio specific types for multi-byte integers > in memory. > > Add

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Geert Uytterhoeven
On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin m...@redhat.com wrote: virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code statically, add virtio specific types for multi-byte integers in memory.

[PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Michael S. Tsirkin
virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code statically, add virtio specific types for multi-byte integers in memory. Add low level wrappers that do a byteswap conditionally, these will be useful

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 01:03:24PM +0100, Geert Uytterhoeven wrote: On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin m...@redhat.com wrote: virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Geert Uytterhoeven
On Mon, Nov 24, 2014 at 1:15 PM, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Nov 24, 2014 at 01:03:24PM +0100, Geert Uytterhoeven wrote: On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin m...@redhat.com wrote: virtio 1.0 makes all memory structures LE, so we need APIs to

Re: [PATCH v3 04/41] virtio: memory access APIs

2014-11-24 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 01:58:43PM +0100, Geert Uytterhoeven wrote: On Mon, Nov 24, 2014 at 1:15 PM, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Nov 24, 2014 at 01:03:24PM +0100, Geert Uytterhoeven wrote: On Mon, Nov 24, 2014 at 12:52 PM, Michael S. Tsirkin m...@redhat.com wrote: