search for: paravirt_patch_default

Displaying 20 results from an estimated 111 matches for "paravirt_patch_default".

2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
...queued_spin_unlock; - goto patch_site; - } - goto patch_default; + case PARAVIRT_PATCH(lock.queued_spin_unlock): + if (pv_is_native_spin_unlock()) + return paravirt_patch_insns(ibuf, len, + start_lock_queued_spin_unlock, + end_lock_queued_spin_unlock); + else + return paravirt_patch_default(type, ibuf, addr, len); - case PARAVIRT_PATCH(lock.vcpu_is_preempted): - if (pv_is_native_vcpu_is_preempted()) { - start = start_lock_vcpu_is_preempted; - end = end_lock_vcpu_is_preempted; - goto patch_site; - } - goto patch_default; + case PARAVIRT_PATCH(lock.vcpu_is_preempted)...
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
...queued_spin_unlock; - goto patch_site; - } - goto patch_default; + case PARAVIRT_PATCH(lock.queued_spin_unlock): + if (pv_is_native_spin_unlock()) + return paravirt_patch_insns(ibuf, len, + start_lock_queued_spin_unlock, + end_lock_queued_spin_unlock); + else + return paravirt_patch_default(type, ibuf, addr, len); - case PARAVIRT_PATCH(lock.vcpu_is_preempted): - if (pv_is_native_vcpu_is_preempted()) { - start = start_lock_vcpu_is_preempted; - end = end_lock_vcpu_is_preempted; - goto patch_site; - } - goto patch_default; + case PARAVIRT_PATCH(lock.vcpu_is_preempted)...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...8 type, void *ibuf, unsigned long addr, unsigned len) if (pv_is_native_spin_unlock()) { start = start_lock_queued_spin_unlock; end = end_lock_queued_spin_unlock; - goto patch_site; + + return paravirt_patch_insns(ibuf, len, start, end); } - goto patch_default; + return paravirt_patch_default(type, ibuf, addr, len); case PARAVIRT_PATCH(lock.vcpu_is_preempted): if (pv_is_native_vcpu_is_preempted()) { start = start_lock_vcpu_is_preempted; end = end_lock_vcpu_is_preempted; - goto patch_site; + + return paravirt_patch_insns(ibuf, len, start, end); } - goto p...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...8 type, void *ibuf, unsigned long addr, unsigned len) if (pv_is_native_spin_unlock()) { start = start_lock_queued_spin_unlock; end = end_lock_queued_spin_unlock; - goto patch_site; + + return paravirt_patch_insns(ibuf, len, start, end); } - goto patch_default; + return paravirt_patch_default(type, ibuf, addr, len); case PARAVIRT_PATCH(lock.vcpu_is_preempted): if (pv_is_native_vcpu_is_preempted()) { start = start_lock_vcpu_is_preempted; end = end_lock_vcpu_is_preempted; - goto patch_site; + + return paravirt_patch_insns(ibuf, len, start, end); } - goto p...
2018 Aug 13
0
[PATCH v2 02/11] x86/paravirt: remove clobbers parameter from paravirt patch functions
The clobbers parameter from paravirt_patch_default() et al isn't used any longer. Remove it. Signed-off-by: Juergen Gross <jgross at suse.com> --- arch/x86/include/asm/paravirt_types.h | 7 +++---- arch/x86/kernel/alternative.c | 2 +- arch/x86/kernel/paravirt.c | 14 +++++--------- arch/x86/kernel/paravirt_patch_32...
2018 Sep 10
2
[PATCH] x86/paravirt: Cleanup native_patch()
...: > > + case PARAVIRT_PATCH(lock.queued_spin_unlock): > > + if (pv_is_native_spin_unlock()) > > + return paravirt_patch_insns(ibuf, len, > > + start_lock_queued_spin_unlock, > > + end_lock_queued_spin_unlock); > > + else > > + return paravirt_patch_default(type, ibuf, addr, len); > > Why not replace the else clause by a "break;" and ... Because I think that exiting right then and there is much easier to follow than adding all those breaks and wading through ifdeffery to realize that this is the default path and we'll end up call...
2018 Sep 10
2
[PATCH] x86/paravirt: Cleanup native_patch()
...: > > + case PARAVIRT_PATCH(lock.queued_spin_unlock): > > + if (pv_is_native_spin_unlock()) > > + return paravirt_patch_insns(ibuf, len, > > + start_lock_queued_spin_unlock, > > + end_lock_queued_spin_unlock); > > + else > > + return paravirt_patch_default(type, ibuf, addr, len); > > Why not replace the else clause by a "break;" and ... Because I think that exiting right then and there is much easier to follow than adding all those breaks and wading through ifdeffery to realize that this is the default path and we'll end up call...
2019 Sep 10
1
[bug report] x86/paravirt: Use a single ops structure
Hello Juergen Gross, The patch 5c83511bdb98: "x86/paravirt: Use a single ops structure" from Aug 28, 2018, leads to the following static checker warning: arch/x86/kernel/paravirt.c:123 paravirt_patch_default() warn: uncapped user index '*(&pv_ops + type)' arch/x86/kernel/paravirt.c:124 paravirt_patch_default() error: buffer overflow '&pv_ops' 90 <= 255 user_rl='0-255' arch/x86/kernel/paravirt.c 116 unsigned paravirt_patch_default(u8 type, void *insn_buff,...
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
...if (pv_is_native_vcpu_is_preempted()) { start = start_lock_vcpu_is_preempted; end = end_lock_vcpu_is_preempted; - goto patch_site; + + return paravirt_patch_insns(ibuf, len, start, end); } goto patch_default; #endif @@ -86,7 +87,6 @@ patch_default: __maybe_unused ret = paravirt_patch_default(type, ibuf, addr, len); break; -patch_site: ret = paravirt_patch_insns(ibuf, len, start, end); break; } -- 2.17.0.582.gccdcbd54c
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
...if (pv_is_native_vcpu_is_preempted()) { start = start_lock_vcpu_is_preempted; end = end_lock_vcpu_is_preempted; - goto patch_site; + + return paravirt_patch_insns(ibuf, len, start, end); } goto patch_default; #endif @@ -86,7 +87,6 @@ patch_default: __maybe_unused ret = paravirt_patch_default(type, ibuf, addr, len); break; -patch_site: ret = paravirt_patch_insns(ibuf, len, start, end); break; } -- 2.17.0.582.gccdcbd54c
2018 Sep 08
0
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...ned len) > if (pv_is_native_spin_unlock()) { > start = start_lock_queued_spin_unlock; > end = end_lock_queued_spin_unlock; > - goto patch_site; > + > + return paravirt_patch_insns(ibuf, len, start, end); > } > - goto patch_default; > + return paravirt_patch_default(type, ibuf, addr, len); > > case PARAVIRT_PATCH(lock.vcpu_is_preempted): > if (pv_is_native_vcpu_is_preempted()) { > start = start_lock_vcpu_is_preempted; > end = end_lock_vcpu_is_preempted; > - goto patch_site; > + > + return paravirt_patch_insns(...
2018 Sep 10
0
[PATCH] x86/paravirt: Cleanup native_patch()
...; - } > - goto patch_default; > + case PARAVIRT_PATCH(lock.queued_spin_unlock): > + if (pv_is_native_spin_unlock()) > + return paravirt_patch_insns(ibuf, len, > + start_lock_queued_spin_unlock, > + end_lock_queued_spin_unlock); > + else > + return paravirt_patch_default(type, ibuf, addr, len); Why not replace the else clause by a "break;" and ... > > - case PARAVIRT_PATCH(lock.vcpu_is_preempted): > - if (pv_is_native_vcpu_is_preempted()) { > - start = start_lock_vcpu_is_preempted; > - end = end_lock_vcpu_is_preempted; > -...
2016 Dec 16
2
[PATCH] x86/paravirt: hide unused patch_default label
...h_32.c index d33ef165b1f8..2b729b1df391 100644 --- a/arch/x86/kernel/paravirt_patch_32.c +++ b/arch/x86/kernel/paravirt_patch_32.c @@ -68,7 +68,9 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf, #endif default: +#if defined(CONFIG_PARAVIRT_SPINLOCKS) patch_default: +#endif ret = paravirt_patch_default(type, clobbers, ibuf, addr, len); break; diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c index f4fcf26c9fce..b5bff128949a 100644 --- a/arch/x86/kernel/paravirt_patch_64.c +++ b/arch/x86/kernel/paravirt_patch_64.c @@ -80,7 +80,9 @@ unsigned native_patch(u8...
2016 Dec 16
2
[PATCH] x86/paravirt: hide unused patch_default label
...h_32.c index d33ef165b1f8..2b729b1df391 100644 --- a/arch/x86/kernel/paravirt_patch_32.c +++ b/arch/x86/kernel/paravirt_patch_32.c @@ -68,7 +68,9 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf, #endif default: +#if defined(CONFIG_PARAVIRT_SPINLOCKS) patch_default: +#endif ret = paravirt_patch_default(type, clobbers, ibuf, addr, len); break; diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c index f4fcf26c9fce..b5bff128949a 100644 --- a/arch/x86/kernel/paravirt_patch_64.c +++ b/arch/x86/kernel/paravirt_patch_64.c @@ -80,7 +80,9 @@ unsigned native_patch(u8...
2018 Sep 11
1
[PATCH v2] x86/paravirt: Cleanup native_patch()
...o patch_default; + case PARAVIRT_PATCH(lock.vcpu_is_preempted): + if (pv_is_native_vcpu_is_preempted()) + return paravirt_patch_insns(ibuf, len, + start_lock_vcpu_is_preempted, + end_lock_vcpu_is_preempted); + break; #endif default: -patch_default: __maybe_unused - ret = paravirt_patch_default(type, ibuf, addr, len); - break; - -patch_site: - ret = paravirt_patch_insns(ibuf, len, start, end); break; } #undef PATCH_SITE - return ret; + return paravirt_patch_default(type, ibuf, addr, len); } diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c ind...
2007 Apr 18
0
[PATCH] Update lguest's patch code for new paravirt patch architecture
The new patching code means that we don't actually have to do as much work in lguest's patcher. We use paravirt_patch_default() for cases we don't want to patch inline, which automatically handles the "patch iret to use a direct jump" case. There's no measurable effect on lguest's virtbench scores tho. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/lguest/lguest.c | 1...
2007 Apr 18
0
[PATCH] Update lguest's patch code for new paravirt patch architecture
The new patching code means that we don't actually have to do as much work in lguest's patcher. We use paravirt_patch_default() for cases we don't want to patch inline, which automatically handles the "patch iret to use a direct jump" case. There's no measurable effect on lguest's virtbench scores tho. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/lguest/lguest.c | 1...
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
2016 Dec 08
0
[PATCH 1/2] x86,paravirt: Fix native_patch()
...t; + case PARAVIRT_PATCH(pv_lock_ops.vcpu_is_preempted): if (pv_is_native_vcpu_is_preempted()) { start = start_pv_lock_ops_vcpu_is_preempted; end = end_pv_lock_ops_vcpu_is_preempted; goto patch_site; } + goto patch_default; #endif default: +patch_default: ret = paravirt_patch_default(type, clobbers, ibuf, addr, len); break; --- a/arch/x86/kernel/paravirt_patch_64.c +++ b/arch/x86/kernel/paravirt_patch_64.c @@ -68,15 +68,19 @@ unsigned native_patch(u8 type, u16 clobb end = end_pv_lock_ops_queued_spin_unlock; goto patch_site; } + goto patch_default; + ca...