qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 05/14] target-i386: Enable control registers for


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 05/14] target-i386: Enable control registers for MPX
Date: Tue, 9 Feb 2016 08:50:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/09/2016 06:28 AM, Paolo Bonzini wrote:
> On 09/07/2015 10:17, Richard Henderson wrote:
>> +    /* Disallow enabling only half of MPX.  */
>> +    if ((mask ^ (mask * (XSTATE_BNDCSR / XSTATE_BNDREGS))) & XSTATE_BNDCSR) 
>> {
> 
> I'm refreshing patches 1-4 to add PKE support, and this caught my eye...
> 
> What about just
> 
>       if (!!(mask & XSTATE_BNDCSR) != !!(mask & XSTATE_BNDREGS))

Or even:

    if (!(mask & XSTATE_BNDCSR) != !(mask & XSTATE_BNDREGS))


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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