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

Re: [Xen-devel] [PATCH 2/3] x86: correctly check for subâleaf zero of leaf 7 in pv_cpuid()



>>> On 20.01.15 at 11:46, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 19/01/15 15:27, Jan Beulich wrote:
>> Only the low 32 bits are relevant.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> There are two examples of "regs->eax" which could turn to regs->_eax
> under the same argument; the if statement immediately after cpuid,

In

    if ( (regs->eax & 0x7fffffff) == 0x00000001 )

it really doesn't matter, as the high 33 bits get chopped off anyway.

> and the switch statement.

Yes, this could be cleaned up. But still its not under the same argument
as

    switch ( (uint32_t)regs->eax )

and

    switch ( regs->_eax )

are functionally identical, whereas the sole original change actually
fixed a functionality problem.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.