search for: alt_instr

Displaying 20 results from an estimated 29 matches for "alt_instr".

2007 Apr 18
7
[patch 0/6] Various cleanups
Hi Andi, Here's a little batch of cleanups: - re-enable VDSO when PARAVIRT is enabled - make the parainstructions symbols match the other altinstructions naming convention - add kernel command-line options to disable altinstructions for smp and pv_ops Oh, and I'm mailing your noreplacement patch back at you, for no particularly good reason. J --
2007 Apr 18
7
[patch 0/6] Various cleanups
Hi Andi, Here's a little batch of cleanups: - re-enable VDSO when PARAVIRT is enabled - make the parainstructions symbols match the other altinstructions naming convention - add kernel command-line options to disable altinstructions for smp and pv_ops Oh, and I'm mailing your noreplacement patch back at you, for no particularly good reason. J --
2007 Apr 18
1
[PATCH 1/2] Clean up asm-x86_64/bugs.h
...!defined(CONFIG_SMP) + printk("CPU: "); + print_cpu_info(&boot_cpu_data); +#endif + alternative_instructions(); +} =================================================================== --- a/include/asm-x86_64/alternative.h +++ b/include/asm-x86_64/alternative.h @@ -16,6 +16,7 @@ struct alt_instr { u8 pad[5]; }; +extern void alternative_instructions(void); extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); struct module; =================================================================== --- a/include/asm-x86_64/bugs.h +++ b/include/asm-x86_64/bugs.h @...
2007 Apr 18
1
[PATCH 1/2] Clean up asm-x86_64/bugs.h
...!defined(CONFIG_SMP) + printk("CPU: "); + print_cpu_info(&boot_cpu_data); +#endif + alternative_instructions(); +} =================================================================== --- a/include/asm-x86_64/alternative.h +++ b/include/asm-x86_64/alternative.h @@ -16,6 +16,7 @@ struct alt_instr { u8 pad[5]; }; +extern void alternative_instructions(void); extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); struct module; =================================================================== --- a/include/asm-x86_64/bugs.h +++ b/include/asm-x86_64/bugs.h @...
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro maze, but most of it needs to stay due to the need of hiding the call instructions from the compiler
2017 Oct 04
1
[PATCH 10/13] x86/alternative: Support indirect call replacement
...15 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 3344d3382e91..81c577c7deba 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -410,20 +410,28 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start, insnbuf_sz = a->replacementlen; /* - * 0xe8 is a relative jump; fix the offset. - * - * Instruction length is checked before the opcode to avoid - * accessing uninitialized bytes for zero-length replacements. + * Fix the address offsets for call and jump instructions wh...
2017 Oct 04
1
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...e.h b/arch/x86/include/asm/alternative.h index c096624137ae..8482f90d5078 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -61,6 +61,7 @@ extern int alternatives_patched; extern void alternative_instructions(void); extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); +extern void apply_pv_alternatives(void); struct module; @@ -132,14 +133,17 @@ static inline int alternatives_text_reserved(void *start, void *end) b_replacement(num)":\n\t" newinstr "\n" e_replacement(num) ":\n\t" /* alternati...
2017 Nov 16
1
[PATCH 10/13] x86/alternative: Support indirect call replacement
...-git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c > > index 3344d3382e91..81c577c7deba 100644 > > --- a/arch/x86/kernel/alternative.c > > +++ b/arch/x86/kernel/alternative.c > > @@ -410,20 +410,28 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start, > > insnbuf_sz = a->replacementlen; > > > > /* > > - * 0xe8 is a relative jump; fix the offset. > > - * > > - * Instruction length is checked before the opcode to avoid > > - * accessing uninitialized bytes for zero-length replace...
2017 Nov 16
1
[PATCH 10/13] x86/alternative: Support indirect call replacement
...-git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c > > index 3344d3382e91..81c577c7deba 100644 > > --- a/arch/x86/kernel/alternative.c > > +++ b/arch/x86/kernel/alternative.c > > @@ -410,20 +410,28 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start, > > insnbuf_sz = a->replacementlen; > > > > /* > > - * 0xe8 is a relative jump; fix the offset. > > - * > > - * Instruction length is checked before the opcode to avoid > > - * accessing uninitialized bytes for zero-length replace...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...:"r" (x)); -#define stts() write_cr0(8 | read_cr0()) - #endif /* __KERNEL__ */ -#define wbinvd() \ - __asm__ __volatile__ ("wbinvd": : :"memory"); - static inline unsigned long get_limit(unsigned long segment) { unsigned long __limit; @@ -518,16 +459,7 @@ struct alt_instr { #define set_wmb(var, value) do { var = value; wmb(); } while (0) -/* interrupt control.. */ -#define local_save_flags(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */); } while (0) -#define local_irq_restore(x) do { ty...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...:"r" (x)); -#define stts() write_cr0(8 | read_cr0()) - #endif /* __KERNEL__ */ -#define wbinvd() \ - __asm__ __volatile__ ("wbinvd": : :"memory"); - static inline unsigned long get_limit(unsigned long segment) { unsigned long __limit; @@ -518,16 +459,7 @@ struct alt_instr { #define set_wmb(var, value) do { var = value; wmb(); } while (0) -/* interrupt control.. */ -#define local_save_flags(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */); } while (0) -#define local_irq_restore(x) do { ty...
2017 Oct 25
0
[PATCH 10/13] x86/alternative: Support indirect call replacement
...-) > > diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c > index 3344d3382e91..81c577c7deba 100644 > --- a/arch/x86/kernel/alternative.c > +++ b/arch/x86/kernel/alternative.c > @@ -410,20 +410,28 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start, > insnbuf_sz = a->replacementlen; > > /* > - * 0xe8 is a relative jump; fix the offset. > - * > - * Instruction length is checked before the opcode to avoid > - * accessing uninitialized bytes for zero-length replacements. > + * Fix the address o...
2003 Apr 28
0
[PATCH] Get klibc building under post-2.5.68 kernels
Recent BK kernels break the klibc build, because of proliferating use of u8, u16, and friends. The particular offender in this case is include/asm/system.h, which uses u8 in the new alt_instr struct. This patch "fixes" the breakage, albeit gracelessly. I'm agnostic on whether it's the Right Thing. It might be saner to simply have a series of definitions, of the form: typedef __u8 u8; However, this is prone to creeping breakage as the kernel leaks more data types i...
2007 Jul 24
1
lguest doesn't work on kernel 2.6.23-rc1
Hi, all, I have difficulty on setting up lguest. Basic OS info: gcc 4.1.2 glibc: 2.5.1 binutils: 2.17 kernel: 2.6.23-rc1 Following lguest.txt instruction, I build lguest enaled kernel, disable CONFIG_COMPAT_VDSO, the host kernel boot fine, but when booting Qemu image using lguest laucher program, the guest kernel vmlinux panic, attached console.txt is console output, and config.txt is kernel
2007 Jul 24
1
lguest doesn't work on kernel 2.6.23-rc1
Hi, all, I have difficulty on setting up lguest. Basic OS info: gcc 4.1.2 glibc: 2.5.1 binutils: 2.17 kernel: 2.6.23-rc1 Following lguest.txt instruction, I build lguest enaled kernel, disable CONFIG_COMPAT_VDSO, the host kernel boot fine, but when booting Qemu image using lguest laucher program, the guest kernel vmlinux panic, attached console.txt is console output, and config.txt is kernel
2007 Apr 18
3
[PATCH 1/2] paravirt.h header
OK, this is the revised paravirt.h (Andi has seen this before), then the second is the binary patching stuff. More things get added to the paravirt struct in future patches, but this basic stuff hasn't changed for some time. ==== This patch does the dumbest possible replacement of paravirtualized instructions: calls through a "paravirt_ops" structure. Currently these are function
2007 Apr 18
4
[patch 0/4] Clean up asm/bugs.h, identify_cpu() and update COMPAT_VDSO
Hi Andi, Four patches: - clean up asm/bugs.h, by moving all the C code into its own C file - split identify_cpu() into boot and secondary variants, so that boot-time setup functions can be marked __init - repost of the COMPAT_VDSO patches with a bit more robustness from unknown DT_tags, and functions marked __init, since all this is boot-time only setup. Thanks, J --
2007 Apr 18
4
[patch 0/4] Clean up asm/bugs.h, identify_cpu() and update COMPAT_VDSO
Hi Andi, Four patches: - clean up asm/bugs.h, by moving all the C code into its own C file - split identify_cpu() into boot and secondary variants, so that boot-time setup functions can be marked __init - repost of the COMPAT_VDSO patches with a bit more robustness from unknown DT_tags, and functions marked __init, since all this is boot-time only setup. Thanks, J --
2012 Jun 29
0
[PATCH] linux-2.6.18/x86: improve CR0 read/write handling
...de/asm-x86_64/mach-xen/asm/system.h +++ b/include/asm-x86_64/mach-xen/asm/system.h @@ -7,7 +7,7 @@ #include <asm/synch_bitops.h> #include <asm/hypervisor.h> -#include <xen/interface/arch-x86_64.h> +#include <asm/percpu.h> #ifdef __KERNEL__ @@ -71,18 +71,41 @@ struct alt_instr { /* * Clear and set ''TS'' bit respectively */ -#define clts() (HYPERVISOR_fpu_taskswitch(0)) +#define X86_CR0_TS 8 +#define clts() ({ \ + if (__get_cpu_var(xen_x86_cr0) & X86_CR0_TS) { \ + HYPERVISOR_fpu_taskswitch(0); \ + __get_cpu_var(xen_x86_cr0) &= ~X86_CR0_TS;...