[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/15] target-i386: convert 'hv_spinlocks' to st
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH 10/15] target-i386: convert 'hv_spinlocks' to static property |
Date: |
Tue, 25 Jun 2013 17:30:50 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jun 05, 2013 at 03:18:41PM +0200, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
[...]
> @@ -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
- Re: [Qemu-devel] [PATCH 08/15] target-i386: cpu: convert 'tsc-frequency' to static property, (continued)
- [Qemu-devel] [PATCH 07/15] target-i386: cpu: convert 'model-id' to static property, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 01/15] target-i386: cpu: convert 'family' to static property, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 11/15] target-i386: convert 'hv_relaxed' to static property, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 12/15] target-i386: convert 'hv_vapic' to static property, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 09/15] target-i386: move hyperv_* static globals to CPUState, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 10/15] target-i386: convert 'hv_spinlocks' to static property, Igor Mammedov, 2013/06/05
- Re: [Qemu-devel] [PATCH 10/15] target-i386: convert 'hv_spinlocks' to static property,
Eduardo Habkost <=
- [Qemu-devel] [PATCH 13/15] target-i386: convert 'check' and 'enforce' to static properties, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 15/15] target-i386: cleanup 'foo=val' feature handling, Igor Mammedov, 2013/06/05
- [Qemu-devel] [PATCH 14/15] target-i386: cleanup 'foo' feature handling', Igor Mammedov, 2013/06/05
- Re: [Qemu-devel] [PATCH qom-cpu 00/15 v8] target-i386: convert CPU features into properties, part 1, Andreas Färber, 2013/06/05