Skip to content

Commit b99f783

Browse files
bibo-maochenhuacai
authored andcommitted
LoongArch: KVM: Remove unnecessary CSR register saving during enter guest
Some CSR registers like CRMD/PRMD are saved during enter VM mode now. However they are not restored for actual use, so saving for these CSR registers can be removed. Reviewed-by: Tianrui Zhao <zhaotianrui@loongson.cn> Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent f662280 commit b99f783

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

arch/loongarch/kvm/switch.S

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,6 @@ SYM_FUNC_START(kvm_enter_guest)
213213
/* Save host GPRs */
214214
kvm_save_host_gpr a2
215215

216-
/* Save host CRMD, PRMD to stack */
217-
csrrd a3, LOONGARCH_CSR_CRMD
218-
st.d a3, a2, PT_CRMD
219-
csrrd a3, LOONGARCH_CSR_PRMD
220-
st.d a3, a2, PT_PRMD
221-
222216
addi.d a2, a1, KVM_VCPU_ARCH
223217
st.d sp, a2, KVM_ARCH_HSP
224218
st.d tp, a2, KVM_ARCH_HTP

0 commit comments

Comments
 (0)