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

RE: [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?


Xen-devel mailing list



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