arch/arm64/kvm/hyp_trace.c | 1 + 1 file changed, 1 insertion(+)
When disabling, hyp_trace_clock_enable() cancels the clock work but then
falls through into the enable path, which re-schedules it and marks the
clock running again, so the worker never stops. Return once the work is
cancelled.
Fixes: b22888917fa41 ("KVM: arm64: Sync boot clock with the nVHE/pKVM hyp")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/20260720172923.E4F161F000E9@smtp.kernel.org/
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
arch/arm64/kvm/hyp_trace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c
index 2411b4c32932c..27367843fd211 100644
--- a/arch/arm64/kvm/hyp_trace.c
+++ b/arch/arm64/kvm/hyp_trace.c
@@ -116,6 +116,7 @@ static void hyp_trace_clock_enable(struct hyp_trace_clock *hyp_clock, bool enabl
if (!enable) {
cancel_delayed_work_sync(&hyp_clock->work);
hyp_clock->running = false;
+ return;
}
ktime_get_snapshot_id(CLOCK_BOOTTIME, &snap);
base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
--
2.39.5
On Mon, Jul 20, 2026 at 07:48:50PM +0100, Fuad Tabba wrote:
> When disabling, hyp_trace_clock_enable() cancels the clock work but then
> falls through into the enable path, which re-schedules it and marks the
> clock running again, so the worker never stops. Return once the work is
> cancelled.
>
> Fixes: b22888917fa41 ("KVM: arm64: Sync boot clock with the nVHE/pKVM hyp")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/all/20260720172923.E4F161F000E9@smtp.kernel.org/
> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Done here already https://lore.kernel.org/all/alczBmnItMwq8xj4@google.com/
> ---
> arch/arm64/kvm/hyp_trace.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c
> index 2411b4c32932c..27367843fd211 100644
> --- a/arch/arm64/kvm/hyp_trace.c
> +++ b/arch/arm64/kvm/hyp_trace.c
> @@ -116,6 +116,7 @@ static void hyp_trace_clock_enable(struct hyp_trace_clock *hyp_clock, bool enabl
> if (!enable) {
> cancel_delayed_work_sync(&hyp_clock->work);
> hyp_clock->running = false;
> + return;
> }
>
> ktime_get_snapshot_id(CLOCK_BOOTTIME, &snap);
>
> base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
> --
> 2.39.5
>
On Mon, Jul 20, 2026 at 08:01:55PM +0100, Vincent Donnefort wrote:
> On Mon, Jul 20, 2026 at 07:48:50PM +0100, Fuad Tabba wrote:
> > When disabling, hyp_trace_clock_enable() cancels the clock work but then
> > falls through into the enable path, which re-schedules it and marks the
> > clock running again, so the worker never stops. Return once the work is
> > cancelled.
> >
> > Fixes: b22888917fa41 ("KVM: arm64: Sync boot clock with the nVHE/pKVM hyp")
> > Reported-by: Sashiko <sashiko-bot@kernel.org>
> > Closes: https://lore.kernel.org/all/20260720172923.E4F161F000E9@smtp.kernel.org/
> > Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
>
> Done here already https://lore.kernel.org/all/alczBmnItMwq8xj4@google.com/
sorry I meant here:
https://lore.kernel.org/all/20260715105100.3178255-1-vdonnefort@google.com/
>
> > ---
> > arch/arm64/kvm/hyp_trace.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c
> > index 2411b4c32932c..27367843fd211 100644
> > --- a/arch/arm64/kvm/hyp_trace.c
> > +++ b/arch/arm64/kvm/hyp_trace.c
> > @@ -116,6 +116,7 @@ static void hyp_trace_clock_enable(struct hyp_trace_clock *hyp_clock, bool enabl
> > if (!enable) {
> > cancel_delayed_work_sync(&hyp_clock->work);
> > hyp_clock->running = false;
> > + return;
> > }
> >
> > ktime_get_snapshot_id(CLOCK_BOOTTIME, &snap);
> >
> > base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
> > --
> > 2.39.5
> >
On Mon, 20 Jul 2026 at 20:03, Vincent Donnefort <vdonnefort@google.com> wrote:
>
> On Mon, Jul 20, 2026 at 08:01:55PM +0100, Vincent Donnefort wrote:
> > On Mon, Jul 20, 2026 at 07:48:50PM +0100, Fuad Tabba wrote:
> > > When disabling, hyp_trace_clock_enable() cancels the clock work but then
> > > falls through into the enable path, which re-schedules it and marks the
> > > clock running again, so the worker never stops. Return once the work is
> > > cancelled.
> > >
> > > Fixes: b22888917fa41 ("KVM: arm64: Sync boot clock with the nVHE/pKVM hyp")
> > > Reported-by: Sashiko <sashiko-bot@kernel.org>
> > > Closes: https://lore.kernel.org/all/20260720172923.E4F161F000E9@smtp.kernel.org/
> > > Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
> >
> > Done here already https://lore.kernel.org/all/alczBmnItMwq8xj4@google.com/
>
> sorry I meant here:
>
> https://lore.kernel.org/all/20260715105100.3178255-1-vdonnefort@google.com/
Thanks, and sorry for the noise!
/fuad
>
>
> >
> > > ---
> > > arch/arm64/kvm/hyp_trace.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c
> > > index 2411b4c32932c..27367843fd211 100644
> > > --- a/arch/arm64/kvm/hyp_trace.c
> > > +++ b/arch/arm64/kvm/hyp_trace.c
> > > @@ -116,6 +116,7 @@ static void hyp_trace_clock_enable(struct hyp_trace_clock *hyp_clock, bool enabl
> > > if (!enable) {
> > > cancel_delayed_work_sync(&hyp_clock->work);
> > > hyp_clock->running = false;
> > > + return;
> > > }
> > >
> > > ktime_get_snapshot_id(CLOCK_BOOTTIME, &snap);
> > >
> > > base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
> > > --
> > > 2.39.5
> > >
© 2016 - 2026 Red Hat, Inc.