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

Re: [Xen-devel] [RFC] x86: PV SMAP for 64-bit guests



>>> On 29.01.14 at 19:04, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> This appears to be hardware independent, so looks as if it would still
> work fine on 64bit hardware lacking explicit SMAP/SMEP support?

Correct.

> (although possibly problems with emulating {ST,CL}AC)

Yeah, I already knew that in order to work on non-SMAP hardware
the #UD handler would also need to be enabled (not done in the
draft patch yet). Now that I checked again I see that the code in
the #GP handler is actually pointless altogether - according to the
spec #UD gets raised instead of #GP when CPL > 0. But then
again a guest should avoid relying on the emulation path anyway,
as the hypercall path is clearly faster.

> At a glance, it doesn't appear to add too much code to hot-paths, but

But it's also not as little that one could consider it completely
negligible.

> the performance overhead from the point of view of the PV guest looks
> substantial, requiring two hypercalls/traps on each
> copy_{to,from}_user(), which themselves cause a local TLB flush.

Right. Hence - as said in the response to David - the intention
would be for this to require explicit enabling on the kernel
command line.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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