• Bibo Mao's avatar
    LoongArch: KVM: Add hypercall instruction emulation · 372631bb
    Bibo Mao authored
    On LoongArch system, there is a hypercall instruction special for
    virtualization. When system executes this instruction on host side,
    there is an illegal instruction exception reported, however it will
    trap into host when it is executed in VM mode.
    
    When hypercall is emulated, A0 register is set with value
    KVM_HCALL_INVALID_CODE, rather than inject EXCCODE_INE invalid
    instruction exception. So VM can continue to executing the next code.
    Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    372631bb
Kbuild 637 Bytes