On Wed, Jun 05, 2013 at 03:18:41PM +0200, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <imamm...@redhat.com>
> ---
[...]
> @@ -1632,6 +1677,7 @@ static void cpu_x86_parse_featurestr(X86CPU *cpu, char
> *features, Error **errp)
> } else if (!strcmp(featurestr, "hv-spinlocks")) {
> char *err;
> const int min = 0xFFF;
> + char num[32];
> numvalue = strtoul(val, &err, 0);
> if (!*val || *err) {
> error_setg(errp, "bad numerical value %s", val);
> @@ -1643,7 +1689,8 @@ static void cpu_x86_parse_featurestr(X86CPU *cpu, char
> *features, Error **errp)
> min);
> numvalue = min;
> }
> - env->hyperv_spinlock_attempts = numvalue;
> + snprintf(num, sizeof(num), "%" PRId32, numvalue);
> + object_property_parse(OBJECT(cpu), num, featurestr, errp);
Why not use object_property_set_int()?
--
Eduardo