[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/12] virtio/vhost-scsi: use aliases instead
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2 03/12] virtio/vhost-scsi: use aliases instead of duplicate qdev properties |
Date: |
Tue, 30 Sep 2014 16:00:05 +0200 |
On Tue, 30 Sep 2014 10:43:31 +0200
Cornelia Huck <address@hidden> wrote:
> On Tue, 30 Sep 2014 14:10:29 +0800
> <address@hidden> wrote:
>
> > From: Gonglei <address@hidden>
> >
> > {virtio, vhost}-scsi-{pci, s390, ccw} all duplicate the
> > qdev properties of their VirtIOSCSI/VHostSCSI child.
> > This approach does not work well with string or pointer
> > properties since we must be careful about leaking or
> > double-freeing them.
> >
> > Use the QOM alias property to forward property accesses to the
> > VirtIOSCSI/VHostSCSI child. This way no duplication is necessary.
> >
> > Signed-off-by: Gonglei <address@hidden>
> > ---
> > hw/s390x/s390-virtio-bus.c | 4 ++--
> > hw/s390x/virtio-ccw.c | 4 ++--
> > hw/virtio/virtio-pci.c | 4 ++--
> > 3 files changed, 6 insertions(+), 6 deletions(-)
>
> I just noticed that qemu-system-s390x -device vhost-scsi-{s390,ccw},?
> segfaults on me - but it also does on master, so that is an orthogonal
> problem I'll look into later. This patch looks fine to me and actually
> also fixes a bug for ccw where vhost-scsi referenced VirtIOSCSICcw
> instead of VHostSCSICcw, so:
>
> Reviewed-by: Cornelia Huck <address@hidden>
...and it turns out that s390-virtio is actually fine, while the
problem in virtio-ccw is trivially fixed by
s/VirtIOSCSICcw/VHostSCSICcw/ in the .instance_size initializer. I'll
queue that up with the next round of s390 patches.
- [Qemu-devel] [PATCH v2 00/12] virtio: fix virtio child recount in transports, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 01/12] virtio-net: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 06/12] virtio-serial: fix virtio-serial child refcount in transports, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 08/12] virtio-rng: fix virtio-rng child refcount in transports, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 03/12] virtio/vhost-scsi: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 04/12] virtio/vhost-scsi: fix virtio-scsi/vhost-scsi child refcount in transports, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 11/12] virtio-9p: fix virtio-9p child refcount in transports, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 07/12] virtio-rng: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 09/12] virtio-balloon: fix virtio-balloon child refcount in transports, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 05/12] virtio-serial: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/30
- [Qemu-devel] [PATCH v2 12/12] virtio: add a wrapper for virtio-backend initialization, arei.gonglei, 2014/09/30