Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752375AbbKMX00 (ORCPT ); Fri, 13 Nov 2015 18:26:26 -0500 Received: from mail-ob0-f179.google.com ([209.85.214.179]:36563 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbKMX0Z (ORCPT ); Fri, 13 Nov 2015 18:26:25 -0500 MIME-Version: 1.0 In-Reply-To: <1447456706-24347-1-git-send-email-boris.ostrovsky@oracle.com> References: <1447456706-24347-1-git-send-email-boris.ostrovsky@oracle.com> From: Andy Lutomirski Date: Fri, 13 Nov 2015 15:26:04 -0800 Message-ID: Subject: Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit To: Boris Ostrovsky Cc: Konrad Rzeszutek Wilk , David Vrabel , xen-devel , "linux-kernel@vger.kernel.org" , Andrew Lutomirski Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 29 On Fri, Nov 13, 2015 at 3:18 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" one (i.e. > it's not pt_regs). > > We need to adjust it so that subsequent xen_iret can use it. I'm wondering if this should be more straightforward: movq %rsp, %rdi call do_fast_syscall_32 testl %eax, %eax jz .Lsyscall_32_done /* Opportunistic SYSRET */ sysret32_from_system_call: XEN_DO_SYSRET32 where XEN_DO_SYSRET32 is a simple pv op that, on Xen, jumps to a variant of Xen's iret path that knows that the fast path is okay. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/