qemu-devel
[Top][All Lists]
Advanced

[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:34:44 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

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?

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]