LoongArch: KVM: Add LASX (256bit 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)
commit118e10cd893d57df55b3302dfd188a981b6e6d1c
tree43f25b27af229cc68bdc42dc3d874a0b8e4e510f
parentdb1ecca22edf27c5a3dd66af406c88b5b5ac7cc1
LoongArch: KVM: Add LASX (256bit SIMD) support

This patch adds LASX (256bit SIMD) support for LoongArch KVM.

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

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
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/kernel/fpu.S
arch/loongarch/kvm/exit.c
arch/loongarch/kvm/switch.S
arch/loongarch/kvm/trace.h
arch/loongarch/kvm/vcpu.c