From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYv9A-00043I-FM for qemu-devel@nongnu.org; Tue, 30 Sep 2014 06:59:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYv92-0006rf-3F for qemu-devel@nongnu.org; Tue, 30 Sep 2014 06:59:07 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:40433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYv91-0006qj-QH for qemu-devel@nongnu.org; Tue, 30 Sep 2014 06:59:00 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Sep 2014 11:58:53 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 46E7217D804E for ; Tue, 30 Sep 2014 12:01:01 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8UAwpFB50200764 for ; Tue, 30 Sep 2014 10:58:51 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8UAwojV025643 for ; Tue, 30 Sep 2014 04:58:51 -0600 Date: Tue, 30 Sep 2014 12:58:45 +0200 From: Cornelia Huck Message-ID: <20140930125845.47fdeb3f.cornelia.huck@de.ibm.com> In-Reply-To: <542A7529.1040208@redhat.com> 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> <542A7529.1040208@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Paolo Bonzini Cc: weidong.huang@huawei.com, mst@redhat.com, qemu-devel@nongnu.org, luonengjun@huawei.com, agraf@suse.de, armbru@redhat.com, borntraeger@de.ibm.com, arei.gonglei@huawei.com, stefanha@redhat.com, peter.huangpeng@huawei.com, rth@twiddle.net On Tue, 30 Sep 2014 11:17:29 +0200 Paolo Bonzini wrote: > 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. Yup. Let's do the easy changes first.