All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Michael Kelley <mhklinux@outlook.com>,
	Marc Zyngier <maz@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: Question: interrupt randomness and handle_percpu_devid_irq()
Date: Fri, 20 Mar 2026 16:10:37 +0100	[thread overview]
Message-ID: <87bjgik042.ffs@tglx> (raw)
In-Reply-To: <SN6PR02MB41577F8265CA23C3027364F7D44FA@SN6PR02MB4157.namprd02.prod.outlook.com>

On Thu, Mar 19 2026 at 19:34, Michael Kelley wrote:
> The function header comment for handle_percpu_devid_irq() says that it is the
> same as handle_percpu_irq(), but with the addition of a pointer to a percpu
> variable with the real device id. That makes sense. But there's another difference:
> handle_percpu_irq() calls add_interrupt_randomness() [via handle_irq_event_percpu()],
> while handle_percpu_devid_irq() does not.
>
> Question: Is there a reason for this difference in handling interrupt randomness?
> Or is it just an oversight? handle_percpu_devid_irq() is used, for example, for the
> SGIs and PPIs on the GICv3 chip, so I wondered if IPIs (as built on SGIs) & PPIs
> specifically did not want the overhead of add_interrupt_randomness(). But then
> GICv5 is doing IPIs using LPIs, which use handle_percpu_irq() and hence *do*
> add interrupt randomness. That seemed inconsistent, which didn't help provide
> an answer.
>
> The question arises in the context of Linux guests running on Hyper-V. Hyper-V
> VMBus interrupts to the guest are per-CPU interrupts in Linux, using a PPI on
> arm64. So these interrupts do not call add_interrupt_randomness(), which is a
> problem because these guests don't have much other way to get entropy. To
> fix this, the VMBus ISR has always had an explicit call to
> add_interrupt_randomness(). But maybe that's not the best approach, and
> handle_percpu_devid_irq() should be fixed to call add_interrupt_randomness().

I don't think there is a real good reason unless any of those interrupts
is NMI like.

Thanks,

        tglx


  reply	other threads:[~2026-03-20 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 19:34 Question: interrupt randomness and handle_percpu_devid_irq() Michael Kelley
2026-03-20 15:10 ` Thomas Gleixner [this message]
2026-04-01 14:14   ` Sebastian Andrzej Siewior
2026-04-01 14:33     ` Michael Kelley
2026-04-01 14:34       ` Sebastian Andrzej Siewior

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=87bjgik042.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=jan.kiszka@siemens.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=mhklinux@outlook.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.