mbox series

[0/3] LoongArch: KVM: Add Binary Translation extension support

Message ID 20240513011235.3233776-1-maobibo@loongson.cn (mailing list archive)
Headers show
Series LoongArch: KVM: Add Binary Translation extension support | expand

Message

mao bibo May 13, 2024, 1:12 a.m. UTC
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 late enabling method is used for LBT. LBT context
is saved/restored on vcpu context switch path.

Also this patch set BT capability detection, and BT register get/set
interface for userspace vmm, so that vm supports migration with BT
extension.

Bibo Mao (3):
  LoongArch: KVM: Add HW Binary Translation extension support
  LoongArch: KVM: Add LBT feature detection with cpucfg
  LoongArch: KVM: Add vm migration support for LBT feature

 arch/loongarch/include/asm/kvm_host.h |   8 ++
 arch/loongarch/include/asm/kvm_vcpu.h |  10 ++
 arch/loongarch/include/uapi/asm/kvm.h |   7 ++
 arch/loongarch/kvm/exit.c             |   9 ++
 arch/loongarch/kvm/vcpu.c             | 168 +++++++++++++++++++++++++-
 5 files changed, 201 insertions(+), 1 deletion(-)

base-commit: f4345f05c0dfc73c617e66f3b809edb8ddd41075