search for: apply_paravirt

Displaying 20 results from an estimated 82 matches for "apply_paravirt".

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] Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type'
Fix paravirt_probe() macro so that handing it start_kernel doesn't evoke a warning (start_kernel is asmlinkage). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/dontdiff --minimal linux-2.6.19-rc4-mm2/include/asm-i386/paravirt.h working-2.6.19-rc4-mm2-warnings/include/asm-i386/paravirt.h ---
2007 Apr 18
1
[PATCH] Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type'
Fix paravirt_probe() macro so that handing it start_kernel doesn't evoke a warning (start_kernel is asmlinkage). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/dontdiff --minimal linux-2.6.19-rc4-mm2/include/asm-i386/paravirt.h working-2.6.19-rc4-mm2-warnings/include/asm-i386/paravirt.h ---
2015 Mar 19
1
[PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock
...>> >> So I think it is kind of risky to use it here unless we can guarantee that >> call site patching is atomic wrt other CPUs. > Just look at where the patching is done: > > init/main.c:start_kernel() > check_bugs() > alternative_instructions() > apply_paravirt() > > We're UP and not holding any locks, disable IRQs (see text_poke_early()) > and have NMIs 'disabled'. You are probably right. The initial apply_paravirt() was done before the SMP boot. Subsequent ones were at kernel module load time. I put a counter in the __native_queu...
2015 Mar 19
1
[PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock
...>> >> So I think it is kind of risky to use it here unless we can guarantee that >> call site patching is atomic wrt other CPUs. > Just look at where the patching is done: > > init/main.c:start_kernel() > check_bugs() > alternative_instructions() > apply_paravirt() > > We're UP and not holding any locks, disable IRQs (see text_poke_early()) > and have NMIs 'disabled'. You are probably right. The initial apply_paravirt() was done before the SMP boot. Subsequent ones were at kernel module load time. I put a counter in the __native_queu...
2015 Mar 19
2
[PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock
On 03/16/2015 09:16 AM, Peter Zijlstra wrote: > Implement the paravirt qspinlock for x86-kvm. > > We use the regular paravirt call patching to switch between: > > native_queue_spin_lock_slowpath() __pv_queue_spin_lock_slowpath() > native_queue_spin_unlock() __pv_queue_spin_unlock() > > We use a callee saved call for the unlock function which reduces the > i-cache
2015 Mar 19
2
[PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock
On 03/16/2015 09:16 AM, Peter Zijlstra wrote: > Implement the paravirt qspinlock for x86-kvm. > > We use the regular paravirt call patching to switch between: > > native_queue_spin_lock_slowpath() __pv_queue_spin_lock_slowpath() > native_queue_spin_unlock() __pv_queue_spin_unlock() > > We use a callee saved call for the unlock function which reduces the > i-cache
2007 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...clude <linux/list.h> #include <asm/alternative.h> #include <asm/sections.h> +#include <asm/paravirt.h> #define DEBUG 0 #if DEBUG @@ -283,6 +284,35 @@ void alternatives_smp_switch(int smp) spin_unlock_irqrestore(&smp_alt, flags); } +#ifdef CONFIG_PARAVIRT +void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) +{ + unsigned char **noptable = find_nop_table(); + struct paravirt_patch *p; + int diff, i, k; + + for (p = start; p < end; p++) { + unsigned int used; + used = paravirt_ops.patch(p->instrtype, p->instr, p->len); + /* Pad the...
2007 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...clude <linux/list.h> #include <asm/alternative.h> #include <asm/sections.h> +#include <asm/paravirt.h> #define DEBUG 0 #if DEBUG @@ -283,6 +284,35 @@ void alternatives_smp_switch(int smp) spin_unlock_irqrestore(&smp_alt, flags); } +#ifdef CONFIG_PARAVIRT +void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) +{ + unsigned char **noptable = find_nop_table(); + struct paravirt_patch *p; + int diff, i, k; + + for (p = start; p < end; p++) { + unsigned int used; + used = paravirt_ops.patch(p->instrtype, p->instr, p->len); + /* Pad the...
2007 Apr 18
0
Compile error with !CONFIG_PARAVIRT
FYI - I was working on some changes, and just noticed this with !CONFIG_PARAVIRT. CC arch/i386/kernel/alternative.o arch/i386/kernel/alternative.c:436: error: ?apply_paravirt? undeclared here (not in a function) arch/i386/kernel/alternative.c:436: warning: type defaults to ?int? in declaration of ?apply_paravirt? arch/i386/kernel/alternative.c:437: error: ?__start_parainstructions? undeclared here (not in a function) arch/i386/kernel/alternative.c:437: warning: type...
2007 Apr 18
0
Compile error with !CONFIG_PARAVIRT
FYI - I was working on some changes, and just noticed this with !CONFIG_PARAVIRT. CC arch/i386/kernel/alternative.o arch/i386/kernel/alternative.c:436: error: ?apply_paravirt? undeclared here (not in a function) arch/i386/kernel/alternative.c:436: warning: type defaults to ?int? in declaration of ?apply_paravirt? arch/i386/kernel/alternative.c:437: error: ?__start_parainstructions? undeclared here (not in a function) arch/i386/kernel/alternative.c:437: warning: type...
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
0
[PATCH 08/13] x86/paravirt: Clean up paravirt_types.h
...eof(void *)) - -#define paravirt_type(op) \ - [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ - [paravirt_opptr] "i" (&(op)) -#define paravirt_clobber(clobber) \ - [paravirt_clobber] "i" (clobber) - -/* - * Generate some code, and mark it as patchable by the - * apply_paravirt() alternate instruction patcher. - */ -#define _paravirt_alt(insn_string, type, clobber) \ - "771:\n\t" insn_string "\n" "772:\n" \ - ".pushsection .parainstructions,\"a\"\n" \ - _ASM_ALIGN "\n" \ - _ASM_PTR " 771b\n" \ -...
2017 Oct 04
1
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...ble much earlier than when alternatives are normally applied. So put these alternatives in a dedicated ".pv_alternatives" section. So now these instructions may be patched twice: - in apply_pv_alternatives(), to allow the kernel to boot in the virtualized environment; - and again in apply_paravirt(), to enable performance improvements (e.g., replacing an indirect call with a direct call). That's a bit more complex, but overall this approach should cause less confusion than before because the vmlinux code is now much more likely to represent the actual runtime state of the code in the...
2014 Oct 27
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...places, including >> loadable kernel modules. Can the paravirt_patch_ident_32() function able to >> patch all of them in reasonable time? How about a kernel module loaded later >> at run time? > modules should be fine, see arch/x86/kernel/module.c:module_finalize() > -> apply_paravirt(). > > Also note that the 'default' text is an indirect call into the paravirt > ops table which routes to the 'right' function, so even if the text > patching would be 'late' calls would 'work' as expected, just slower. Thanks for letting me know about...
2014 Oct 27
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...places, including >> loadable kernel modules. Can the paravirt_patch_ident_32() function able to >> patch all of them in reasonable time? How about a kernel module loaded later >> at run time? > modules should be fine, see arch/x86/kernel/module.c:module_finalize() > -> apply_paravirt(). > > Also note that the 'default' text is an indirect call into the paravirt > ops table which routes to the 'right' function, so even if the text > patching would be 'late' calls would 'work' as expected, just slower. Thanks for letting me know about...
2017 Oct 06
4
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...icular case since the guest probably won't be able to handle an > interrupt at this point anyway. Yeah, that should work. For Xen and for the other hypervisors, this is called well before irq init, so interrupts can't be handled yet anyway. > > + > > void __init_or_module apply_paravirt(struct paravirt_patch_site *start, > > struct paravirt_patch_site *end) > > { > > diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c > > index 4fa90006ac68..17243fe0f5ce 100644 > > --- a/arch/x86/kernel/cpu/hypervisor.c > &gt...
2017 Oct 06
4
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...icular case since the guest probably won't be able to handle an > interrupt at this point anyway. Yeah, that should work. For Xen and for the other hypervisors, this is called well before irq init, so interrupts can't be handled yet anyway. > > + > > void __init_or_module apply_paravirt(struct paravirt_patch_site *start, > > struct paravirt_patch_site *end) > > { > > diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c > > index 4fa90006ac68..17243fe0f5ce 100644 > > --- a/arch/x86/kernel/cpu/hypervisor.c > &gt...