From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Patch v3] Enable CPU SMEP feature for KVM Date: Sun, 29 May 2011 10:20:47 +0300 Message-ID: <4DE1F3CF.1060607@redhat.com> References: <5D8008F58939784290FAB48F54975198419FBE82D2@shsmsx502.ccr.corp.intel.com> <4DDF64A9.1000001@redhat.com> <4DE1EAD6.1040902@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Yang, Wei Y" , "kvm@vger.kernel.org" To: "Li, Xin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43825 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267Ab1E2HUz (ORCPT ); Sun, 29 May 2011 03:20:55 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/29/2011 10:15 AM, Li, Xin wrote: > > > > > > > > > + else > > > > > + best->ebx&= ~(bit(X86_FEATURE_SMEP)); > > > > > > > > Not needed - x86.c already masks unsupported features. > > > > > > Should KVM still support guest SMEP when host disables it thru nosmep? > > > > No. We treat nosmep as "no smep for the kernel and any guests". NX is > > treated in the same way. > > Then we need to add logic to do_cpuid_ent to mask off leaf 7 features when host > disables it. Yes. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.