All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Douglas Freimuth <freimuth@linux.ibm.com>
Cc: Matthew Rosato <mjrosato@linux.ibm.com>,
	borntraeger@linux.ibm.com, imbrenda@linux.ibm.com,
	frankja@linux.ibm.com, david@kernel.org, gor@linux.ibm.com,
	agordeev@linux.ibm.com, svens@linux.ibm.com, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v5 3/4] KVM: s390: Change the fi->lock to a raw_spinlock for RT case
Date: Fri, 8 May 2026 12:27:48 +0200	[thread overview]
Message-ID: <20260508102748.21624A65-hca@linux.ibm.com> (raw)
In-Reply-To: <a2a8205a-18b0-46d2-8334-c59d08bad61e@linux.ibm.com>

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.

  reply	other threads:[~2026-05-08 10:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 17:37 [PATCH v5 0/4] KVM: s390: Introducing kvm_arch_set_irq_inatomic Fast Inject Douglas Freimuth
2026-05-05 17:37 ` [PATCH v5 1/4] KVM: s390: Add map/unmap ioctl and clean mappings post-guest Douglas Freimuth
2026-05-05 17:37 ` [PATCH v5 2/4] KVM: s390: Enable adapter_indicators_set to use mapped pages Douglas Freimuth
2026-05-05 17:37 ` [PATCH v5 3/4] KVM: s390: Change the fi->lock to a raw_spinlock for RT case Douglas Freimuth
2026-05-06  4:57   ` Heiko Carstens
2026-05-06 14:50     ` Douglas Freimuth
2026-05-07  9:56       ` Heiko Carstens
2026-05-07 13:17         ` Matthew Rosato
2026-05-07 14:45           ` Heiko Carstens
2026-05-07 14:49             ` Peter Zijlstra
2026-05-08  2:46             ` Douglas Freimuth
2026-05-08 10:27               ` Heiko Carstens [this message]
2026-05-05 17:37 ` [PATCH v5 4/4] KVM: s390: Introducing kvm_arch_set_irq_inatomic fast inject Douglas Freimuth

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=20260508102748.21624A65-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@kernel.org \
    --cc=frankja@linux.ibm.com \
    --cc=freimuth@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=svens@linux.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.