Received: from eggs.gnu.org ([2001:4830:134:3::10]:43812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZtC-0006Xv-76 for qemu-devel@nongnu.org; Tue, 25 Jun 2013 16:30:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrZt7-0001Re-Rc for qemu-devel@nongnu.org; Tue, 25 Jun 2013 16:30:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZt7-0001RR-K5 for qemu-devel@nongnu.org; Tue, 25 Jun 2013 16:30:53 -0400 Date: Tue, 25 Jun 2013 17:30:50 -0300 From: Eduardo Habkost Message-ID: <20130625203050.GC7707@otherpad.lan.raisama.net> References: <1370438326-27054-1-git-send-email-imammedo@redhat.com> <1370438326-27054-11-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1370438326-27054-11-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH 10/15] target-i386: convert 'hv_spinlocks' to static property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, afaerber@suse.de On Wed, Jun 05, 2013 at 03:18:41PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- [...] > @@ -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