Re: IRQ thread timeouts and affinity

From: Jon Hunter
Date: Fri Oct 10 2025 - 11:54:38 EST



On 10/10/2025 15:54, Thierry Reding wrote:
On Fri, Oct 10, 2025 at 03:38:59PM +0100, Jon Hunter wrote:

On 10/10/2025 15:18, Marc Zyngier wrote:

...

CPU hotplug is the main area of concern, and I'm pretty sure it breaks
this distribution mechanism (or the other way around). Another thing
is that if firmware isn't aware that 1:N interrupts can (or should)
wake-up a CPU from sleep, bad things will happen. Given that nobody
uses 1:N, you can bet that any bit of privileged SW (TF-A,
hypervisors) is likely to be buggy (I've already spotted bugs in KVM
around this).

Thierry, do we ever hotplug CPUs on this device? If not, I am wondering if
something like this, for now, could only be enabled for devices that don't
hotplug CPUs. Maybe tied to the kernel config (ie. CONFIG_HOTPLUG_CPU)? Just
a thought ...

I've only had limited exposure to this, so I don't know all of the use-
cases. People can buy these devices and do anything they want with it,
so I think we have to account for the general case.

Yes, but the point I was trying to make that you can prevent this from being used if CPU hotplug is enabled in the kernel and initially limit to configurations where this feature would/could be enabled. So you take CPU hotplug out of the equation (initially). Of course someone can hack the kernel and do what they want, but there is nothing you can do about that.

Jon

--
nvpublic