search for: sysretq

Displaying 20 results from an estimated 50 matches for "sysretq".

2020 Aug 07
2
[PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL
...86_64 > .mmu_write_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 > .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq > .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd > @@ -50,19 +45,11 @@ static const struct patch_xxl patch_data_xxl = { > 0x48, 0x0f, 0x07 }, // swapgs; sysretq > .cpu_swapgs = { 0x0f, 0x01, 0xf8 }, // swapgs > .mov64 = { 0x48, 0x89, 0xf8 }, // mov %rdi, %rax > -# else > - .mmu_write_cr3 = { 0x0f, 0x22, 0xd8 }, // mov %eax, %cr3 > - .irq_restore_fl = { 0x50, 0x9d }, // push %eax; popf > - .cpu_iret = { 0xcf }, // iret > -# e...
2020 Aug 07
2
[PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL
...86_64 > .mmu_write_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 > .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq > .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd > @@ -50,19 +45,11 @@ static const struct patch_xxl patch_data_xxl = { > 0x48, 0x0f, 0x07 }, // swapgs; sysretq > .cpu_swapgs = { 0x0f, 0x01, 0xf8 }, // swapgs > .mov64 = { 0x48, 0x89, 0xf8 }, // mov %rdi, %rax > -# else > - .mmu_write_cr3 = { 0x0f, 0x22, 0xd8 }, // mov %eax, %cr3 > - .irq_restore_fl = { 0x50, 0x9d }, // push %eax; popf > - .cpu_iret = { 0xcf }, // iret > -# e...
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...9-paravirt1/arch/x86_64/kernel/entry.S 2007-01-11 22:22:26.000000000 -0200 @@ -51,6 +51,13 @@ #include <asm/page.h> #include <asm/irqflags.h> +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else +#define ENABLE_INTERRUPTS(x) sti +#define DISABLE_INTERRUPTS(x) cli +#define SYSRETQ sysretq +#endif .code64 #ifndef CONFIG_PREEMPT @@ -179,6 +186,7 @@ rff_trace: CFI_ENDPROC END(ret_from_fork) + /* * System call entry. Upto 6 arguments in registers are supported. * @@ -223,7 +231,7 @@ ENTRY(system_call) * No need to follow this irqs off/on section - it's st...
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...9-paravirt1/arch/x86_64/kernel/entry.S 2007-01-11 22:22:26.000000000 -0200 @@ -51,6 +51,13 @@ #include <asm/page.h> #include <asm/irqflags.h> +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else +#define ENABLE_INTERRUPTS(x) sti +#define DISABLE_INTERRUPTS(x) cli +#define SYSRETQ sysretq +#endif .code64 #ifndef CONFIG_PREEMPT @@ -179,6 +186,7 @@ rff_trace: CFI_ENDPROC END(ret_from_fork) + /* * System call entry. Upto 6 arguments in registers are supported. * @@ -223,7 +231,7 @@ ENTRY(system_call) * No need to follow this irqs off/on section - it's st...
2017 Nov 17
2
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...asm/nops.h> > > +#ifdef CONFIG_X86_64 > +# define _REG_ARG1 "%rdi" > +# define NATIVE_IDENTITY_32 "mov %edi, %eax" Yeah, that "identity" looks strange. How about NATIVE_NOOP and NATIVE_NOOP_32 ? > +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" > +#else > +# define _REG_ARG1 "%eax" > +#endif > + > +#define _REG_RET "%" _ASM_AX > + > +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 NATIVE_ZERO_OUT I guess. NATIVE_ZERO reads like the native representation of 0 :-...
2017 Nov 17
2
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...asm/nops.h> > > +#ifdef CONFIG_X86_64 > +# define _REG_ARG1 "%rdi" > +# define NATIVE_IDENTITY_32 "mov %edi, %eax" Yeah, that "identity" looks strange. How about NATIVE_NOOP and NATIVE_NOOP_32 ? > +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" > +#else > +# define _REG_ARG1 "%eax" > +#endif > + > +#define _REG_RET "%" _ASM_AX > + > +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 NATIVE_ZERO_OUT I guess. NATIVE_ZERO reads like the native representation of 0 :-...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 12/17] paravirt_ops - interrupt/exception changes
...+++ clean-start/arch/x86_64/kernel/entry.S @@ -51,6 +51,15 @@ #include <asm/page.h> #include <asm/irqflags.h> +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else +#define ENABLE_INTERRUPTS(x) sti +#define DISABLE_INTERRUPTS(x) cli +#define INTERRUPT_RETURN iretq +#define SYSRETQ sysretq +#define SWAPGS swapgs +#endif .code64 #ifndef CONFIG_PREEMPT @@ -179,6 +188,7 @@ rff_trace: CFI_ENDPROC END(ret_from_fork) + /* * System call entry. Upto 6 arguments in registers are supported. * @@ -223,7 +233,7 @@ ENTRY(system_call) * No need to follow this irqs off...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 12/17] paravirt_ops - interrupt/exception changes
...+++ clean-start/arch/x86_64/kernel/entry.S @@ -51,6 +51,15 @@ #include <asm/page.h> #include <asm/irqflags.h> +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else +#define ENABLE_INTERRUPTS(x) sti +#define DISABLE_INTERRUPTS(x) cli +#define INTERRUPT_RETURN iretq +#define SYSRETQ sysretq +#define SWAPGS swapgs +#endif .code64 #ifndef CONFIG_PREEMPT @@ -179,6 +188,7 @@ rff_trace: CFI_ENDPROC END(ret_from_fork) + /* * System call entry. Upto 6 arguments in registers are supported. * @@ -223,7 +233,7 @@ ENTRY(system_call) * No need to follow this irqs off...
2017 Oct 25
0
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...+++ b/arch/x86/include/asm/special_insns.h > @@ -6,6 +6,30 @@ > > #include <asm/nops.h> > > +#ifdef CONFIG_X86_64 > +# define _REG_ARG1 "%rdi" > +# define NATIVE_IDENTITY_32 "mov %edi, %eax" > +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" > +#else > +# define _REG_ARG1 "%eax" > +#endif > + > +#define _REG_RET "%" _ASM_AX > + > +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 > +#define NATIVE_IDENTITY "mov " _REG_ARG1 ", " _REG_RET...
2017 Nov 17
2
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...P_32 ? > > Those are not NOPs. They return the identical value which was passed to > them. So identity isn't a bad name after all. Right, like the math identity function: https://en.wikipedia.org/wiki/Identity_function > >> +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" > >> +#else > >> +# define _REG_ARG1 "%eax" > >> +#endif > >> + > >> +#define _REG_RET "%" _ASM_AX > >> + > >> +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 > > > >...
2017 Nov 17
2
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...P_32 ? > > Those are not NOPs. They return the identical value which was passed to > them. So identity isn't a bad name after all. Right, like the math identity function: https://en.wikipedia.org/wiki/Identity_function > >> +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" > >> +#else > >> +# define _REG_ARG1 "%eax" > >> +#endif > >> + > >> +#define _REG_RET "%" _ASM_AX > >> + > >> +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 > > > >...
2017 Oct 04
1
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...- a/arch/x86/include/asm/special_insns.h +++ b/arch/x86/include/asm/special_insns.h @@ -6,6 +6,30 @@ #include <asm/nops.h> +#ifdef CONFIG_X86_64 +# define _REG_ARG1 "%rdi" +# define NATIVE_IDENTITY_32 "mov %edi, %eax" +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" +#else +# define _REG_ARG1 "%eax" +#endif + +#define _REG_RET "%" _ASM_AX + +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 +#define NATIVE_IDENTITY "mov " _REG_ARG1 ", " _REG_RET +#define NATIVE_SAVE_FL "pushf; p...
2017 Nov 17
0
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
..." > > Yeah, that "identity" looks strange. How about NATIVE_NOOP and > NATIVE_NOOP_32 ? Those are not NOPs. They return the identical value which was passed to them. So identity isn't a bad name after all. > >> +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" >> +#else >> +# define _REG_ARG1 "%eax" >> +#endif >> + >> +#define _REG_RET "%" _ASM_AX >> + >> +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 > > NATIVE_ZERO_OUT > > I guess. NATIVE_Z...
2017 Nov 18
0
[PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros
...NOPs. They return the identical value which was passed to >> them. So identity isn't a bad name after all. > > Right, like the math identity function: > > https://en.wikipedia.org/wiki/Identity_function > >>>> +# define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" >>>> +#else >>>> +# define _REG_ARG1 "%eax" >>>> +#endif >>>> + >>>> +#define _REG_RET "%" _ASM_AX >>>> + >>>> +#define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1...
2020 Aug 07
0
[PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL
...rite_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 >> .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq >> .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd >> @@ -50,19 +45,11 @@ static const struct patch_xxl patch_data_xxl = { >> 0x48, 0x0f, 0x07 }, // swapgs; sysretq >> .cpu_swapgs = { 0x0f, 0x01, 0xf8 }, // swapgs >> .mov64 = { 0x48, 0x89, 0xf8 }, // mov %rdi, %rax >> -# else >> - .mmu_write_cr3 = { 0x0f, 0x22, 0xd8 }, // mov %eax, %cr3 >> - .irq_restore_fl = { 0x50, 0x9d }, // push %eax; popf >> - .cpu_iret = {...
2017 Oct 04
0
[PATCH 04/13] x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntax
...@@ #include <asm/nops.h> #ifdef CONFIG_X86_64 -# define _REG_ARG1 "%rdi" -# define NATIVE_IDENTITY_32 "mov %edi, %eax" +# define _REG_ARG1 "%%rdi" +# define NATIVE_IDENTITY_32 "mov %%edi, %%eax" # define NATIVE_USERGS_SYSRET64 "swapgs; sysretq" #else -# define _REG_ARG1 "%eax" +# define _REG_ARG1 "%%eax" #endif -#define _REG_RET "%" _ASM_AX +#define _REG_RET "%%" _ASM_AX #define NATIVE_ZERO "xor " _REG_ARG1 ", " _REG_ARG1 #define NATIVE_IDENTITY "mo...
2017 Oct 04
0
[PATCH 01/13] x86/paravirt: remove wbinvd() paravirt interface
...VE(pv_mmu_ops, read_cr3, "movq %cr3, %rax"); DEF_NATIVE(pv_mmu_ops, write_cr3, "movq %rdi, %cr3"); DEF_NATIVE(pv_mmu_ops, flush_tlb_single, "invlpg (%rdi)"); -DEF_NATIVE(pv_cpu_ops, wbinvd, "wbinvd"); DEF_NATIVE(pv_cpu_ops, usergs_sysret64, "swapgs; sysretq"); DEF_NATIVE(pv_cpu_ops, swapgs, "swapgs"); @@ -60,7 +59,6 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf, PATCH_SITE(pv_mmu_ops, read_cr3); PATCH_SITE(pv_mmu_ops, write_cr3); PATCH_SITE(pv_mmu_ops, flush_tlb_single); - PATCH_SITE(pv_cpu_ops, wbinvd); #if def...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
...due to x86_64 calling conventions + * Recall that we are patching a function call */ +DEF_NATIVE(popfq, "pushq %rdi; popfq"); +DEF_NATIVE(pushfq, "pushfq; popq %rax"); +DEF_NATIVE(pushfq_cli, "pushfq; popq %rax; cli"); +DEF_NATIVE(iret, "iretq"); +DEF_NATIVE(sysretq, "sysretq"); +DEF_NATIVE(swapgs, "swapgs"); + +static const struct native_insns +{ + const char *start, *end; +} native_insns[] = { + [PARAVIRT_IRQ_DISABLE] = { start_cli, end_cli }, + [PARAVIRT_IRQ_ENABLE] = { start_sti, end_sti }, + [PARAVIRT_RESTORE_FLAGS] = { start_popfq, en...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
...due to x86_64 calling conventions + * Recall that we are patching a function call */ +DEF_NATIVE(popfq, "pushq %rdi; popfq"); +DEF_NATIVE(pushfq, "pushfq; popq %rax"); +DEF_NATIVE(pushfq_cli, "pushfq; popq %rax; cli"); +DEF_NATIVE(iret, "iretq"); +DEF_NATIVE(sysretq, "sysretq"); +DEF_NATIVE(swapgs, "swapgs"); + +static const struct native_insns +{ + const char *start, *end; +} native_insns[] = { + [PARAVIRT_IRQ_DISABLE] = { start_cli, end_cli }, + [PARAVIRT_IRQ_ENABLE] = { start_sti, end_sti }, + [PARAVIRT_RESTORE_FLAGS] = { start_popfq, en...
2015 Nov 18
0
[PATCH 3/3] x86: usergs_sysret32 pv op is no longer needed
...atch_64.c index 17c00f8..e70087a 100644 --- a/arch/x86/kernel/paravirt_patch_64.c +++ b/arch/x86/kernel/paravirt_patch_64.c @@ -14,7 +14,6 @@ DEF_NATIVE(pv_cpu_ops, clts, "clts"); DEF_NATIVE(pv_cpu_ops, wbinvd, "wbinvd"); DEF_NATIVE(pv_cpu_ops, usergs_sysret64, "swapgs; sysretq"); -DEF_NATIVE(pv_cpu_ops, usergs_sysret32, "swapgs; sysretl"); DEF_NATIVE(pv_cpu_ops, swapgs, "swapgs"); DEF_NATIVE(, mov32, "mov %edi, %eax"); @@ -54,7 +53,6 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf, PATCH_SITE(pv_irq_ops, save_fl); P...