Lines Matching refs:K0
47 #define K0 26 macro
252 UASM_i_LA(&p, K0, ST0_EXL | KSU_USER | ST0_BEV | ST0_KX_IF_64); in kvm_mips_build_vcpu_run()
253 uasm_i_mtc0(&p, K0, C0_STATUS); in kvm_mips_build_vcpu_run()
257 UASM_i_LW(&p, K0, offsetof(struct kvm_vcpu_arch, guest_ebase), K1); in kvm_mips_build_vcpu_run()
258 build_set_exc_base(&p, K0); in kvm_mips_build_vcpu_run()
265 uasm_i_addiu(&p, K0, ZERO, ST0_EXL | KSU_USER | ST0_IE | ST0_KX_IF_64); in kvm_mips_build_vcpu_run()
267 uasm_i_or(&p, K0, K0, V0); in kvm_mips_build_vcpu_run()
268 uasm_i_mtc0(&p, K0, C0_STATUS); in kvm_mips_build_vcpu_run()
304 UASM_i_MFC0(&p, K0, C0_PWBASE); in kvm_mips_build_enter_guest()
306 UASM_i_MFC0(&p, K0, c0_kscratch(), pgd_reg); in kvm_mips_build_enter_guest()
307 UASM_i_SW(&p, K0, offsetof(struct kvm_vcpu_arch, host_pgd), K1); in kvm_mips_build_enter_guest()
330 uasm_i_mfc0(&p, K0, C0_GUESTCTL0); in kvm_mips_build_enter_guest()
331 uasm_i_ins(&p, K0, V1, MIPS_GCTL0_GM_SHIFT, 1); in kvm_mips_build_enter_guest()
332 uasm_i_mtc0(&p, K0, C0_GUESTCTL0); in kvm_mips_build_enter_guest()
356 UASM_i_MFC0(&p, K0, C0_ENTRYHI); in kvm_mips_build_enter_guest()
357 UASM_i_SW(&p, K0, offsetof(struct kvm_vcpu_arch, host_entryhi), in kvm_mips_build_enter_guest()
370 UASM_i_LW(&p, K0, 0, T3); in kvm_mips_build_enter_guest()
382 uasm_i_and(&p, K0, K0, T2); in kvm_mips_build_enter_guest()
384 uasm_i_andi(&p, K0, K0, MIPS_ENTRYHI_ASID); in kvm_mips_build_enter_guest()
388 uasm_i_mtc0(&p, K0, C0_ENTRYHI); in kvm_mips_build_enter_guest()
398 if (i == K0 || i == K1) in kvm_mips_build_enter_guest()
405 UASM_i_LW(&p, K0, offsetof(struct kvm_vcpu_arch, hi), K1); in kvm_mips_build_enter_guest()
406 uasm_i_mthi(&p, K0); in kvm_mips_build_enter_guest()
408 UASM_i_LW(&p, K0, offsetof(struct kvm_vcpu_arch, lo), K1); in kvm_mips_build_enter_guest()
409 uasm_i_mtlo(&p, K0); in kvm_mips_build_enter_guest()
413 UASM_i_LW(&p, K0, offsetof(struct kvm_vcpu_arch, gprs[K0]), K1); in kvm_mips_build_enter_guest()
453 UASM_i_SW(&p, K0, offsetof(struct kvm_vcpu, arch.gprs[K0]), K1); in kvm_mips_build_tlb_refill_exception()
463 uasm_i_lddir(&p, K0, K1, 3); /* global page dir */ in kvm_mips_build_tlb_refill_exception()
465 uasm_i_lddir(&p, K1, K0, 1); /* middle page dir */ in kvm_mips_build_tlb_refill_exception()
483 build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */ in kvm_mips_build_tlb_refill_exception()
485 build_get_pgde32(&p, K0, K1); /* get pgd in K1 */ in kvm_mips_build_tlb_refill_exception()
490 build_get_ptep(&p, K0, K1); in kvm_mips_build_tlb_refill_exception()
491 build_update_entries(&p, K0, K1); in kvm_mips_build_tlb_refill_exception()
501 UASM_i_LW(&p, K0, offsetof(struct kvm_vcpu, arch.gprs[K0]), K1); in kvm_mips_build_tlb_refill_exception()
540 UASM_i_SW(&p, K0, offsetof(struct kvm_vcpu_arch, gprs[K0]), K1); in kvm_mips_build_exception()
588 if (i == K0 || i == K1) in kvm_mips_build_exit()
616 UASM_i_MFC0(&p, K0, C0_EPC); in kvm_mips_build_exit()
617 UASM_i_SW(&p, K0, offsetof(struct kvm_vcpu_arch, pc), K1); in kvm_mips_build_exit()
619 UASM_i_MFC0(&p, K0, C0_BADVADDR); in kvm_mips_build_exit()
620 UASM_i_SW(&p, K0, offsetof(struct kvm_vcpu_arch, host_cp0_badvaddr), in kvm_mips_build_exit()
623 uasm_i_mfc0(&p, K0, C0_CAUSE); in kvm_mips_build_exit()
624 uasm_i_sw(&p, K0, offsetof(struct kvm_vcpu_arch, host_cp0_cause), K1); in kvm_mips_build_exit()
627 uasm_i_mfc0(&p, K0, C0_BADINSTR); in kvm_mips_build_exit()
628 uasm_i_sw(&p, K0, offsetof(struct kvm_vcpu_arch, in kvm_mips_build_exit()
633 uasm_i_mfc0(&p, K0, C0_BADINSTRP); in kvm_mips_build_exit()
634 uasm_i_sw(&p, K0, offsetof(struct kvm_vcpu_arch, in kvm_mips_build_exit()
645 uasm_i_or(&p, K0, V0, AT); in kvm_mips_build_exit()
647 uasm_i_mtc0(&p, K0, C0_STATUS); in kvm_mips_build_exit()
650 UASM_i_LA_mostly(&p, K0, (long)&ebase); in kvm_mips_build_exit()
651 UASM_i_LW(&p, K0, uasm_rel_lo((long)&ebase), K0); in kvm_mips_build_exit()
652 build_set_exc_base(&p, K0); in kvm_mips_build_exit()
688 UASM_i_LW(&p, K0, offsetof(struct kvm_vcpu_arch, host_entryhi), in kvm_mips_build_exit()
690 UASM_i_MTC0(&p, K0, C0_ENTRYHI); in kvm_mips_build_exit()
710 uasm_i_mfc0(&p, K0, C0_GUESTCTL0); in kvm_mips_build_exit()
711 uasm_i_ins(&p, K0, ZERO, MIPS_GCTL0_GM_SHIFT, 1); in kvm_mips_build_exit()
712 uasm_i_mtc0(&p, K0, C0_GUESTCTL0); in kvm_mips_build_exit()
715 uasm_i_sw(&p, K0, in kvm_mips_build_exit()
756 kvm_mips_build_restore_scratch(&p, K0, SP); in kvm_mips_build_exit()
759 UASM_i_LA_mostly(&p, K0, (long)&hwrena); in kvm_mips_build_exit()
760 uasm_i_lw(&p, K0, uasm_rel_lo((long)&hwrena), K0); in kvm_mips_build_exit()
761 uasm_i_mtc0(&p, K0, C0_HWRENA); in kvm_mips_build_exit()
854 uasm_i_or(&p, K0, V1, AT); in kvm_mips_build_ret_to_guest()
855 uasm_i_mtc0(&p, K0, C0_STATUS); in kvm_mips_build_ret_to_guest()
894 uasm_i_sra(&p, K0, V0, 2); in kvm_mips_build_ret_to_host()
895 uasm_i_move(&p, V0, K0); in kvm_mips_build_ret_to_host()
905 UASM_i_LA_mostly(&p, K0, (long)&hwrena); in kvm_mips_build_ret_to_host()
906 uasm_i_lw(&p, K0, uasm_rel_lo((long)&hwrena), K0); in kvm_mips_build_ret_to_host()
907 uasm_i_mtc0(&p, K0, C0_HWRENA); in kvm_mips_build_ret_to_host()