From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTDOo-0004y8-Rt for qemu-devel@nongnu.org; Wed, 13 Jun 2018 17:33:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTDOk-000819-TT for qemu-devel@nongnu.org; Wed, 13 Jun 2018 17:33:50 -0400 Date: Wed, 13 Jun 2018 18:33:37 -0300 From: Eduardo Habkost Message-ID: <20180613213337.GP7451@localhost.localdomain> References: <20180611121655.19616-1-david@redhat.com> <20180611121655.19616-7-david@redhat.com> <20180613145624.3004935c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 06/11] pc-dimm: don't allow to access "size" before the device was realized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Hildenbrand Cc: Igor Mammedov , qemu-devel@nongnu.org, "Michael S . Tsirkin" , Xiao Guangrong , Alexander Graf , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson On Wed, Jun 13, 2018 at 04:03:35PM +0200, David Hildenbrand wrote: > On 13.06.2018 14:56, Igor Mammedov wrote: > > On Mon, 11 Jun 2018 14:16:50 +0200 > > David Hildenbrand wrote: > > > >> "size" should not be queried before the device was realized. Let' make > >> that explicit. > >> > >> Signed-off-by: David Hildenbrand > > It's generic property getter, it should work even before realize is called. > > That's the point, as we can see in NVDIMM code , it is *not* a generic > property getter. If it were a writeable property, I would agree with Igor because it would make it impossible to find out what's the default value for the property. As it's a read-only property, returning an error seems harmless. Igor, why exactly do you think it's a problem? -- Eduardo