From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYtZ3-0008Vw-1U for qemu-devel@nongnu.org; Tue, 30 Sep 2014 05:17:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYtYx-00041H-Il for qemu-devel@nongnu.org; Tue, 30 Sep 2014 05:17:44 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:52200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYtYx-0003zx-Ay for qemu-devel@nongnu.org; Tue, 30 Sep 2014 05:17:39 -0400 Received: by mail-wg0-f52.google.com with SMTP id n12so13084557wgh.35 for ; Tue, 30 Sep 2014 02:17:33 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <542A7529.1040208@redhat.com> Date: Tue, 30 Sep 2014 11:17:29 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1412057438-10004-1-git-send-email-arei.gonglei@huawei.com> <1412057438-10004-13-git-send-email-arei.gonglei@huawei.com> <20140930110452.2f0fed58.cornelia.huck@de.ibm.com> In-Reply-To: <20140930110452.2f0fed58.cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 12/12] virtio: add a wrapper for virtio-backend initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , arei.gonglei@huawei.com Cc: weidong.huang@huawei.com, mst@redhat.com, armbru@redhat.com, luonengjun@huawei.com, qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, stefanha@redhat.com, peter.huangpeng@huawei.com, rth@twiddle.net Il 30/09/2014 11:04, Cornelia Huck ha scritto: > On Tue, 30 Sep 2014 14:10:38 +0800 > wrote: > >> From: Gonglei >> >> For better code sharing, add a wrapper help funciton > > typo: s/funciton/function/ > >> for various virtio devices. > > s/for various virtio devices/that handles referencing the virtio > backend for virtio proxy devices/ ? > >> >> Cc: Cornelia Huck >> Cc: Michael S. Tsirkin >> Signed-off-by: Gonglei >> --- >> hw/s390x/s390-virtio-bus.c | 42 +++++++++++++++++---------------------- >> hw/s390x/virtio-ccw.c | 42 +++++++++++++++++---------------------- >> hw/virtio/virtio-pci.c | 49 ++++++++++++++++++++-------------------------- >> hw/virtio/virtio.c | 11 +++++++++++ >> include/hw/virtio/virtio.h | 3 +++ >> 5 files changed, 71 insertions(+), 76 deletions(-) > > I'm wondering whether we should call the wrapper for virtio-balloon as > well. Even if it does not have any properties to alias, calling > qdev_alias_all_properties() probably doesn't hurt, does it? Actually it has properties to alias: guest-stats and guest-stats-polling-interval are effectively aliases, so we could remove 30-odd lines of code from virtio-pci and virtio-ccw. It's okay IMO to put it in a separate patch, since it is a bit different from the trivial replacement done here. Paolo