• Bibo Mao's avatar
    LoongArch: KVM: Add vm migration support for LBT registers · acc7f20d
    Bibo Mao authored
    Every vcpu has separate LBT registers. And there are four scr registers,
    one flags and ftop register for LBT extension. When VM migrates, VMM
    needs to get LBT registers for every vcpu.
    
    Here macro KVM_REG_LOONGARCH_LBT is added for new vcpu lbt register type,
    the following macro is added to get/put LBT registers.
      KVM_REG_LOONGARCH_LBT_SCR0
      KVM_REG_LOONGARCH_LBT_SCR1
      KVM_REG_LOONGARCH_LBT_SCR2
      KVM_REG_LOONGARCH_LBT_SCR3
      KVM_REG_LOONGARCH_LBT_EFLAGS
      KVM_REG_LOONGARCH_LBT_FTOP
    Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    acc7f20d
vcpu.c 38 KB