Re: KVM Arm64 and Linux-RT issues

2019-08-20 Thread Julien Grall
Hi Sebastian, On 19/08/2019 08:33, Sebastian Andrzej Siewior wrote: On 2019-08-16 17:32:38 [+0100], Julien Grall wrote: Hi Sebastian, Hi Julien, hrtimer_callback_running() will be returning true as the callback is running somewhere else. This means hrtimer_try_to_cancel() would return -1.

Re: KVM Arm64 and Linux-RT issues

2019-08-19 Thread Sebastian Andrzej Siewior
On 2019-08-16 17:32:38 [+0100], Julien Grall wrote: > Hi Sebastian, Hi Julien, > hrtimer_callback_running() will be returning true as the callback is > running somewhere else. This means hrtimer_try_to_cancel() > would return -1. Therefore hrtimer_grab_expiry_lock() would > be called. > > Did I

Re: KVM Arm64 and Linux-RT issues

2019-08-16 Thread Julien Grall
Hi Sebastian, On 16/08/2019 16:23, Sebastian Andrzej Siewior wrote: > On 2019-08-16 16:18:20 [+0100], Julien Grall wrote: >> Sadly, I managed to hit the same BUG_ON() today with this patch >> applied on top v5.2-rt1-rebase. :/ Although, it is more difficult >> to hit than previously. >> >> [

Re: KVM Arm64 and Linux-RT issues

2019-08-16 Thread Sebastian Andrzej Siewior
On 2019-08-16 16:18:20 [+0100], Julien Grall wrote: > Sadly, I managed to hit the same BUG_ON() today with this patch > applied on top v5.2-rt1-rebase. :/ Although, it is more difficult > to hit than previously. > > [ 157.449545] 000: BUG: sleeping function called from invalid context at >

Re: KVM Arm64 and Linux-RT issues

2019-08-16 Thread Julien Grall
Hi all, On 13/08/2019 17:24, Marc Zyngier wrote: > On Tue, 13 Aug 2019 16:44:21 +0100, > Julien Grall wrote: >> >> Hi Sebastian, >> >> On 8/13/19 1:58 PM, bige...@linutronix.de wrote: >>> On 2019-07-27 14:37:11 [+0100], Julien Grall wrote: >> 8< >> ---

Re: KVM Arm64 and Linux-RT issues

2019-08-13 Thread Marc Zyngier
On Tue, 13 Aug 2019 16:44:21 +0100, Julien Grall wrote: > > Hi Sebastian, > > On 8/13/19 1:58 PM, bige...@linutronix.de wrote: > > On 2019-07-27 14:37:11 [+0100], Julien Grall wrote: > 8< > --- a/virt/kvm/arm/arch_timer.c > +++ b/virt/kvm/arm/arch_timer.c > @@

Re: KVM Arm64 and Linux-RT issues

2019-08-13 Thread Julien Grall
Hi Sebastian, On 8/13/19 1:58 PM, bige...@linutronix.de wrote: On 2019-07-27 14:37:11 [+0100], Julien Grall wrote: 8< --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c @@ -80,7 +80,7 @@ static inline bool userspace_irqchip(str static void soft_timer_start(struct

Re: KVM Arm64 and Linux-RT issues

2019-08-13 Thread bige...@linutronix.de
On 2019-07-27 14:37:11 [+0100], Julien Grall wrote: > > > 8< > > > --- a/virt/kvm/arm/arch_timer.c > > > +++ b/virt/kvm/arm/arch_timer.c > > > @@ -80,7 +80,7 @@ static inline bool userspace_irqchip(str > > > static void soft_timer_start(struct hrtimer *hrt, u64 ns) > > > { > > >

Re: KVM Arm64 and Linux-RT issues

2019-07-27 Thread Julien Grall
Hi, On 7/27/19 12:13 PM, Marc Zyngier wrote: On Fri, 26 Jul 2019 23:58:38 +0100, Thomas Gleixner wrote: On Wed, 24 Jul 2019, Marc Zyngier wrote: On 23/07/2019 18:58, Julien Grall wrote: It really feels like a change in hrtimer_cancel semantics. From what I understand, this is used to avoid

Re: KVM Arm64 and Linux-RT issues

2019-07-27 Thread Marc Zyngier
Hi Thomas, On Fri, 26 Jul 2019 23:58:38 +0100, Thomas Gleixner wrote: > > On Wed, 24 Jul 2019, Marc Zyngier wrote: > > On 23/07/2019 18:58, Julien Grall wrote: > > It really feels like a change in hrtimer_cancel semantics. From what I > > understand, this is used to avoid racing against the

Re: KVM Arm64 and Linux-RT issues

2019-07-26 Thread Thomas Gleixner
On Wed, 24 Jul 2019, Marc Zyngier wrote: > On 23/07/2019 18:58, Julien Grall wrote: > It really feels like a change in hrtimer_cancel semantics. From what I > understand, this is used to avoid racing against the softirq, but boy it > breaks things. > > If this cannot be avoided, this means we

Re: KVM Arm64 and Linux-RT issues

2019-07-24 Thread Marc Zyngier
Julien, On 23/07/2019 18:58, Julien Grall wrote: > Hi all, > > I have been playing with the latest branch of Linux RT (5.2-rt1) and notice > the > following splat when starting a KVM guest. > > [ 122.336254] 003: BUG: sleeping function called from invalid context at >

KVM Arm64 and Linux-RT issues

2019-07-23 Thread Julien Grall
Hi all, I have been playing with the latest branch of Linux RT (5.2-rt1) and notice the following splat when starting a KVM guest. [ 122.336254] 003: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:968 [ 122.336263] 003: in_atomic(): 1, irqs_disabled(): 0,