]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: KVM: Move host CSR_EENTRY save and restore in context switch
authorBibo Mao <maobibo@loongson.cn>
Thu, 9 Apr 2026 10:56:36 +0000 (18:56 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 9 Apr 2026 10:56:36 +0000 (18:56 +0800)
commitf62eb9ca8def410bcef39e8909945409d0968473
tree4033376a9601742d2936fee5c82ea98be25bf707
parent14d2714d6537a9df5bea2515185034dbb9d30f03
LoongArch: KVM: Move host CSR_EENTRY save and restore in context switch

CSR register LOONGARCH_CSR_EENTRY is shared between host CPU and guest
vCPU, KVM need save and restore LOONGARCH_CSR_EENTRY register. Here move
LOONGARCH_CSR_EENTRY saving in to context switch function rather than VM
entry.

At most time VM enter/exit is much more frequent than vCPU thread context
switch.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/vcpu.c