]> www.infradead.org Git - users/jedix/linux-maple.git/commit
LoongArch: KVM: Add Binary Translation extension support
authorBibo Mao <maobibo@loongson.cn>
Wed, 11 Sep 2024 15:26:32 +0000 (23:26 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 11 Sep 2024 15:26:32 +0000 (23:26 +0800)
commitb67ee19a907ddb7dab8b1bb4b35659d8372bfc46
tree007a49ff4412cd95a293e55629270d4c854501a5
parenta53f48b6327c12437c9f429da2283e526eda2362
LoongArch: KVM: Add Binary Translation extension support

Loongson Binary Translation (LBT) is used to accelerate binary translation,
which contains 4 scratch registers (scr0 to scr3), x86/ARM eflags (eflags)
and x87 fpu stack pointer (ftop).

Like FPU extension, here a lazy enabling method is used for LBT. the LBT
context is saved/restored on the vcpu context switch path.

Signed-off-by: Bibo Mao <maobibo@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/kvm/exit.c
arch/loongarch/kvm/vcpu.c