[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 4/6] fixup! cpu: use CPUClass->parse_features() a
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 4/6] fixup! cpu: use CPUClass->parse_features() as convertor to global properties |
Date: |
Tue, 21 Jun 2016 15:24:17 +0200 |
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 <address@hidden>
---
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
- Re: [Qemu-devel] [PATCH v2 1/6] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr, (continued)