From: Julien Grall <julien.grall@arm.com>
To: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
anna-maria@linutronix.de,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: KVM Arm64 and Linux-RT issues
Date: Sat, 27 Jul 2019 14:37:11 +0100 [thread overview]
Message-ID: <960b5ed1-6d0f-3cee-da37-6061b4946c1a@arm.com> (raw)
In-Reply-To: <86zhkzn319.wl-maz@kernel.org>
Hi,
On 7/27/19 12:13 PM, Marc Zyngier wrote:
> On Fri, 26 Jul 2019 23:58:38 +0100,
> Thomas Gleixner <tglx@linutronix.de> 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 softirq, but boy it
>>> breaks things.
>>>
>>> If this cannot be avoided, this means we can't cancel the background
>>> timer (which is used to emulate the vcpu timer while it is blocked
>>> waiting for an interrupt), then we must move this canceling to the point
>>> where the vcpu is unblocked (instead of scheduled), which may have some
>>> side effects -- I'll have a look.
>>>
>>> But that's not the only problem: We also have hrtimers used to emulate
>>> timers while the vcpu is running, and these timers are canceled in
>>> kvm_timer_vcpu_put(), which is also called from a preempt notifier.
>>> Unfortunately, I don't have a reasonable solution for that (other than
>>> putting this hrtimer_cancel in a workqueue and start chasing the
>>> resulting races).
>>
>> The fix is simple. See below. We'll add that to the next RT release. That
>> will take a while as I'm busy with posting RT stuff for upstream :)
>
> Ah, thanks for that! And yes, looking forward to RT upstream, it's
> just about time! ;-)
>
>>
>> Thanks,
>>
>> tglx
>>
>> 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)
>> {
>> hrtimer_start(hrt, ktime_add_ns(ktime_get(), ns),
>> - HRTIMER_MODE_ABS);
>> + HRTIMER_MODE_ABS_HARD);
>> }
>>
>
> That's pretty neat, and matches the patch you already have for
> x86. Feel free to add my
>
> Acked-by: Marc Zyngier <maz@kernel.org>
I can confirm the warning now disappeared. Feel free to added my tested-by:
Tested-by: Julien Grall <julien.grall@arm.com>
Thank you both for the help!
Cheers,
--
Julien Grall
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2019-07-27 13:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 17:58 KVM Arm64 and Linux-RT issues Julien Grall
2019-07-24 8:53 ` Marc Zyngier
2019-07-26 22:58 ` Thomas Gleixner
2019-07-27 11:13 ` Marc Zyngier
2019-07-27 13:37 ` Julien Grall [this message]
2019-08-13 12:58 ` bigeasy
2019-08-13 15:44 ` Julien Grall
2019-08-13 16:24 ` Marc Zyngier
2019-08-16 15:18 ` Julien Grall
2019-08-16 15:23 ` Sebastian Andrzej Siewior
2019-08-16 16:32 ` Julien Grall
2019-08-19 7:33 ` Sebastian Andrzej Siewior
2019-08-20 14:18 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=960b5ed1-6d0f-3cee-da37-6061b4946c1a@arm.com \
--to=julien.grall@arm.com \
--cc=anna-maria@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-rt-users@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).