From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFzG2-0006xe-MX for qemu-devel@nongnu.org; Thu, 23 Jun 2016 03:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFzFx-0003ou-Le for qemu-devel@nongnu.org; Thu, 23 Jun 2016 03:41:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFzFx-0003on-GE for qemu-devel@nongnu.org; Thu, 23 Jun 2016 03:40:57 -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 E43B480E6A for ; Thu, 23 Jun 2016 07:40:56 +0000 (UTC) From: Markus Armbruster References: <1466437983-27133-1-git-send-email-ehabkost@redhat.com> <1466437983-27133-2-git-send-email-ehabkost@redhat.com> Date: Thu, 23 Jun 2016 09:40:54 +0200 In-Reply-To: <1466437983-27133-2-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Mon, 20 Jun 2016 12:52:54 -0300") Message-ID: <87eg7o73p5.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 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 Cc: qemu-devel@nongnu.org, Marcel Apfelbaum , Paolo Bonzini , Igor Mammedov Eduardo Habkost writes: > Since commit 25f8dd9, 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. Actually, we've stopped since forever. Before commit 25f8dd9, that was okay. Since commit, it isn't. Suggest: 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. Commit 25f8dd9 changed the fatal error to a warning, but neglected to drop the stopping. Fix that. > 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 > Reviewed-by: Markus Armbruster > Reviewed-by: Marcel Apfelbaum > 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; > } > } > } Preferably with a clarified commit message: Reviewed-by: Markus Armbruster