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

Re: [Xen-devel] [PATCH v5 21/21] tools/libxc: Calculate xstate cpuid leaf from guest information



>>> On 08.04.16 at 23:45, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 08/04/16 22:00, Jan Beulich wrote:
>>>>> On 07.04.16 at 13:57, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> v5:
>>>  * Reintroduce PKRU, (again, lost due to rebasing).
>>>  * Rewrite the commit message and comments to try and better explain why I 
>>> am
>>>    deliberatly removing host-specific information from the xstate 
>>> calculation.
>>>  * Reintroduce 0xFFFFFFFF masks for EAX, to avoid Coverity complaining about
>>>    truncation on assignment.
>> Urgh - I don't think ugliness like this can be justified by Coverity
>> complaining. That would be different if the compiler complained
>> (like compilers other than gcc do).
> 
> Hmm - Clang is happy with the code as was.

I should have said "like some compilers other than gcc do".

> I would prefer to avoid the Coverity issue if at all possible.  Would a
> (uint32_t) cast be more acceptable?

To me, yes. However, only slightly - you know my general
opposition to casts. As to the Coverity aspect - we have tons of
such apparent truncations all over the hypervisor (and likely also
all over the tool stack), so I don't really see the point of uglifying
the code here just to avoid one single further instance.

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®.