public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] genirq and Hyper-V: Clean up handling of add_interrupt_randomness()
@ 2026-04-02 20:23 Michael Kelley
  2026-04-02 20:23 ` [PATCH 1/2] genirq/chip: Do add_interrupt_randomness() in handle_percpu_devid_irq() Michael Kelley
  2026-04-02 20:24 ` [PATCH 2/2] Drivers: hv: Move add_interrupt_randomness() to hypervisor callback sysvec Michael Kelley
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Kelley @ 2026-04-02 20:23 UTC (permalink / raw)
  To: kys, haiyangz, wei.liu, decui, longli, tglx, mingo, bp,
	dave.hansen, hpa, maz, bigeasy, x86, linux-kernel, linux-hyperv

From: Michael Kelley <mhklinux@outlook.com>

The Hyper-V ISRs are calling add_interrupt_randomness() as a
primary source of entropy in VMs, since the VMs don't have another
good source. The call is currently in the ISRs as a common place to
handle both x86/x64 and arm64. On x86/x64, hypervisor interrupts come
through a custom sysvec entry, and on arm64 they come through an
emulated GICv3. GICv3 uses the generic handler handle_percpu_devid_irq(),
which does not do add_interrupt_randomness(), unlike its counterpart
handle_percpu_irq().

Cleanup this somewhat confusing situation by doing the
add_interrupt_randomness() in handle_percpu_devid_irq(), and remove
it from the Hyper-V ISRs. Then only the Hyper-V custom sysvec path,
which plays the role of a generic interrupt handler, needs to do
add_interrupt_randomness(). As a result of this change, no
device drivers are calling add_interrupt_randomness(), which is
appropriate.

The change is broken into two patches since it spans generic
interrupt handling code and Hyper-V specific code. But the two
patches should be taken together through the same tree. It's
OK to have a bisect window where add_interrupt_randomness() is
done in both places, but taking the Hyper-V patch first could leave
a bisect window where add_interrupt_randomness() is not done in
either place.

Michael Kelley (2):
  genirq/chip: Do add_interrupt_randomness() in
    handle_percpu_devid_irq()
  Drivers: hv: Move add_interrupt_randomness() to hypervisor callback
    sysvec

 arch/x86/kernel/cpu/mshyperv.c | 2 ++
 drivers/hv/mshv_synic.c        | 3 ---
 drivers/hv/vmbus_drv.c         | 3 ---
 kernel/irq/chip.c              | 3 +++
 4 files changed, 5 insertions(+), 6 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-04 19:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 20:23 [PATCH 0/2] genirq and Hyper-V: Clean up handling of add_interrupt_randomness() Michael Kelley
2026-04-02 20:23 ` [PATCH 1/2] genirq/chip: Do add_interrupt_randomness() in handle_percpu_devid_irq() Michael Kelley
2026-04-02 21:11   ` [tip: irq/core] genirq/chip: Invoke " tip-bot2 for Michael Kelley
2026-04-02 20:24 ` [PATCH 2/2] Drivers: hv: Move add_interrupt_randomness() to hypervisor callback sysvec Michael Kelley
2026-04-02 21:07   ` Thomas Gleixner
2026-04-04  6:11   ` Wei Liu
2026-04-04 19:05   ` [tip: irq/core] " tip-bot2 for Michael Kelley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox