Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271609
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit |
| Date | 2015-11-17 20:40 +0100 |
| Message-ID | <qvUgH-Qn-27@gated-at.bofh.it> (permalink) |
| References | (10 earlier) <qvPK2-6hQ-23@gated-at.bofh.it> <qvTDY-m1-17@gated-at.bofh.it> <qvTXk-J9-3@gated-at.bofh.it> <qvTXk-J9-1@gated-at.bofh.it> <qvU71-N7-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 17, 2015 at 11:29 AM, Andrew Cooper <andrew.cooper3@citrix.com> wrote: > On 17/11/15 19:16, Andy Lutomirski wrote: >> On Tue, Nov 17, 2015 at 11:12 AM, Andrew Cooper >> <andrew.cooper3@citrix.com> wrote: >>> On 17/11/15 18:49, Andy Lutomirski wrote: >>>> On Nov 17, 2015 6:40 AM, "Boris Ostrovsky" <boris.ostrovsky@oracle.com> wrote: >>>>> On 11/16/2015 04:55 PM, H. Peter Anvin wrote: >>>>>> On 11/16/15 12:22, Borislav Petkov wrote: >>>>>>> Huh, so what's wrong with a jump: >>>>>>> >>>>>>> jmp 1f >>>>>>> swapgs >>>>>>> 1: >>>>>>> >>>>>> What is the point of that jump? >>>>>> >>>>>>>> If it would make you feel better, it could be X86_BUG_XENPV :-p >>>>>>> That doesn't matter - I just don't want to open the flood gates on >>>>>>> pseudo feature bits. >>>>>>> >>>>>>> hpa, what do you think? >>>>>> Pseudo feature bits are fine, we already have plenty of them. They make >>>>>> sense as they let us reuse a lot of infrastructure. >>>>> >>>>> So how about something like this? And then I think we can remove usergs_sysret32 and irq_enable_sysexit pv ops completely as noone will use them (lguest doesn't set them) >>>>> >>>> Looks good to me. Does Xen have any sysexit/sysret32 equivalent to >>>> return to 32-bit user mode? If so, it could be worth trying to wire >>>> it up by patching the jz instead of the test instruction. >>> From the guests point of view, there is only hypercall_iret. >> Doesn't hypercall_iret have flags that ask for different behavior, >> though? (VG_syscall or whatever for the 64-bit case?) > > The one and only flag is VGCF_in_syscall > > Xen has its own logic for choosing between sysretq/sysretl if > VGCF_in_syscall, but will end up on an iret path in all other > circumstances. In that case, a nicer version of this patch could preserve the new sysret-or-iret decision (on 64-bit kernels in the compat path) and use it to set VGCF_in_syscall. This might work considerably better now than it ever would have, since Linux now tries to use sysret32 on *all* 64-bit CPUs, and the way it's structured for compat is just a flag (the testl %eax,%eax thing) that indicates that sysret32 is okay. Anyway, that can be a followup patch. --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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-11-16 17:30 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-16 20:10 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Borislav Petkov <bp@alien8.de> - 2015-11-16 21:00 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-16 21:20 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Borislav Petkov <bp@alien8.de> - 2015-11-16 21:30 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-11-16 21:50 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-16 22:00 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-16 22:10 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Joao Martins <joao.m.martins@oracle.com> - 2015-11-17 12:00 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Borislav Petkov <bp@alien8.de> - 2015-11-16 22:10 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit "H. Peter Anvin" <hpa@zytor.com> - 2015-11-16 23:00 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-11-17 15:50 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-17 20:00 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-17 20:20 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Borislav Petkov <bp@alien8.de> - 2015-11-17 20:30 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andrew Cooper <andrew.cooper3@citrix.com> - 2015-11-17 20:30 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andy Lutomirski <luto@amacapital.net> - 2015-11-17 20:40 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-11-17 20:40 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-11-17 20:40 +0100
Re: [Xen-devel] [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Andrew Cooper <andrew.cooper3@citrix.com> - 2015-11-17 20:20 +0100
Re: [PATCH] xen/x86: Adjust stack pointer in xen_sysexit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-11-16 21:40 +0100
csiph-web