From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS Date: Mon, 30 May 2011 11:53:58 +0300 Message-ID: <4DE35B26.2000403@redhat.com> References: <5D8008F58939784290FAB48F5497519844E92781DF@shsmsx502.ccr.corp.intel.com> <20110530074033.GB27557@elte.hu> <4DE34BF9.20106@redhat.com> <20110530080552.GG27557@elte.hu> <4DE358BF.2000902@redhat.com> <20110530085232.GL30513@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Yang, Wei Y" , Pekka Enberg , "kvm@vger.kernel.org" To: Ingo Molnar Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50517 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753461Ab1E3IyS (ORCPT ); Mon, 30 May 2011 04:54:18 -0400 In-Reply-To: <20110530085232.GL30513@elte.hu> Sender: kvm-owner@vger.kernel.org List-ID: On 05/30/2011 11:52 AM, Ingo Molnar wrote: > * Avi Kivity wrote: > > > > Another option would be to try to set the SMEP bit *before* we > > > enable paging. In theory this should not confuse a Linux guest - > > > and while i have not tested it i *think* we let it survive in the > > > saved_cr4_features shadow variable. That would make guest > > > suspend/resume work out of box as well. > > > > Is there any reason not to do it in a hidden way in kvm? Why must > > we play tricks? > > So do you have a suggestion of how to do this cleaner? > > Add an ioctl that allows a VCPU to be configured in a way to set a > cr4 feature without the guest actually seeing that bit? [Assuming > both cr4 reads and writes are fully captured by KVM and thus guest > behavior is controllable.] Yes, this was what I suggested before. IIRC you liked it. -- error compiling committee.c: too many arguments to function