From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/4] KVM: Add SMAP support when setting CR4 Date: Mon, 31 Mar 2014 10:45:11 +0200 Message-ID: <53392B17.4030504@redhat.com> References: <1396028184-24486-1-git-send-email-feng.wu@intel.com> <1396028184-24486-3-git-send-email-feng.wu@intel.com> <5335650E.8060800@redhat.com> <53391935.3040908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: "Wu, Feng" , "gleb@redhat.com" , "hpa@zytor.com" , "kvm@vger.kernel.org" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31933 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbaCaIpP (ORCPT ); Mon, 31 Mar 2014 04:45:15 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 31/03/2014 10:06, Wu, Feng ha scritto: >> > >> > It is faster if you avoid the "!" and shift right from the AC bit into >> > position PFERR_RSVD_BIT - 1. In update_permission_bitmask you can >> > invert the direction of the bit when you extract it from pfec. > So in that case, we should set "smapf" in update_permission_bitmask() this way, right? > > smapf = !(pfec & PFERR_RSVD_MASK); > Yep. Paolo