From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v3 2/4] KVM: Add SMAP support when setting CR4 Date: Tue, 01 Apr 2014 11:26:39 +0200 Message-ID: <533A864F.10708@redhat.com> References: <1396289316-982-1-git-send-email-feng.wu@intel.com> <1396289316-982-3-git-send-email-feng.wu@intel.com> <53396E07.5030803@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]:30874 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723AbaDAJ0p (ORCPT ); Tue, 1 Apr 2014 05:26:45 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 01/04/2014 03:17, Wu, Feng ha scritto: >>> A fault is considered >>> > > + * as a SMAP violation if all of the following >>> > > + * conditions are ture: >>> > > + * - X86_CR4_SMAP is set in CR4 >>> > > + * - An user page is accessed >>> > > + * - Page fault in kernel mode >>> > > + * - !(CPL<3 && X86_EFLAGS_AC is set) >> > >> > - if CPL < 3, EFLAGS.AC is clear > Should it be "if CPL =3 or EFLAGS.AC is clear" ? > What I meant is "if CPL < 3, EFLAGS.AC must also be clear", but your version is fine too. You choose! Paolo