WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Patch] Disallow SMEP for PV guest

To: "Li, Xin" <xin.li@xxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, "Yang, Wei Y" <wei.y.yang@xxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] Disallow SMEP for PV guest
From: Keir Fraser <keir@xxxxxxx>
Date: Wed, 01 Jun 2011 16:36:14 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 01 Jun 2011 08:37:51 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=nvieoBWs/NDtKBHFIt7b/UYZVlCQ3MiA9jjN3XG1ZfA=; b=e8MXwVcQWxg2zenIB/5iPzXaOgKe14XJIYK/9nmwYsnsQQ8qPXshkaSbLuzt63JnZx MrWKgPDyhqUcnSpuW/bpEPl81M8QExcr4ee2emyAdcPbIKRK72MfGG/OJ1AZJux0Gwz3 Xy4cx0W8oxYHrnj03Ryu9IlJ3wHYOWUuD6Cdk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=qaL6HBG8A7OH/wMh1bDQFNHOoPWcWM30TiZbyfTwvL9Erh/fQRcKx9E/Vgt5z1ZdVB IYel9oWWkJdClmGteTTWSNNdQX99SJ3iExTC2ok3ZWEVbJFz6LY+bATdNvvxgfJlrPgd fg1cDko1wvnE/jgUnbYID6Jpyu11wMDx7wXZg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <FC2FB65B4D919844ADE4BE3C2BB739AD5AB1835F@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwgbBbxssL7GsrdRB6pTh3NOUqN5QAAar4gAAD4f3c=
Thread-topic: [Xen-devel] [Patch] Disallow SMEP for PV guest
User-agent: Microsoft-Entourage/12.29.0.110113
On 01/06/2011 16:17, "Li, Xin" <xin.li@xxxxxxxxx> wrote:

>> On Wed, Jun 01, 2011 at 10:31:12PM +0800, Yang, Wei Y wrote:
>>> This patch disallows SMEP for PV guest.
>> 
>> What are the reasons for it? What do we gain from it?
> 
> X86_64 pv guests runs in ring3, which SMEP doesn't apply to.
> 
> Kernel supports SMEP will set it thru writing to CR4, probably we can silently
> ignore such writes from PV guests, but better to not let guest see it.

Well, maybe. But if you hide the feature from the guest in CPUID then you
should also hide it in CR4, which will involve some messing with
real_cr4_to_pv_guest_cr4() and pv_guest_cr4_to_real_cr4(), in a fairly
obvious manner. And you should hide it in dom0's CPUID too.

 -- Keir

> Thanks!
> -Xin
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel