Received: from eggs.gnu.org ([2001:4830:134:3::10]:48855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOPFU-0002Ku-3w for qemu-devel@nongnu.org; Thu, 19 Feb 2015 06:26:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOPFQ-00067c-Tp for qemu-devel@nongnu.org; Thu, 19 Feb 2015 06:26:28 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:53623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOPFQ-00067P-Jt for qemu-devel@nongnu.org; Thu, 19 Feb 2015 06:26:24 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Feb 2015 11:26:22 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5E97717D8042 for ; Thu, 19 Feb 2015 11:26:34 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1JBQKs911665884 for ; Thu, 19 Feb 2015 11:26:20 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1JBQJdN011716 for ; Thu, 19 Feb 2015 04:26:20 -0700 Date: Thu, 19 Feb 2015 12:26:18 +0100 From: Cornelia Huck Message-ID: <20150219122618.372cc7e7.cornelia.huck@de.ibm.com> In-Reply-To: <20150219102927.GA24587@redhat.com> References: <1422541482-2839-1-git-send-email-den@openvz.org> <1422541482-2839-2-git-send-email-den@openvz.org> <20150219092541.GA19380@redhat.com> <54E5AEA5.8030407@openvz.org> <20150219093941.GB19380@redhat.com> <54E5B0FA.3010505@openvz.org> <20150219101732.GA24499@redhat.com> <54E5B987.9070202@openvz.org> <20150219102927.GA24587@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RESEND PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: "Denis V. Lunev" , qemu-devel@nongnu.org, Raushaniya Maksudova , Christian Borntraeger On Thu, 19 Feb 2015 11:29:27 +0100 "Michael S. Tsirkin" wrote: > On Thu, Feb 19, 2015 at 01:23:03PM +0300, Denis V. Lunev wrote: > > >The problem is code duplication: all transports need to know > > >about these balloon-specific property. > > >Why isn't it handled by virtio_instance_init_common? > > > > > why it should? > > > > virtio_instance_init_common is common for all virtio devices > > including VirtIO net, VirtIO block, VirtIO SCSI. Thus the patch > > move initialization of all common stuff into the common > > code. > > The problem seems common enough, virtio_instance_init_common > already works for all properties, why not for these ones? It only works for the properties that are common amongst transports and all devices. Adding a virtio_balloon_init_common() that adds the guest_stats (or a virtio_rng_init_common() that adds rng) is probably not a bad idea, but I'd prefer it as patches on top of these.