]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: KVM: Set default return value in KVM IO bus ops
authorBibo Mao <maobibo@loongson.cn>
Fri, 6 Feb 2026 01:28:00 +0000 (09:28 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 6 Feb 2026 01:28:00 +0000 (09:28 +0800)
commit2faec60a4858bd7fe1bc1419963c6bf030e85706
tree888794927fa1fe5ae1861d955b88148219eb16a9
parent382c38c9ec94fe87ffd6c9b456fa8ce67943cf1b
LoongArch: KVM: Set default return value in KVM IO bus ops

When in-kernel irqchip is enabled, its register area is registered in
the KVM IO bus list with API kvm_io_bus_register_dev(). In MMIO/IOCSR
register access emulation, kvm_io_bus_read()/kvm_io_bus_write() is
called firstly. If it returns 0, it means that the in-kernel irqchip
handles the emulation already, else it returns to user-mode VMM and
lets VMM emulate the register access.

Once in-kernel irqchip is enabled, it should return 0 if the address
is within range of the registered KVM IO bus. It should not return to
user-mode VMM since VMM does not know how to handle it, and irqchip is
handled in kernel already.

Here set default return value with 0 in KVM IO bus operations.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/intc/eiointc.c
arch/loongarch/kvm/intc/ipi.c
arch/loongarch/kvm/intc/pch_pic.c