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 Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ use per-device needs_byteswap flag, fix missing tswap32 in virtio_scsi_push_event(), Greg

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 wrote: > On 28 March 2014 18:04, Greg Kurz 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

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 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 Well, any one virtio dev

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 wrote: > On 28 March 2014 17:37, Greg Kurz 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.

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 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 that references to &addr

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 wrote: > Am 28.03.2014 18:13, schrieb Greg Kurz: > > On Fri, 28 Mar 2014 11:57:56 +0100 > > Greg Kurz wrote: > >> @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, > >> SCSIDevice *dev, > >> > >> evt = req->resp.event; >

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 wrote: > From: Rusty Russell > > Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. > > Signed-off-by: Rusty Russell > Reviewed-by: Anthony Liguori > [ use per-device needs_byteswap flag, > fix missing tswap32 in virtio_s

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 wrote: >> @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, >> SCSIDevice *dev, >> >> evt = req->resp.event; >> memset(evt, 0, sizeof(VirtIOSCSIEvent)); >> -evt->event = even

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

2014-03-28 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ use per-device needs_byteswap flag, fix missing tswap32 in virtio_scsi_push_event(), Greg Kurz ] Signed-off-by: Greg Kurz --- hw/scs