PIC probing code from e179f6914152 failing

From: Mario Limonciello
Date: Wed Oct 18 2023 - 14:50:45 EST


Hi,

Recently an issue was reported to Bugzilla [1] that the Keyboard (IRQ 1) and GPIO controller (IRQ 7) weren't working properly on two separate Lenovo machines. The issues are unique to Linux.

In digging through them, they happen because Lenovo didn't set up the PIC in the BIOS.
Specifically the PIC probing code introduced by e179f6914152 ("x86, irq, pic: Probe for legacy PIC and set legacy_pic appropriately") expects that the BIOS sets up the PIC and uses that assertion to let Linux set it up.

One of the reporters confirmed that reverting e179f6914152 fixes the issue. Keyboard and GPIO controller both work properly.

I wanted to ask if we can please revert that and come up with a different solution for kexec with HyperV.
Can guests instead perhaps detect in early boot code they're running in an EFI based hypervisor and explicitly set 'legacy_pic = &null_legacy_pic;'?

[1] https://bugzilla.kernel.org/show_bug.cgi?id=218003

Thanks,