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: Keir Fraser <keir@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, "Yang, Wei Y" <wei.y.yang@xxxxxxxxx>
Subject: RE: [Xen-devel] [Patch] Disallow SMEP for PV guest
From: "Li, Xin" <xin.li@xxxxxxxxx>
Date: Thu, 2 Jun 2011 00:01:33 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 01 Jun 2011 09:04:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA0C1AFE.2E12E%keir@xxxxxxx>
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>
References: <FC2FB65B4D919844ADE4BE3C2BB739AD5AB1835F@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CA0C1AFE.2E12E%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwgbBbxssL7GsrdRB6pTh3NOUqN5QAAar4gAAD4f3cAADgdwA==
Thread-topic: [Xen-devel] [Patch] Disallow SMEP for PV guest
> >>> 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.

People are very interested in this feature :).

As it can't apply to ring 3, x86_64 pv guest kernel accessing user code won't
trigger instruction fetch page fault.  thus it makes no sense to use it here.

Definitely we should hide it from dom0 kernel.  The change should be in Xen or 
pvops dom0?

thanks!
-Xin

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