Lines Matching refs:cop0

425 	struct mips_coproc *cop0 = vcpu->arch.cop0;  in kvm_vz_restore_timer()  local
428 compare = kvm_read_sw_gc0_compare(cop0); in kvm_vz_restore_timer()
429 cause = kvm_read_sw_gc0_cause(cop0); in kvm_vz_restore_timer()
520 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_save_timer() local
536 kvm_write_sw_gc0_cause(cop0, cause); in kvm_vz_save_timer()
537 kvm_write_sw_gc0_compare(cop0, compare); in kvm_vz_save_timer()
866 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_write_maari() local
870 kvm_write_sw_gc0_maari(cop0, ARRAY_SIZE(vcpu->arch.maar) - 1); in kvm_write_maari()
872 kvm_write_sw_gc0_maari(cop0, val); in kvm_write_maari()
879 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_gpsi_cop0() local
911 cop0->stat[rd][sel]++; in kvm_vz_gpsi_cop0()
931 BUG_ON(kvm_read_sw_gc0_maari(cop0) >= in kvm_vz_gpsi_cop0()
934 kvm_read_sw_gc0_maari(cop0)]; in kvm_vz_gpsi_cop0()
951 val = cop0->reg[rd][sel]; in kvm_vz_gpsi_cop0()
955 val = cop0->reg[rd][sel]; in kvm_vz_gpsi_cop0()
977 cop0->stat[rd][sel]++; in kvm_vz_gpsi_cop0()
1010 BUG_ON(kvm_read_sw_gc0_maari(cop0) >= in kvm_vz_gpsi_cop0()
1012 vcpu->arch.maar[kvm_read_sw_gc0_maari(cop0)] = in kvm_vz_gpsi_cop0()
1021 cop0->reg[rd][sel] = (int)val; in kvm_vz_gpsi_cop0()
1914 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_get_one_reg() local
2035 *v = (long)kvm_read_c0_guest_prid(cop0); in kvm_vz_get_one_reg()
2071 *v = kvm_read_sw_gc0_config6(cop0); in kvm_vz_get_one_reg()
2084 *v = kvm_read_sw_gc0_maari(vcpu->arch.cop0); in kvm_vz_get_one_reg()
2138 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_set_one_reg() local
2277 kvm_write_c0_guest_prid(cop0, v); in kvm_vz_set_one_reg()
2343 cur = kvm_read_sw_gc0_config6(cop0); in kvm_vz_set_one_reg()
2347 kvm_write_sw_gc0_config6(cop0, (int)v); in kvm_vz_set_one_reg()
2565 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_vcpu_load() local
2585 kvm_restore_gc0_wired(cop0); in kvm_vz_vcpu_load()
2613 kvm_restore_gc0_config(cop0); in kvm_vz_vcpu_load()
2615 kvm_restore_gc0_config1(cop0); in kvm_vz_vcpu_load()
2617 kvm_restore_gc0_config2(cop0); in kvm_vz_vcpu_load()
2619 kvm_restore_gc0_config3(cop0); in kvm_vz_vcpu_load()
2621 kvm_restore_gc0_config4(cop0); in kvm_vz_vcpu_load()
2623 kvm_restore_gc0_config5(cop0); in kvm_vz_vcpu_load()
2625 kvm_restore_gc0_config6(cop0); in kvm_vz_vcpu_load()
2627 kvm_restore_gc0_config7(cop0); in kvm_vz_vcpu_load()
2629 kvm_restore_gc0_index(cop0); in kvm_vz_vcpu_load()
2630 kvm_restore_gc0_entrylo0(cop0); in kvm_vz_vcpu_load()
2631 kvm_restore_gc0_entrylo1(cop0); in kvm_vz_vcpu_load()
2632 kvm_restore_gc0_context(cop0); in kvm_vz_vcpu_load()
2634 kvm_restore_gc0_contextconfig(cop0); in kvm_vz_vcpu_load()
2636 kvm_restore_gc0_xcontext(cop0); in kvm_vz_vcpu_load()
2638 kvm_restore_gc0_xcontextconfig(cop0); in kvm_vz_vcpu_load()
2640 kvm_restore_gc0_pagemask(cop0); in kvm_vz_vcpu_load()
2641 kvm_restore_gc0_pagegrain(cop0); in kvm_vz_vcpu_load()
2642 kvm_restore_gc0_hwrena(cop0); in kvm_vz_vcpu_load()
2643 kvm_restore_gc0_badvaddr(cop0); in kvm_vz_vcpu_load()
2644 kvm_restore_gc0_entryhi(cop0); in kvm_vz_vcpu_load()
2645 kvm_restore_gc0_status(cop0); in kvm_vz_vcpu_load()
2646 kvm_restore_gc0_intctl(cop0); in kvm_vz_vcpu_load()
2647 kvm_restore_gc0_epc(cop0); in kvm_vz_vcpu_load()
2648 kvm_vz_write_gc0_ebase(kvm_read_sw_gc0_ebase(cop0)); in kvm_vz_vcpu_load()
2650 kvm_restore_gc0_userlocal(cop0); in kvm_vz_vcpu_load()
2652 kvm_restore_gc0_errorepc(cop0); in kvm_vz_vcpu_load()
2657 kvm_restore_gc0_kscratch1(cop0); in kvm_vz_vcpu_load()
2659 kvm_restore_gc0_kscratch2(cop0); in kvm_vz_vcpu_load()
2661 kvm_restore_gc0_kscratch3(cop0); in kvm_vz_vcpu_load()
2663 kvm_restore_gc0_kscratch4(cop0); in kvm_vz_vcpu_load()
2665 kvm_restore_gc0_kscratch5(cop0); in kvm_vz_vcpu_load()
2667 kvm_restore_gc0_kscratch6(cop0); in kvm_vz_vcpu_load()
2671 kvm_restore_gc0_badinstr(cop0); in kvm_vz_vcpu_load()
2673 kvm_restore_gc0_badinstrp(cop0); in kvm_vz_vcpu_load()
2676 kvm_restore_gc0_segctl0(cop0); in kvm_vz_vcpu_load()
2677 kvm_restore_gc0_segctl1(cop0); in kvm_vz_vcpu_load()
2678 kvm_restore_gc0_segctl2(cop0); in kvm_vz_vcpu_load()
2683 kvm_restore_gc0_pwbase(cop0); in kvm_vz_vcpu_load()
2684 kvm_restore_gc0_pwfield(cop0); in kvm_vz_vcpu_load()
2685 kvm_restore_gc0_pwsize(cop0); in kvm_vz_vcpu_load()
2686 kvm_restore_gc0_pwctl(cop0); in kvm_vz_vcpu_load()
2692 cop0->reg[MIPS_CP0_GUESTCTL2][MIPS_CP0_GUESTCTL2_SEL]); in kvm_vz_vcpu_load()
2707 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_vcpu_put() local
2714 kvm_save_gc0_index(cop0); in kvm_vz_vcpu_put()
2715 kvm_save_gc0_entrylo0(cop0); in kvm_vz_vcpu_put()
2716 kvm_save_gc0_entrylo1(cop0); in kvm_vz_vcpu_put()
2717 kvm_save_gc0_context(cop0); in kvm_vz_vcpu_put()
2719 kvm_save_gc0_contextconfig(cop0); in kvm_vz_vcpu_put()
2721 kvm_save_gc0_xcontext(cop0); in kvm_vz_vcpu_put()
2723 kvm_save_gc0_xcontextconfig(cop0); in kvm_vz_vcpu_put()
2725 kvm_save_gc0_pagemask(cop0); in kvm_vz_vcpu_put()
2726 kvm_save_gc0_pagegrain(cop0); in kvm_vz_vcpu_put()
2727 kvm_save_gc0_wired(cop0); in kvm_vz_vcpu_put()
2730 kvm_save_gc0_hwrena(cop0); in kvm_vz_vcpu_put()
2731 kvm_save_gc0_badvaddr(cop0); in kvm_vz_vcpu_put()
2732 kvm_save_gc0_entryhi(cop0); in kvm_vz_vcpu_put()
2733 kvm_save_gc0_status(cop0); in kvm_vz_vcpu_put()
2734 kvm_save_gc0_intctl(cop0); in kvm_vz_vcpu_put()
2735 kvm_save_gc0_epc(cop0); in kvm_vz_vcpu_put()
2736 kvm_write_sw_gc0_ebase(cop0, kvm_vz_read_gc0_ebase()); in kvm_vz_vcpu_put()
2738 kvm_save_gc0_userlocal(cop0); in kvm_vz_vcpu_put()
2741 kvm_save_gc0_config(cop0); in kvm_vz_vcpu_put()
2743 kvm_save_gc0_config1(cop0); in kvm_vz_vcpu_put()
2745 kvm_save_gc0_config2(cop0); in kvm_vz_vcpu_put()
2747 kvm_save_gc0_config3(cop0); in kvm_vz_vcpu_put()
2749 kvm_save_gc0_config4(cop0); in kvm_vz_vcpu_put()
2751 kvm_save_gc0_config5(cop0); in kvm_vz_vcpu_put()
2753 kvm_save_gc0_config6(cop0); in kvm_vz_vcpu_put()
2755 kvm_save_gc0_config7(cop0); in kvm_vz_vcpu_put()
2757 kvm_save_gc0_errorepc(cop0); in kvm_vz_vcpu_put()
2762 kvm_save_gc0_kscratch1(cop0); in kvm_vz_vcpu_put()
2764 kvm_save_gc0_kscratch2(cop0); in kvm_vz_vcpu_put()
2766 kvm_save_gc0_kscratch3(cop0); in kvm_vz_vcpu_put()
2768 kvm_save_gc0_kscratch4(cop0); in kvm_vz_vcpu_put()
2770 kvm_save_gc0_kscratch5(cop0); in kvm_vz_vcpu_put()
2772 kvm_save_gc0_kscratch6(cop0); in kvm_vz_vcpu_put()
2776 kvm_save_gc0_badinstr(cop0); in kvm_vz_vcpu_put()
2778 kvm_save_gc0_badinstrp(cop0); in kvm_vz_vcpu_put()
2781 kvm_save_gc0_segctl0(cop0); in kvm_vz_vcpu_put()
2782 kvm_save_gc0_segctl1(cop0); in kvm_vz_vcpu_put()
2783 kvm_save_gc0_segctl2(cop0); in kvm_vz_vcpu_put()
2788 kvm_read_sw_gc0_config3(cop0) & MIPS_CONF3_PW)) { in kvm_vz_vcpu_put()
2789 kvm_save_gc0_pwbase(cop0); in kvm_vz_vcpu_put()
2790 kvm_save_gc0_pwfield(cop0); in kvm_vz_vcpu_put()
2791 kvm_save_gc0_pwsize(cop0); in kvm_vz_vcpu_put()
2792 kvm_save_gc0_pwctl(cop0); in kvm_vz_vcpu_put()
2799 cop0->reg[MIPS_CP0_GUESTCTL2][MIPS_CP0_GUESTCTL2_SEL] = in kvm_vz_vcpu_put()
3079 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_vz_vcpu_setup() local
3096 kvm_write_sw_gc0_pagegrain(cop0, PG_RIE | PG_XIE | PG_IEC); in kvm_vz_vcpu_setup()
3099 kvm_write_sw_gc0_wired(cop0, in kvm_vz_vcpu_setup()
3102 kvm_write_sw_gc0_status(cop0, ST0_BEV | ST0_ERL); in kvm_vz_vcpu_setup()
3104 kvm_change_sw_gc0_status(cop0, ST0_FR, read_gc0_status()); in kvm_vz_vcpu_setup()
3106 kvm_write_sw_gc0_intctl(cop0, read_gc0_intctl() & in kvm_vz_vcpu_setup()
3109 kvm_write_sw_gc0_prid(cop0, boot_cpu_data.processor_id); in kvm_vz_vcpu_setup()
3111 kvm_write_sw_gc0_ebase(cop0, (s32)0x80000000 | vcpu->vcpu_id); in kvm_vz_vcpu_setup()
3113 kvm_save_gc0_config(cop0); in kvm_vz_vcpu_setup()
3115 kvm_change_sw_gc0_config(cop0, CONF_CM_CMASK, in kvm_vz_vcpu_setup()
3118 kvm_change_sw_gc0_config(cop0, MIPS_CONF_MT, read_c0_config()); in kvm_vz_vcpu_setup()
3120 kvm_set_sw_gc0_config(cop0, MIPS_CONF_M); in kvm_vz_vcpu_setup()
3122 kvm_save_gc0_config1(cop0); in kvm_vz_vcpu_setup()
3124 kvm_clear_sw_gc0_config1(cop0, MIPS_CONF1_C2 | in kvm_vz_vcpu_setup()
3132 kvm_set_sw_gc0_config1(cop0, MIPS_CONF_M); in kvm_vz_vcpu_setup()
3134 kvm_save_gc0_config2(cop0); in kvm_vz_vcpu_setup()
3137 kvm_set_sw_gc0_config2(cop0, MIPS_CONF_M); in kvm_vz_vcpu_setup()
3139 kvm_save_gc0_config3(cop0); in kvm_vz_vcpu_setup()
3141 kvm_clear_sw_gc0_config3(cop0, MIPS_CONF3_ISA_OE); in kvm_vz_vcpu_setup()
3143 kvm_clear_sw_gc0_config3(cop0, MIPS_CONF3_MSA | in kvm_vz_vcpu_setup()
3159 kvm_set_sw_gc0_config3(cop0, MIPS_CONF_M); in kvm_vz_vcpu_setup()
3161 kvm_save_gc0_config4(cop0); in kvm_vz_vcpu_setup()
3164 kvm_set_sw_gc0_config4(cop0, MIPS_CONF_M); in kvm_vz_vcpu_setup()
3166 kvm_save_gc0_config5(cop0); in kvm_vz_vcpu_setup()
3168 kvm_clear_sw_gc0_config5(cop0, MIPS_CONF5_K | in kvm_vz_vcpu_setup()
3176 kvm_clear_sw_gc0_config5(cop0, MIPS_CONF5_MRP); in kvm_vz_vcpu_setup()
3181 kvm_write_sw_gc0_contextconfig(cop0, 0x007ffff0); in kvm_vz_vcpu_setup()
3185 kvm_write_sw_gc0_xcontextconfig(cop0, in kvm_vz_vcpu_setup()
3193 kvm_write_sw_gc0_segctl0(cop0, 0x00200010); in kvm_vz_vcpu_setup()
3194 kvm_write_sw_gc0_segctl1(cop0, 0x00000002 | in kvm_vz_vcpu_setup()
3197 kvm_write_sw_gc0_segctl2(cop0, 0x00380438); in kvm_vz_vcpu_setup()
3203 kvm_write_sw_gc0_pwfield(cop0, 0x0c30c302); in kvm_vz_vcpu_setup()
3205 kvm_write_sw_gc0_pwsize(cop0, 1 << MIPS_PWSIZE_PTW_SHIFT); in kvm_vz_vcpu_setup()
3210 cop0->reg[MIPS_CP0_GUESTCTL2][MIPS_CP0_GUESTCTL2_SEL] = 0; in kvm_vz_vcpu_setup()