[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to acce
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers |
Date: |
Fri, 28 Mar 2014 18:37:29 +0100 |
On Fri, 28 Mar 2014 18:21:43 +0100
Andreas Färber <address@hidden> wrote:
> Am 28.03.2014 18:13, schrieb Greg Kurz:
> > On Fri, 28 Mar 2014 11:57:56 +0100
> > Greg Kurz <address@hidden> 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 = event;
> >> - evt->reason = reason;
> >> + evt->event = virtio_tswap32(event);
> >> + evt->reason = virtio_tswap32(reason);
> >
> > My bad again, it should be:
> >
> > + evt->event = virtio_tswap32(event, vdev);
> > + evt->reason = virtio_tswap32(reason, vdev);
>
> Pure bikeshedding, but wouldn't it make sense to have the vdev as first
> argument?
>
I have thought about it also... it would make sense to do the same with
all the other helpers in virtio-access.h then.
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 ?
> Regards,
> Andreas
>
Thanks.
--
Gregory Kurz address@hidden
address@hidden
Software Engineer @ IBM/Meiosys http://www.ibm.com
Tel +33 (0)562 165 496
"Anarchy is about taking complete responsibility for yourself."
Alan Moore.
- Re: [Qemu-devel] [PATCH v6 2/8] virtio: allow byte swapping for vring and config access, (continued)
- [Qemu-devel] [PATCH v6 3/8] virtio-net: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
- [Qemu-devel] [PATCH v6 4/8] virtio-balloon: use virtio wrappers to access page frame numbers, Greg Kurz, 2014/03/28
- [Qemu-devel] [PATCH v6 5/8] virtio-blk: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
- [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Andreas Färber, 2014/03/28
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers,
Greg Kurz <=
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Peter Maydell, 2014/03/28
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Peter Maydell, 2014/03/28
- Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers, Alexander Graf, 2014/03/31
[Qemu-devel] [PATCH v6 7/8] virtio-serial-bus: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
[Qemu-devel] [PATCH v6 8/8] virtio-9p: use virtio wrappers to access headers, Greg Kurz, 2014/03/28
[Qemu-devel] [PATCH v4] target-ppc: ppc64 target's virtio can be either endian, Greg Kurz, 2014/03/28