From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFLfS-0006tv-B0 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 09:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFLfN-0003sk-Bk for qemu-devel@nongnu.org; Tue, 21 Jun 2016 09:24:38 -0400 From: Igor Mammedov Date: Tue, 21 Jun 2016 15:24:17 +0200 Message-Id: <1466515457-253194-1-git-send-email-imammedo@redhat.com> In-Reply-To: <1465492263-28472-5-git-send-email-imammedo@redhat.com> References: <1465492263-28472-5-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v2 4/6] fixup! cpu: use CPUClass->parse_features() as convertor to global properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, ehabkost@redhat.com, qemu-arm@nongnu.org, pbonzini@redhat.com, rth@twiddle.net make sure that -cpu features converted to global properties will not be ignored and QEMU exits with error as it used to in case feature couldn't be applied. fixup is on top of: [PATCH v2 00/10] globals: Clean up validation and error checking Signed-off-by: Igor Mammedov --- qom/cpu.c | 1 + target-i386/cpu.c | 1 + 2 files changed, 2 insertions(+) diff --git a/qom/cpu.c b/qom/cpu.c index b34c4a0..a9727a1 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -314,6 +314,7 @@ static void cpu_common_parse_features(const char *typename, char *features, prop->driver = typename; prop->property = g_strdup(featurestr); prop->value = g_strdup(val); + prop->errp = &error_fatal; qdev_prop_register_global(prop); } else { error_setg(errp, "Expected key=value format, found %s.", diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 212d552..0f0a3f3 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2024,6 +2024,7 @@ static void x86_cpu_parse_featurestr(const char *typename, char *features, prop->driver = typename; prop->property = g_strdup(name); prop->value = g_strdup(val); + prop->errp = &error_fatal; qdev_prop_register_global(prop); } -- 1.8.3.1