summaryrefslogtreecommitdiffstats
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-04-24 20:15:52 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2025-04-26 09:58:13 +0800
commit9ea86232a5520d9d21832d06031ea80f055a6ff8 (patch)
tree9ba8eda88f60d8dacea3dff6dd7f53bbb2f8351d /rust/helpers/task.c
parent8b2d01fec800081dd68271c01e4d239ef4d7115e (diff)
downloadlinux-9ea86232a5520d9d21832d06031ea80f055a6ff8.tar.gz
linux-9ea86232a5520d9d21832d06031ea80f055a6ff8.tar.bz2
linux-9ea86232a5520d9d21832d06031ea80f055a6ff8.zip
LoongArch: KVM: Fully clear some CSRs when VM reboot
Some registers such as LOONGARCH_CSR_ESTAT and LOONGARCH_CSR_GINTC are partly cleared with function _kvm_setcsr(). This comes from the hardware specification, some bits are read only in VM mode, and however they can be written in host mode. So they are partly cleared in VM mode, and can be fully cleared in host mode. These read only bits show pending interrupt or exception status. When VM reset, the read-only bits should be cleared, otherwise vCPU will receive unknown interrupts in boot stage. Here registers LOONGARCH_CSR_ESTAT/LOONGARCH_CSR_GINTC are fully cleared in ioctl KVM_REG_LOONGARCH_VCPU_RESET vCPU reset path. Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions