]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: KVM: Fix max supported vCPUs set with EIOINTC
authorBibo Mao <maobibo@loongson.cn>
Sun, 9 Nov 2025 08:02:09 +0000 (16:02 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Mon, 10 Nov 2025 00:37:07 +0000 (08:37 +0800)
commit237e74bfa261fb0cf75bd08c9be0c5094018ee20
treec9732344a0f15e15087493b1af0eee10f3083d13
parent11f340ece403e71aa2b643a2562a58ed3ac12e2c
LoongArch: KVM: Fix max supported vCPUs set with EIOINTC

VM fails to boot with 256 vCPUs, the detailed command is

  qemu-system-loongarch64 -smp 256

and there is an error reported as follows:

  KVM_LOONGARCH_EXTIOI_INIT_NUM_CPU failed: Invalid argument

There is typo issue in function kvm_eiointc_ctrl_access() when set
max supported vCPUs.

Cc: stable@vger.kernel.org
Fixes: 47256c4c8b1b ("LoongArch: KVM: Avoid copy_*_user() with lock hold in kvm_eiointc_ctrl_access()")
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/intc/eiointc.c