[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcwgbBbxssL7GsrdRB6pTh3NOUqN5QAAar4gAAD4f3c=
  • Thread-topic: [Xen-devel] [Patch] Disallow SMEP for PV guest

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.