From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEfmN-0000xU-D2 for qemu-devel@nongnu.org; Sun, 19 Jun 2016 12:41:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEfmI-0005Bw-CC for qemu-devel@nongnu.org; Sun, 19 Jun 2016 12:40:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEfmI-0005Bm-6S for qemu-devel@nongnu.org; Sun, 19 Jun 2016 12:40:54 -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 C584BC049E17 for ; Sun, 19 Jun 2016 16:40:53 +0000 (UTC) References: <1466022773-8965-1-git-send-email-ehabkost@redhat.com> <1466022773-8965-2-git-send-email-ehabkost@redhat.com> From: Marcel Apfelbaum Message-ID: <5766CB12.5060403@redhat.com> Date: Sun, 19 Jun 2016 19:40:50 +0300 MIME-Version: 1.0 In-Reply-To: <1466022773-8965-2-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/10] qdev: Don't stop applying globals on first error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org, Markus Armbruster Cc: Paolo Bonzini , Igor Mammedov On 06/15/2016 11:32 PM, Eduardo Habkost wrote: > qdev_prop_set_globals_for_type() stops applying global properties > on the first error. It is a leftover from when QEMU exited on any > error when applying global property. Now we print a warning about > the first error, bug ignore all other global properties after it. > > For example, the following command-line will not set CPUID level > to 3, but will warn only about "x86_64-cpu.vendor" being ignored. > > $ ./x86_64-softmmu/qemu-system-x86_64 \ > -global x86_64-cpu.vendor=x \ > -global x86_64-cpu.level=3 > qemu-system-x86_64: Warning: global x86_64-cpu.vendor=x ignored: Property '.vendor' doesn't take value 'x' > > Fix this by not returning from qdev_prop_set_globals_for_type() > on the first error. > > Cc: Markus Armbruster > Signed-off-by: Eduardo Habkost > --- > hw/core/qdev-properties.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c > index e3b2184..c10edee 100644 > --- a/hw/core/qdev-properties.c > +++ b/hw/core/qdev-properties.c > @@ -1088,7 +1088,6 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev, > assert(prop->user_provided); > error_reportf_err(err, "Warning: global %s.%s=%s ignored: ", > prop->driver, prop->property, prop->value); > - return; > } > } > } > Is always nice to have more warnings. Reviewed-by: Marcel Apfelbaum Thanks, Marcel