LoongArch: KVM: Add LSX (128bit SIMD) support
authorTianrui Zhao <zhaotianrui@loongson.cn>
Tue, 19 Dec 2023 02:48:28 +0000 (10:48 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 19 Dec 2023 02:48:28 +0000 (10:48 +0800)
commitdb1ecca22edf27c5a3dd66af406c88b5b5ac7cc1
tree41c21e4c7fe4ed5f984834f148397e10cca7ae65
parent5b3d524993ff1fb36089be850ccb121ac3296bcf
LoongArch: KVM: Add LSX (128bit SIMD) support

This patch adds LSX (128bit SIMD) support for LoongArch KVM.

There will be LSX exception in KVM when guest use the LSX instructions.
KVM will enable LSX and restore the vector registers for guest and then
return to guest to continue running.

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/kvm_host.h
arch/loongarch/include/asm/kvm_vcpu.h
arch/loongarch/include/uapi/asm/kvm.h
arch/loongarch/kernel/fpu.S
arch/loongarch/kvm/exit.c
arch/loongarch/kvm/switch.S
arch/loongarch/kvm/trace.h
arch/loongarch/kvm/vcpu.c