Displaying 13 results from an estimated 13 matches for "end_lock_queued_spin_unlock".
2018 Sep 10
2
[PATCH] x86/paravirt: Cleanup native_patch()
On Mon, Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote:
> > + 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...
2018 Sep 10
2
[PATCH] x86/paravirt: Cleanup native_patch()
On Mon, Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote:
> > + 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...
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
...unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(mmu, write_cr3);
#endif
#if defined(CONFIG_PARAVIRT_SPINLOCKS)
- case PARAVIRT_PATCH(lock.queued_spin_unlock):
- if (pv_is_native_spin_unlock()) {
- start = start_lock_queued_spin_unlock;
- end = end_lock_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_def...
2018 Sep 08
2
[PATCH] x86/paravirt: Cleanup native_patch()
...unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(mmu, write_cr3);
#endif
#if defined(CONFIG_PARAVIRT_SPINLOCKS)
- case PARAVIRT_PATCH(lock.queued_spin_unlock):
- if (pv_is_native_spin_unlock()) {
- start = start_lock_queued_spin_unlock;
- end = end_lock_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_def...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...ns(ibuf, len, start, end);
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -58,27 +60,24 @@ unsigned native_patch(u8 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_pre...
2018 Sep 07
2
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...ns(ibuf, len, start, end);
+
switch (type) {
#ifdef CONFIG_PARAVIRT_XXL
PATCH_SITE(irq, irq_disable);
@@ -58,27 +60,24 @@ unsigned native_patch(u8 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_pre...
2018 Sep 11
1
[PATCH v2] x86/paravirt: Cleanup native_patch()
...unsigned native_patch(u8 type, void *ibuf, unsigned long addr, unsigned len)
PATCH_SITE(mmu, write_cr3);
#endif
#if defined(CONFIG_PARAVIRT_SPINLOCKS)
- case PARAVIRT_PATCH(lock.queued_spin_unlock):
- if (pv_is_native_spin_unlock()) {
- start = start_lock_queued_spin_unlock;
- end = end_lock_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);
+ break;
- case PARAVIRT_PATCH(lo...
2018 Sep 10
0
[PATCH] x86/paravirt: Cleanup native_patch()
...*ibuf, unsigned long addr, unsigned len)
> PATCH_SITE(mmu, write_cr3);
> #endif
> #if defined(CONFIG_PARAVIRT_SPINLOCKS)
> - case PARAVIRT_PATCH(lock.queued_spin_unlock):
> - if (pv_is_native_spin_unlock()) {
> - start = start_lock_queued_spin_unlock;
> - end = end_lock_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...
2018 Sep 08
0
[PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels
...switch (type) {
> #ifdef CONFIG_PARAVIRT_XXL
> PATCH_SITE(irq, irq_disable);
> @@ -58,27 +60,24 @@ unsigned native_patch(u8 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_preem...
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
From: Borislav Petkov <bp at suse.de>
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but that label can simply be removed by directly calling
paravirt_patch_insns() there.
Signed-off-by: Borislav Petkov
2018 Sep 07
2
[PATCH] x86/paravirt: Get rid of patch_site label
From: Borislav Petkov <bp at suse.de>
When CONFIG_PARAVIRT_SPINLOCKS=n, it fires
arch/x86/kernel/paravirt_patch_64.c: In function ?native_patch?:
arch/x86/kernel/paravirt_patch_64.c:89:1: warning: label ?patch_site? defined but not used [-Wunused-label]
patch_site:
but that label can simply be removed by directly calling
paravirt_patch_insns() there.
Signed-off-by: Borislav Petkov
2018 Sep 10
0
[PATCH] x86/paravirt: Cleanup native_patch()
...Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote:
>>> + 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...
2018 Aug 13
11
[PATCH v2 00/11] x86/paravirt: several cleanups
This series removes some no longer needed stuff from paravirt
infrastructure and puts large quantities of paravirt ops under a new
config option PARAVIRT_XXL which is selected by XEN_PV only.
A pvops kernel without XEN_PV being configured is about 2.5% smaller
with this series applied.
tip commit 5800dc5c19f34e6e03b5adab1282535cb102fafd ("x86/paravirt:
Fix spectre-v2 mitigations for