From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv2TU-0002Ha-44 for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:24:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv2TO-0003sn-Gz for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:24:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv2TO-0003s6-Au for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:24:30 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D276683F47 for ; Fri, 14 Oct 2016 13:24:27 +0000 (UTC) Date: Fri, 14 Oct 2016 10:24:25 -0300 From: Eduardo Habkost Message-ID: <20161014132425.GE3275@thinpad.lan.raisama.net> References: <1476394002-8392-1-git-send-email-ehabkost@redhat.com> <1476394002-8392-2-git-send-email-ehabkost@redhat.com> <20161014150830.7caab068@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161014150830.7caab068@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/4] machine: Register TYPE_MACHINE properties as class properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, Marcel Apfelbaum , Paolo Bonzini , Markus Armbruster , "Michael S. Tsirkin" On Fri, Oct 14, 2016 at 03:08:30PM +0200, Igor Mammedov wrote: > On Thu, 13 Oct 2016 18:26:39 -0300 > Eduardo Habkost wrote: > > > When doing the conversion, the NULL errp arguments on the > > property registration calls were changed to &error_abort. > > > > Signed-off-by: Eduardo Habkost > So many property registrations look pretty ugly but still > better than doing it per instance, not that it matters > so far as there is only 1 instance of Machine at a time. > > So > Reviewed-by: Igor Mammedov Thanks! > > most of the properties below are dumb field setter/getter, > it would be much better to declare them statically and > make generic Object code to initialize them at type > initialization time. > i.e. make similar thing like static properties but for class > and probably extend it to have optional custom setter/getter. I've been considering doing that. It should be easier after the "qdev class properties" series gets applied, but the existing static-property code is still specific to DeviceState (probably it's only because the static property getter/setters include a dev->realized check). -- Eduardo