Re: [Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-19 Thread Borislav Petkov
On Wed, Nov 18, 2015 at 12:21:56PM -0800, Andy Lutomirski wrote: > Could we make this a little less subtle: > > ALTERNATIVE "testl %eax, %eax; lz .Lsyscall_32_done", "jmp > .Lsyscasll_32_done", X86_FEATURE_XENPV > > Borislav, what do you think? I don't mind either. I would've said your version

[Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-18 Thread Boris Ostrovsky
After 32-bit syscall rewrite, and specifically after commit 5f310f739b4c ("x86/entry/32: Re-implement SYSENTER using the new C path"), the stack frame that is passed to xen_sysexit is no longer a "standard" one (i.e. it's not pt_regs). Since we end up calling xen_iret from xen_sysexit we don't

Re: [Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-18 Thread Andy Lutomirski
On Wed, Nov 18, 2015 at 12:06 PM, Boris Ostrovsky wrote: > After 32-bit syscall rewrite, and specifically after commit 5f310f739b4c > ("x86/entry/32: Re-implement SYSENTER using the new C path"), the stack > frame that is passed to xen_sysexit is no longer a "standard"

Re: [Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-18 Thread Andy Lutomirski
On Wed, Nov 18, 2015 at 12:50 PM, Brian Gerst wrote: > On Wed, Nov 18, 2015 at 3:21 PM, Andy Lutomirski wrote: >> On Wed, Nov 18, 2015 at 12:06 PM, Boris Ostrovsky >> wrote: >>> After 32-bit syscall rewrite, and specifically

Re: [Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-18 Thread Borislav Petkov
On Wed, Nov 18, 2015 at 12:21:56PM -0800, Andy Lutomirski wrote: > > diff --git a/arch/x86/include/asm/cpufeature.h > > b/arch/x86/include/asm/cpufeature.h > > index e4f8010..0e4fe5b 100644 > > --- a/arch/x86/include/asm/cpufeature.h > > +++ b/arch/x86/include/asm/cpufeature.h > > @@ -216,6

Re: [Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-18 Thread Boris Ostrovsky
On 11/18/2015 03:58 PM, Andy Lutomirski wrote: On Wed, Nov 18, 2015 at 12:50 PM, Brian Gerst wrote: Can you just add !xen_pv_domain() to the opportunistic SYSRET check instead? Bury the alternatives in that macro, ie. static_cpu_has(X86_FEATURE_XENPV). That would likely

Re: [Xen-devel] [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-18 Thread Brian Gerst
On Wed, Nov 18, 2015 at 3:21 PM, Andy Lutomirski wrote: > On Wed, Nov 18, 2015 at 12:06 PM, Boris Ostrovsky > wrote: >> After 32-bit syscall rewrite, and specifically after commit 5f310f739b4c >> ("x86/entry/32: Re-implement SYSENTER using the new