[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: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 10/15] target-i386: convert 'hv_spinlocks' to static property |
Date: |
Wed, 26 Jun 2013 10:30:40 +0200 |
On Tue, 25 Jun 2013 17:34:44 -0300
Eduardo Habkost <address@hidden> wrote:
> On Tue, Jun 25, 2013 at 05:30:50PM -0300, Eduardo Habkost wrote:
> > 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()?
>
> Oh, I believe I have asked that before and you have already explained
> it: you are using strings to allow the existing object_property_parse()
> calls to be easily converted to qdev_prop_register_global() calls later.
> Correct?
>
Yep, this will be used later to consolidate code.
- Re: [Qemu-devel] [PATCH 07/15] target-i386: cpu: convert 'model-id' to static property, (continued)
- [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
- [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
- Re: [Qemu-devel] [PATCH qom-cpu 00/15 v8] target-i386: convert CPU features into properties, part 1, 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
- Re: [Qemu-devel] [PATCH qom-cpu 00/15 v8] target-i386: convert CPU features into properties, part 1, Eduardo Habkost, 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
- Re: [Qemu-devel] [PATCH qom-cpu 00/15 v8] target-i386: convert CPU features into properties, part 1, Eduardo Habkost, 2013/06/05
- Re: [Qemu-devel] [PATCH qom-cpu 00/15 v8] target-i386: convert CPU features into properties, part 1, Peter Maydell, 2013/06/05