qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 11/15] target-i386: Add property getter for CPU


From: Michael Roth
Subject: Re: [Qemu-devel] [PATCH 11/15] target-i386: Add property getter for CPU model-id
Date: Thu, 19 Apr 2012 20:02:36 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Apr 19, 2012 at 06:47:57PM -0600, Eric Blake wrote:
> On 04/19/2012 06:41 PM, Michael Roth wrote:
> 
> >> +    char *value;
> >> +    int i;
> >> +
> >> +    value = g_malloc(48 + 1);
> >> +    for (i = 0; i < 48; i++) {
> >> +        value[i] = env->cpuid_model[i >> 2] >> (8 * (i & 3));
> > 
> > setter code is a bit difficult to parse but I think we need value[i] &= 0xff
> > here
> 
> value[i] is a char.  Unless you're planning on compiling for a non-POSIX
> system where char is more than 8 bits, value[i] &= 0xff is a no-op.

Heh, indeed it is. Please disregard :)

> 
> -- 
> Eric Blake   address@hidden    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 





reply via email to

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