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 <imamm...@redhat.com>
---
 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


Reply via email to