From: George Guo <[email protected]> QEMU's LoongArch virt machine has no i8042 PS/2 controller. When PNP detection finds nothing, i8042_init() falls back to probing the ports directly. On LoongArch the I/O ports are memory-mapped, and the i8042 port addresses are not backed by any device on the virt machine, so i8042_flush() takes a page fault and the kernel panics:
i8042: PNP: No PS/2 controller found. i8042: Probing ports directly. CPU 0 Unable to handle kernel paging request at virtual address ffff800000008064 ERA: i8042_flush+0x50/0x198 RA: i8042_init+0x2a8/0x35c Kernel panic - not syncing: Attempted to kill init! Disable SERIO_I8042 and its dependents (KEYBOARD_ATKBD, MOUSE_PS2) in the QEMU_KCONFIG fragment to prevent the driver from being built. Signed-off-by: George Guo <[email protected]> --- tools/testing/selftests/kho/loongarch.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/kho/loongarch.conf b/tools/testing/selftests/kho/loongarch.conf index b0551e0c2d77..0145cb49e5b2 100644 --- a/tools/testing/selftests/kho/loongarch.conf +++ b/tools/testing/selftests/kho/loongarch.conf @@ -2,6 +2,9 @@ QEMU_CMD="qemu-system-loongarch64 -M virt -cpu la464" QEMU_KCONFIG=" CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_MOUSE_PS2 is not set +# CONFIG_SERIO_I8042 is not set " KERNEL_IMAGE="vmlinux.efi" KERNEL_CMDLINE="console=ttyS0 earlycon" -- 2.25.1

