Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-31 Thread Alexander Graf
On 03/28/2014 11:57 AM, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ use per-device needs_byteswap

[Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ use per-device needs_byteswap flag, fix missing tswap32 in

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Andreas Färber
Am 28.03.2014 18:13, schrieb Greg Kurz: On Fri, 28 Mar 2014 11:57:56 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, evt = req-resp.event; memset(evt, 0, sizeof(VirtIOSCSIEvent)); -

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 11:57:56 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 18:21:43 +0100 Andreas Färber afaer...@suse.de wrote: Am 28.03.2014 18:13, schrieb Greg Kurz: On Fri, 28 Mar 2014 11:57:56 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Peter Maydell
On 28 March 2014 17:37, Greg Kurz gk...@linux.vnet.ibm.com wrote: And while we are at it, since we pass address_space_memory to all occurences of virtio_*_phys() and I don't see why we would change that, maybe we can also move that into the helpers. Thoughts ? In the longer term I'm hoping

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 17:43:07 + Peter Maydell peter.mayd...@linaro.org wrote: On 28 March 2014 17:37, Greg Kurz gk...@linux.vnet.ibm.com wrote: And while we are at it, since we pass address_space_memory to all occurences of virtio_*_phys() and I don't see why we would change that, maybe

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Peter Maydell
On 28 March 2014 18:04, Greg Kurz gk...@linux.vnet.ibm.com wrote: Ok, I am now convinced. Let's make struct VirtIODevice* be the first argument for all helpers and kill the AddressSpace* one. Unless you envision we could end up with different address spaces accross multiple virtio devices

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 18:14:55 + Peter Maydell peter.mayd...@linaro.org wrote: On 28 March 2014 18:04, Greg Kurz gk...@linux.vnet.ibm.com wrote: Ok, I am now convinced. Let's make struct VirtIODevice* be the first argument for all helpers and kill the AddressSpace* one. Unless you