From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT8LC-0006VS-JU for qemu-devel@nongnu.org; Tue, 09 Feb 2016 08:28:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT8L7-0006WJ-HA for qemu-devel@nongnu.org; Tue, 09 Feb 2016 08:28:26 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:33078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT8L7-0006W1-AA for qemu-devel@nongnu.org; Tue, 09 Feb 2016 08:28:21 -0500 Received: by mail-wm0-x244.google.com with SMTP id c200so3437114wme.0 for ; Tue, 09 Feb 2016 05:28:20 -0800 (PST) Sender: Paolo Bonzini References: <1436429849-18052-1-git-send-email-rth@twiddle.net> <1436429849-18052-6-git-send-email-rth@twiddle.net> From: Paolo Bonzini Message-ID: <56B9E971.9070509@redhat.com> Date: Tue, 9 Feb 2016 14:28:17 +0100 MIME-Version: 1.0 In-Reply-To: <1436429849-18052-6-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/14] target-i386: Enable control registers for MPX List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org Cc: ehabkost@redhat.com 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)) ? Paolo