Displaying 20 results from an estimated 26 matches for "raw_local_irq_save".
Did you mean:
__raw_local_irq_save
2020 Aug 11
3
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On 11.08.20 09:41, Peter Zijlstra wrote:
> On Fri, Aug 07, 2020 at 05:19:03PM +0200, Marco Elver wrote:
>
>> My hypothesis here is simply that kvm_wait() may be called in a place
>> where we get the same case I mentioned to Peter,
>>
>> raw_local_irq_save(); /* or other IRQs off without tracing */
>> ...
>> kvm_wait() /* IRQ state tracing gets confused */
>> ...
>> raw_local_irq_restore();
>>
>> and therefore, using raw variants in kvm_wait() works. It's also safe
>> because it doesn't call any o...
2020 Aug 11
3
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On 11.08.20 09:41, Peter Zijlstra wrote:
> On Fri, Aug 07, 2020 at 05:19:03PM +0200, Marco Elver wrote:
>
>> My hypothesis here is simply that kvm_wait() may be called in a place
>> where we get the same case I mentioned to Peter,
>>
>> raw_local_irq_save(); /* or other IRQs off without tracing */
>> ...
>> kvm_wait() /* IRQ state tracing gets confused */
>> ...
>> raw_local_irq_restore();
>>
>> and therefore, using raw variants in kvm_wait() works. It's also safe
>> because it doesn't call any o...
2020 Aug 11
2
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...1, Peter Zijlstra wrote:
>>> On Fri, Aug 07, 2020 at 05:19:03PM +0200, Marco Elver wrote:
>>>
>>>> My hypothesis here is simply that kvm_wait() may be called in a place
>>>> where we get the same case I mentioned to Peter,
>>>>
>>>> raw_local_irq_save(); /* or other IRQs off without tracing */
>>>> ...
>>>> kvm_wait() /* IRQ state tracing gets confused */
>>>> ...
>>>> raw_local_irq_restore();
>>>>
>>>> and therefore, using raw variants in kvm_wait() works. It's also...
2020 Aug 11
2
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...1, Peter Zijlstra wrote:
>>> On Fri, Aug 07, 2020 at 05:19:03PM +0200, Marco Elver wrote:
>>>
>>>> My hypothesis here is simply that kvm_wait() may be called in a place
>>>> where we get the same case I mentioned to Peter,
>>>>
>>>> raw_local_irq_save(); /* or other IRQs off without tracing */
>>>> ...
>>>> kvm_wait() /* IRQ state tracing gets confused */
>>>> ...
>>>> raw_local_irq_restore();
>>>>
>>>> and therefore, using raw variants in kvm_wait() works. It's also...
2020 Aug 11
0
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...gs. However, that was based on your pointer about kvm_wait(), and
>> I can't quite tell if it is the right solution.
>>
>> My hypothesis here is simply that kvm_wait() may be called in a place
>> where we get the same case I mentioned to Peter,
>>
>> raw_local_irq_save(); /* or other IRQs off without tracing */
>> ...
>> kvm_wait() /* IRQ state tracing gets confused */
>> ...
>> raw_local_irq_restore();
>>
>> and therefore, using raw variants in kvm_wait() works. It's also safe
>> b...
2020 Aug 05
9
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On Wed, Aug 05, 2020 at 03:59:40PM +0200, Marco Elver wrote:
> On Wed, Aug 05, 2020 at 03:42PM +0200, peterz at infradead.org wrote:
> > Shouldn't we __always_inline those? They're going to be really small.
>
> I can send a v2, and you can choose. For reference, though:
>
> ffffffff86271ee0 <arch_local_save_flags>:
> ffffffff86271ee0: 0f 1f 44 00 00
2020 Aug 05
9
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On Wed, Aug 05, 2020 at 03:59:40PM +0200, Marco Elver wrote:
> On Wed, Aug 05, 2020 at 03:42PM +0200, peterz at infradead.org wrote:
> > Shouldn't we __always_inline those? They're going to be really small.
>
> I can send a v2, and you can choose. For reference, though:
>
> ffffffff86271ee0 <arch_local_save_flags>:
> ffffffff86271ee0: 0f 1f 44 00 00
2020 Aug 06
0
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...> --- a/init/main.c
> +++ b/init/main.c
> @@ -1041,6 +1041,22 @@ asmlinkage __visible void __init start_kernel(void)
> sfi_init_late();
> kcsan_init();
>
> + /* DEBUG CODE */
> + lockdep_assert_irqs_enabled(); /* Pass. */
> + {
> + unsigned long flags1;
> + raw_local_irq_save(flags1);
This disables IRQs but doesn't trace..
> + {
> + unsigned long flags2;
> + lockdep_assert_irqs_enabled(); /* Pass - expectedly blind. */
Indeed, we didn't trace the above disable, so software state is still
on.
> + local_irq_save(flags2);
So here we save IRQ...
2020 Aug 11
3
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...s, the more
> problems I keep finding... bah bah bah.
That is, most of these irq-tracking problem are new because commit:
859d069ee1dd ("lockdep: Prepare for NMI IRQ state tracking")
changed irq-tracking to ignore the lockdep recursion count.
This then allows:
lock_acquire()
raw_local_irq_save();
current->lockdep_recursion++;
trace_lock_acquire()
... tracing ...
#PF under raw_local_irq_*()
__lock_acquire()
arch_spin_lock(&graph_lock)
pv-spinlock-wait()
local_irq_save() under raw_local_irq_*()
However afaict that just made a bad situation w...
2020 Aug 11
3
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...s, the more
> problems I keep finding... bah bah bah.
That is, most of these irq-tracking problem are new because commit:
859d069ee1dd ("lockdep: Prepare for NMI IRQ state tracking")
changed irq-tracking to ignore the lockdep recursion count.
This then allows:
lock_acquire()
raw_local_irq_save();
current->lockdep_recursion++;
trace_lock_acquire()
... tracing ...
#PF under raw_local_irq_*()
__lock_acquire()
arch_spin_lock(&graph_lock)
pv-spinlock-wait()
local_irq_save() under raw_local_irq_*()
However afaict that just made a bad situation w...
2020 Aug 11
0
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
On Fri, Aug 07, 2020 at 05:19:03PM +0200, Marco Elver wrote:
> My hypothesis here is simply that kvm_wait() may be called in a place
> where we get the same case I mentioned to Peter,
>
> raw_local_irq_save(); /* or other IRQs off without tracing */
> ...
> kvm_wait() /* IRQ state tracing gets confused */
> ...
> raw_local_irq_restore();
>
> and therefore, using raw variants in kvm_wait() works. It's also safe
> because it doesn't call any other libraries that would r...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 12/17] paravirt_ops - interrupt/exception changes
...signed long __raw_local_
return flags;
}
-#define raw_local_save_flags(flags) \
- do { (flags) = __raw_local_save_flags(); } while (0)
static inline void raw_local_irq_restore(unsigned long flags)
{
@@ -100,8 +107,6 @@ static inline unsigned long __raw_local_
return flags;
}
-#define raw_local_irq_save(flags) \
- do { (flags) = __raw_local_irq_save(); } while (0)
static inline int raw_irqs_disabled(void)
{
@@ -128,6 +133,7 @@ static inline void halt(void)
__asm__ __volatile__("hlt": : :"memory");
}
+#endif /* CONFIG_PARAVIRT */
#else /* __ASSEMBLY__: */
# ifdef CON...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 12/17] paravirt_ops - interrupt/exception changes
...signed long __raw_local_
return flags;
}
-#define raw_local_save_flags(flags) \
- do { (flags) = __raw_local_save_flags(); } while (0)
static inline void raw_local_irq_restore(unsigned long flags)
{
@@ -100,8 +107,6 @@ static inline unsigned long __raw_local_
return flags;
}
-#define raw_local_irq_save(flags) \
- do { (flags) = __raw_local_irq_save(); } while (0)
static inline int raw_irqs_disabled(void)
{
@@ -128,6 +133,7 @@ static inline void halt(void)
__asm__ __volatile__("hlt": : :"memory");
}
+#endif /* CONFIG_PARAVIRT */
#else /* __ASSEMBLY__: */
# ifdef CON...
2020 Aug 11
0
[PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
...1.08.20 09:41, Peter Zijlstra wrote:
> > On Fri, Aug 07, 2020 at 05:19:03PM +0200, Marco Elver wrote:
> >
> > > My hypothesis here is simply that kvm_wait() may be called in a place
> > > where we get the same case I mentioned to Peter,
> > >
> > > raw_local_irq_save(); /* or other IRQs off without tracing */
> > > ...
> > > kvm_wait() /* IRQ state tracing gets confused */
> > > ...
> > > raw_local_irq_restore();
> > >
> > > and therefore, using raw variants in kvm_wait() works. It's also safe
>...
2007 Oct 31
3
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Consolidation part
Hi folks,
Here is the result of the latest work on the pvops front, after the x86
arch merge. From the functionality point of view, almost nothing was
changed, except for proper vsmp support - which was discussed, but not
implemented before - and the introduction of smp_ops in x86_64, which eased
the merging of the smp header.
Speaking of the merge, a significant part (although not majority) of
2007 Oct 31
3
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Consolidation part
Hi folks,
Here is the result of the latest work on the pvops front, after the x86
arch merge. From the functionality point of view, almost nothing was
changed, except for proper vsmp support - which was discussed, but not
implemented before - and the introduction of smp_ops in x86_64, which eased
the merging of the smp header.
Speaking of the merge, a significant part (although not majority) of
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...ot;);
-}
static inline int raw_irqs_disabled_flags(unsigned long flags)
{
@@ -76,18 +26,6 @@ static inline int raw_irqs_disabled(void
unsigned long flags = __raw_local_save_flags();
return raw_irqs_disabled_flags(flags);
-}
-
-/*
- * For spinlocks, etc:
- */
-static inline unsigned long __raw_local_irq_save(void)
-{
- unsigned long flags = __raw_local_save_flags();
-
- raw_local_irq_disable();
-
- return flags;
}
#define raw_local_irq_save(flags) \
===================================================================
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -20,6 +20,...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...ot;);
-}
static inline int raw_irqs_disabled_flags(unsigned long flags)
{
@@ -76,18 +26,6 @@ static inline int raw_irqs_disabled(void
unsigned long flags = __raw_local_save_flags();
return raw_irqs_disabled_flags(flags);
-}
-
-/*
- * For spinlocks, etc:
- */
-static inline unsigned long __raw_local_irq_save(void)
-{
- unsigned long flags = __raw_local_save_flags();
-
- raw_local_irq_disable();
-
- return flags;
}
#define raw_local_irq_save(flags) \
===================================================================
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -20,6 +20,...
2007 Apr 18
5
[PATCH] paravirt.h
...NABLE_INTERRUPTS_SYSEXIT sti; sysexit
+#define INTERRUPT_RETURN iret
+#define GET_CR0_INTO_EAX movl %cr0, %eax
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_PARAVIRT */
+
+#ifndef __ASSEMBLY__
+#define raw_local_save_flags(flags) \
+ do { (flags) = __raw_local_save_flags(); } while (0)
+
#define raw_local_irq_save(flags) \
do { (flags) = __raw_local_irq_save(); } while (0)
+static inline int raw_irqs_disabled_flags(unsigned long flags)
+{
+ return !(flags & (1 << 9));
+}
+
+static inline int raw_irqs_disabled(void)
+{
+ unsigned long flags = __raw_local_save_flags();
+
+ return raw_irqs_disabl...
2007 Apr 18
5
[PATCH] paravirt.h
...NABLE_INTERRUPTS_SYSEXIT sti; sysexit
+#define INTERRUPT_RETURN iret
+#define GET_CR0_INTO_EAX movl %cr0, %eax
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_PARAVIRT */
+
+#ifndef __ASSEMBLY__
+#define raw_local_save_flags(flags) \
+ do { (flags) = __raw_local_save_flags(); } while (0)
+
#define raw_local_irq_save(flags) \
do { (flags) = __raw_local_irq_save(); } while (0)
+static inline int raw_irqs_disabled_flags(unsigned long flags)
+{
+ return !(flags & (1 << 9));
+}
+
+static inline int raw_irqs_disabled(void)
+{
+ unsigned long flags = __raw_local_save_flags();
+
+ return raw_irqs_disabl...