From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS Date: Wed, 1 Jun 2011 09:46:49 +0200 Message-ID: <20110601074649.GA774@elte.hu> References: <5D8008F58939784290FAB48F5497519844E92781DF@shsmsx502.ccr.corp.intel.com> <20110530074033.GB27557@elte.hu> <625BA99ED14B2D499DC4E29D8138F1505CA61C0F62@shsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Yang, Wei Y" , Pekka Enberg , Avi Kivity , "kvm@vger.kernel.org" To: "Tian, Kevin" Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:43815 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755153Ab1FAHrG (ORCPT ); Wed, 1 Jun 2011 03:47:06 -0400 Content-Disposition: inline In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505CA61C0F62@shsmsx502.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: * Tian, Kevin wrote: > > From: Ingo Molnar > > Sent: Monday, May 30, 2011 3:41 PM > > > > > > * Yang, Wei Y wrote: > > > > > This patch removes SMEP bit from CR4_RESERVED_BITS. > > > > I'm wondering, what is the best-practice way for tools/kvm/ to set > > SMEP for the guest kernel automatically, even if the guest kernel > > itsef has not requested SMEP? > > > > enabling SMEP w/o guest's knowledge can be problematic if the guest > is doing U/S 0->1 bit change w/o TLB invalidation, which is a > required action to ensure SMEP protection working correctly. Linux > versions known so far don't have this behavior because TLB > invalidation due to P bit change covers U/S 0->1 change. [...] We'd like to use this in the 'kvm' tool: git clone git://github.com/penberg/linux-kvm master cd linux-kvm/tools/kvm/ make -j Which is only interested in Linux guests. Thanks, Ingo