Received: from eggs.gnu.org ([2001:4830:134:3::10]:37018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG2rq-0001ST-Vf for qemu-devel@nongnu.org; Thu, 23 Jun 2016 07:32:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG2rm-00036b-N1 for qemu-devel@nongnu.org; Thu, 23 Jun 2016 07:32:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG2rm-00036X-HW for qemu-devel@nongnu.org; Thu, 23 Jun 2016 07:32:14 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 9BB1D62672 for ; Thu, 23 Jun 2016 11:32:13 +0000 (UTC) Date: Thu, 23 Jun 2016 08:32:11 -0300 From: Eduardo Habkost Message-ID: <20160623113211.GT2048@thinpad.lan.raisama.net> References: <1466437983-27133-1-git-send-email-ehabkost@redhat.com> <1466437983-27133-11-git-send-email-ehabkost@redhat.com> <87a8ic5n06.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a8ic5n06.fsf@dusky.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v2 10/10] machine: Skip global registration for non-existing classes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Marcel Apfelbaum , Paolo Bonzini , Igor Mammedov On Thu, Jun 23, 2016 at 10:26:49AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > MachineClass::compat_props may point to class names that are not > > compiled into the QEMU binary. Skip registering those as global > > properties. This will allow the qdev global property code to > > implement stricter checks on the global property values in the > > future. > > > > Signed-off-by: Eduardo Habkost > > Not sure what those stricter checks might be, but that's okay. > > Doesn't this suppress detection of programming errors? Say I fat-finger > a device name in my machine type's global properties. We can't detect that, because compat_props is allowed to include classes that are disabled at build time. > Before this patch, I get an error (a nice one since PATCH 06). You don't. The class name validation in qdev_prop_check_globals() is done only on user-provided properties. -- Eduardo