Re: [PATCH v5 3/4] KVM: s390: Change the fi->lock to a raw_spinlock for RT case
From: Heiko Carstens
Date: Fri May 08 2026 - 06:28:18 EST
On Thu, May 07, 2026 at 10:46:44PM -0400, Douglas Freimuth wrote:
> > Rationale: even though it is not relevant for s390, we also change common
> > code; and by ignoring PROVE_RAW_LOCK_NESTING we might cause problems for
> > other architectures by introducing incorrect nesting of locks in common
> > code. So yes, your thinking is correct.
>
> Heiko, to be complete, I went through the exercise of enabling
> PROVE_RAW_LOCK_NESTING. I created a small hack to generate a
> __deliver_machine_check to trap the nested locking issue. The requested
> splat is below. Here the floating interrupt lock is a raw_spin_lock and the
> nested call to local interrupt lock is a spin_lock thus the nesting issue.
> No other nesting issues were found.
>
> Now we need to arrive at, do we keep the raw_spin_locks to cover the
> possibility of future RT support or common code? In that case I also make
> the li->lock a raw_spin_lock. OR should I drop this raw_spin_lock patch and
> back out any other raw_spin_locks since we dont currently support RT on
> s390? And end either choice by testing again with PROVE_RAW_LOCK_NESTING.
Doug, we are going to enable PROVE_RAW_LOCK_NESTING in our debug_defconfig for
the reasons I tried to outline above.
Or in other words: you need to convert li->lock too, since we want our code in
a way that it doesn't trigger any lockdep splats, regardless if s390 will or
will not support RT.