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: Mon, 30 May 2011 10:52:32 +0200 Message-ID: <20110530085232.GL30513@elte.hu> References: <5D8008F58939784290FAB48F5497519844E92781DF@shsmsx502.ccr.corp.intel.com> <20110530074033.GB27557@elte.hu> <4DE34BF9.20106@redhat.com> <20110530080552.GG27557@elte.hu> <4DE358BF.2000902@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Yang, Wei Y" , Pekka Enberg , "kvm@vger.kernel.org" To: Avi Kivity Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:51598 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492Ab1E3Iwk (ORCPT ); Mon, 30 May 2011 04:52:40 -0400 Content-Disposition: inline In-Reply-To: <4DE358BF.2000902@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: * 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.] Thanks, Ingo