Lines Matching refs:vcpu
63 static int kvm_mips_reset_vcpu(struct kvm_vcpu *vcpu) in kvm_mips_reset_vcpu() argument
68 vcpu->arch.guest_kernel_asid[i] = 0; in kvm_mips_reset_vcpu()
69 vcpu->arch.guest_user_asid[i] = 0; in kvm_mips_reset_vcpu()
79 int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_runnable() argument
81 return !!(vcpu->arch.pending_exceptions); in kvm_arch_vcpu_runnable()
84 int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_should_kick() argument
144 struct kvm_vcpu *vcpu; in kvm_mips_free_vcpus() local
153 kvm_for_each_vcpu(i, vcpu, kvm) { in kvm_mips_free_vcpus()
154 kvm_arch_vcpu_free(vcpu); in kvm_mips_free_vcpus()
252 struct kvm_vcpu *vcpu = kzalloc(sizeof(struct kvm_vcpu), GFP_KERNEL); in kvm_arch_vcpu_create() local
254 if (!vcpu) { in kvm_arch_vcpu_create()
259 err = kvm_vcpu_init(vcpu, kvm, id); in kvm_arch_vcpu_create()
264 kvm_debug("kvm @ %p: create cpu %d at %p\n", kvm, id, vcpu); in kvm_arch_vcpu_create()
276 vcpu->arch.host_ebase = (void *)read_c0_ebase(); in kvm_arch_vcpu_create()
288 vcpu->arch.guest_ebase = gebase; in kvm_arch_vcpu_create()
325 vcpu->arch.kseg0_commpage = kzalloc(PAGE_SIZE << 1, GFP_KERNEL); in kvm_arch_vcpu_create()
327 if (!vcpu->arch.kseg0_commpage) { in kvm_arch_vcpu_create()
332 kvm_debug("Allocated COMM page @ %p\n", vcpu->arch.kseg0_commpage); in kvm_arch_vcpu_create()
333 kvm_mips_commpage_init(vcpu); in kvm_arch_vcpu_create()
336 vcpu->arch.last_sched_cpu = -1; in kvm_arch_vcpu_create()
339 kvm_mips_init_count(vcpu); in kvm_arch_vcpu_create()
341 return vcpu; in kvm_arch_vcpu_create()
347 kvm_vcpu_uninit(vcpu); in kvm_arch_vcpu_create()
350 kfree(vcpu); in kvm_arch_vcpu_create()
356 void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_free() argument
358 hrtimer_cancel(&vcpu->arch.comparecount_timer); in kvm_arch_vcpu_free()
360 kvm_vcpu_uninit(vcpu); in kvm_arch_vcpu_free()
362 kvm_mips_dump_stats(vcpu); in kvm_arch_vcpu_free()
364 kfree(vcpu->arch.guest_ebase); in kvm_arch_vcpu_free()
365 kfree(vcpu->arch.kseg0_commpage); in kvm_arch_vcpu_free()
366 kfree(vcpu); in kvm_arch_vcpu_free()
369 void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_destroy() argument
371 kvm_arch_vcpu_free(vcpu); in kvm_arch_vcpu_destroy()
374 int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, in kvm_arch_vcpu_ioctl_set_guest_debug() argument
380 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) in kvm_arch_vcpu_ioctl_run() argument
385 if (vcpu->sigset_active) in kvm_arch_vcpu_ioctl_run()
386 sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); in kvm_arch_vcpu_ioctl_run()
388 if (vcpu->mmio_needed) { in kvm_arch_vcpu_ioctl_run()
389 if (!vcpu->mmio_is_write) in kvm_arch_vcpu_ioctl_run()
390 kvm_mips_complete_mmio_load(vcpu, run); in kvm_arch_vcpu_ioctl_run()
391 vcpu->mmio_needed = 0; in kvm_arch_vcpu_ioctl_run()
398 kvm_mips_deliver_interrupts(vcpu, in kvm_arch_vcpu_ioctl_run()
399 kvm_read_c0_guest_cause(vcpu->arch.cop0)); in kvm_arch_vcpu_ioctl_run()
406 r = __kvm_mips_vcpu_run(run, vcpu); in kvm_arch_vcpu_ioctl_run()
414 if (vcpu->sigset_active) in kvm_arch_vcpu_ioctl_run()
420 int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, in kvm_vcpu_ioctl_interrupt() argument
431 dvcpu = vcpu; in kvm_vcpu_ioctl_interrupt()
433 dvcpu = vcpu->kvm->vcpus[irq->cpu]; in kvm_vcpu_ioctl_interrupt()
454 int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, in kvm_arch_vcpu_ioctl_get_mpstate() argument
460 int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, in kvm_arch_vcpu_ioctl_set_mpstate() argument
532 static int kvm_mips_get_reg(struct kvm_vcpu *vcpu, in kvm_mips_get_reg() argument
535 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_mips_get_reg()
536 struct mips_fpu_struct *fpu = &vcpu->arch.fpu; in kvm_mips_get_reg()
545 v = (long)vcpu->arch.gprs[reg->id - KVM_REG_MIPS_R0]; in kvm_mips_get_reg()
548 v = (long)vcpu->arch.hi; in kvm_mips_get_reg()
551 v = (long)vcpu->arch.lo; in kvm_mips_get_reg()
554 v = (long)vcpu->arch.pc; in kvm_mips_get_reg()
559 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_get_reg()
569 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_get_reg()
578 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_get_reg()
583 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_get_reg()
590 if (!kvm_mips_guest_has_msa(&vcpu->arch)) in kvm_mips_get_reg()
607 if (!kvm_mips_guest_has_msa(&vcpu->arch)) in kvm_mips_get_reg()
612 if (!kvm_mips_guest_has_msa(&vcpu->arch)) in kvm_mips_get_reg()
686 ret = kvm_mips_callbacks->get_one_reg(vcpu, reg, &v); in kvm_mips_get_reg()
711 static int kvm_mips_set_reg(struct kvm_vcpu *vcpu, in kvm_mips_set_reg() argument
714 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_mips_set_reg()
715 struct mips_fpu_struct *fpu = &vcpu->arch.fpu; in kvm_mips_set_reg()
746 vcpu->arch.gprs[reg->id - KVM_REG_MIPS_R0] = v; in kvm_mips_set_reg()
749 vcpu->arch.hi = v; in kvm_mips_set_reg()
752 vcpu->arch.lo = v; in kvm_mips_set_reg()
755 vcpu->arch.pc = v; in kvm_mips_set_reg()
760 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_set_reg()
770 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_set_reg()
779 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_set_reg()
784 if (!kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_mips_set_reg()
791 if (!kvm_mips_guest_has_msa(&vcpu->arch)) in kvm_mips_set_reg()
805 if (!kvm_mips_guest_has_msa(&vcpu->arch)) in kvm_mips_set_reg()
810 if (!kvm_mips_guest_has_msa(&vcpu->arch)) in kvm_mips_set_reg()
865 return kvm_mips_callbacks->set_one_reg(vcpu, reg, v); in kvm_mips_set_reg()
872 static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, in kvm_vcpu_ioctl_enable_cap() argument
877 if (!kvm_vm_ioctl_check_extension(vcpu->kvm, cap->cap)) in kvm_vcpu_ioctl_enable_cap()
886 vcpu->arch.fpu_enabled = true; in kvm_vcpu_ioctl_enable_cap()
889 vcpu->arch.msa_enabled = true; in kvm_vcpu_ioctl_enable_cap()
902 struct kvm_vcpu *vcpu = filp->private_data; in kvm_arch_vcpu_ioctl() local
914 return kvm_mips_set_reg(vcpu, ®); in kvm_arch_vcpu_ioctl()
916 return kvm_mips_get_reg(vcpu, ®); in kvm_arch_vcpu_ioctl()
940 r = kvm_mips_reset_vcpu(vcpu); in kvm_arch_vcpu_ioctl()
950 kvm_debug("[%d] %s: irq: %d\n", vcpu->vcpu_id, __func__, in kvm_arch_vcpu_ioctl()
953 r = kvm_vcpu_ioctl_interrupt(vcpu, &irq); in kvm_arch_vcpu_ioctl()
962 r = kvm_vcpu_ioctl_enable_cap(vcpu, &cap); in kvm_arch_vcpu_ioctl()
1038 int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, in kvm_arch_vcpu_ioctl_get_sregs() argument
1044 int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, in kvm_arch_vcpu_ioctl_set_sregs() argument
1050 void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_postcreate() argument
1054 int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) in kvm_arch_vcpu_ioctl_get_fpu() argument
1059 int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) in kvm_arch_vcpu_ioctl_set_fpu() argument
1064 int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) in kvm_arch_vcpu_fault() argument
1106 int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu) in kvm_cpu_has_pending_timer() argument
1108 return kvm_mips_pending_timer(vcpu); in kvm_cpu_has_pending_timer()
1111 int kvm_arch_vcpu_dump_regs(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_dump_regs() argument
1116 if (!vcpu) in kvm_arch_vcpu_dump_regs()
1120 kvm_debug("\tpc = 0x%08lx\n", vcpu->arch.pc); in kvm_arch_vcpu_dump_regs()
1121 kvm_debug("\texceptions: %08lx\n", vcpu->arch.pending_exceptions); in kvm_arch_vcpu_dump_regs()
1125 vcpu->arch.gprs[i], in kvm_arch_vcpu_dump_regs()
1126 vcpu->arch.gprs[i + 1], in kvm_arch_vcpu_dump_regs()
1127 vcpu->arch.gprs[i + 2], vcpu->arch.gprs[i + 3]); in kvm_arch_vcpu_dump_regs()
1129 kvm_debug("\thi: 0x%08lx\n", vcpu->arch.hi); in kvm_arch_vcpu_dump_regs()
1130 kvm_debug("\tlo: 0x%08lx\n", vcpu->arch.lo); in kvm_arch_vcpu_dump_regs()
1132 cop0 = vcpu->arch.cop0; in kvm_arch_vcpu_dump_regs()
1142 int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) in kvm_arch_vcpu_ioctl_set_regs() argument
1146 for (i = 1; i < ARRAY_SIZE(vcpu->arch.gprs); i++) in kvm_arch_vcpu_ioctl_set_regs()
1147 vcpu->arch.gprs[i] = regs->gpr[i]; in kvm_arch_vcpu_ioctl_set_regs()
1148 vcpu->arch.gprs[0] = 0; /* zero is special, and cannot be set. */ in kvm_arch_vcpu_ioctl_set_regs()
1149 vcpu->arch.hi = regs->hi; in kvm_arch_vcpu_ioctl_set_regs()
1150 vcpu->arch.lo = regs->lo; in kvm_arch_vcpu_ioctl_set_regs()
1151 vcpu->arch.pc = regs->pc; in kvm_arch_vcpu_ioctl_set_regs()
1156 int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs) in kvm_arch_vcpu_ioctl_get_regs() argument
1160 for (i = 0; i < ARRAY_SIZE(vcpu->arch.gprs); i++) in kvm_arch_vcpu_ioctl_get_regs()
1161 regs->gpr[i] = vcpu->arch.gprs[i]; in kvm_arch_vcpu_ioctl_get_regs()
1163 regs->hi = vcpu->arch.hi; in kvm_arch_vcpu_ioctl_get_regs()
1164 regs->lo = vcpu->arch.lo; in kvm_arch_vcpu_ioctl_get_regs()
1165 regs->pc = vcpu->arch.pc; in kvm_arch_vcpu_ioctl_get_regs()
1172 struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data; in kvm_mips_comparecount_func() local
1174 kvm_mips_callbacks->queue_timer_int(vcpu); in kvm_mips_comparecount_func()
1176 vcpu->arch.wait = 0; in kvm_mips_comparecount_func()
1177 if (waitqueue_active(&vcpu->wq)) in kvm_mips_comparecount_func()
1178 wake_up_interruptible(&vcpu->wq); in kvm_mips_comparecount_func()
1184 struct kvm_vcpu *vcpu; in kvm_mips_comparecount_wakeup() local
1186 vcpu = container_of(timer, struct kvm_vcpu, arch.comparecount_timer); in kvm_mips_comparecount_wakeup()
1187 kvm_mips_comparecount_func((unsigned long) vcpu); in kvm_mips_comparecount_wakeup()
1188 return kvm_mips_count_timeout(vcpu); in kvm_mips_comparecount_wakeup()
1191 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_init() argument
1193 kvm_mips_callbacks->vcpu_init(vcpu); in kvm_arch_vcpu_init()
1194 hrtimer_init(&vcpu->arch.comparecount_timer, CLOCK_MONOTONIC, in kvm_arch_vcpu_init()
1196 vcpu->arch.comparecount_timer.function = kvm_mips_comparecount_wakeup; in kvm_arch_vcpu_init()
1200 int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, in kvm_arch_vcpu_ioctl_translate() argument
1207 int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) in kvm_arch_vcpu_setup() argument
1209 return kvm_mips_callbacks->vcpu_setup(vcpu); in kvm_arch_vcpu_setup()
1226 int kvm_mips_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu) in kvm_mips_handle_exit() argument
1228 uint32_t cause = vcpu->arch.host_cp0_cause; in kvm_mips_handle_exit()
1230 uint32_t __user *opc = (uint32_t __user *) vcpu->arch.pc; in kvm_mips_handle_exit()
1231 unsigned long badvaddr = vcpu->arch.host_cp0_badvaddr; in kvm_mips_handle_exit()
1251 cause, opc, run, vcpu); in kvm_mips_handle_exit()
1257 er = kvm_mips_check_privilege(cause, opc, run, vcpu); in kvm_mips_handle_exit()
1268 kvm_debug("[%d]T_INT @ %p\n", vcpu->vcpu_id, opc); in kvm_mips_handle_exit()
1270 ++vcpu->stat.int_exits; in kvm_mips_handle_exit()
1271 trace_kvm_exit(vcpu, INT_EXITS); in kvm_mips_handle_exit()
1282 ++vcpu->stat.cop_unusable_exits; in kvm_mips_handle_exit()
1283 trace_kvm_exit(vcpu, COP_UNUSABLE_EXITS); in kvm_mips_handle_exit()
1284 ret = kvm_mips_callbacks->handle_cop_unusable(vcpu); in kvm_mips_handle_exit()
1291 ++vcpu->stat.tlbmod_exits; in kvm_mips_handle_exit()
1292 trace_kvm_exit(vcpu, TLBMOD_EXITS); in kvm_mips_handle_exit()
1293 ret = kvm_mips_callbacks->handle_tlb_mod(vcpu); in kvm_mips_handle_exit()
1298 cause, kvm_read_c0_guest_status(vcpu->arch.cop0), opc, in kvm_mips_handle_exit()
1301 ++vcpu->stat.tlbmiss_st_exits; in kvm_mips_handle_exit()
1302 trace_kvm_exit(vcpu, TLBMISS_ST_EXITS); in kvm_mips_handle_exit()
1303 ret = kvm_mips_callbacks->handle_tlb_st_miss(vcpu); in kvm_mips_handle_exit()
1310 ++vcpu->stat.tlbmiss_ld_exits; in kvm_mips_handle_exit()
1311 trace_kvm_exit(vcpu, TLBMISS_LD_EXITS); in kvm_mips_handle_exit()
1312 ret = kvm_mips_callbacks->handle_tlb_ld_miss(vcpu); in kvm_mips_handle_exit()
1316 ++vcpu->stat.addrerr_st_exits; in kvm_mips_handle_exit()
1317 trace_kvm_exit(vcpu, ADDRERR_ST_EXITS); in kvm_mips_handle_exit()
1318 ret = kvm_mips_callbacks->handle_addr_err_st(vcpu); in kvm_mips_handle_exit()
1322 ++vcpu->stat.addrerr_ld_exits; in kvm_mips_handle_exit()
1323 trace_kvm_exit(vcpu, ADDRERR_LD_EXITS); in kvm_mips_handle_exit()
1324 ret = kvm_mips_callbacks->handle_addr_err_ld(vcpu); in kvm_mips_handle_exit()
1328 ++vcpu->stat.syscall_exits; in kvm_mips_handle_exit()
1329 trace_kvm_exit(vcpu, SYSCALL_EXITS); in kvm_mips_handle_exit()
1330 ret = kvm_mips_callbacks->handle_syscall(vcpu); in kvm_mips_handle_exit()
1334 ++vcpu->stat.resvd_inst_exits; in kvm_mips_handle_exit()
1335 trace_kvm_exit(vcpu, RESVD_INST_EXITS); in kvm_mips_handle_exit()
1336 ret = kvm_mips_callbacks->handle_res_inst(vcpu); in kvm_mips_handle_exit()
1340 ++vcpu->stat.break_inst_exits; in kvm_mips_handle_exit()
1341 trace_kvm_exit(vcpu, BREAK_INST_EXITS); in kvm_mips_handle_exit()
1342 ret = kvm_mips_callbacks->handle_break(vcpu); in kvm_mips_handle_exit()
1346 ++vcpu->stat.trap_inst_exits; in kvm_mips_handle_exit()
1347 trace_kvm_exit(vcpu, TRAP_INST_EXITS); in kvm_mips_handle_exit()
1348 ret = kvm_mips_callbacks->handle_trap(vcpu); in kvm_mips_handle_exit()
1352 ++vcpu->stat.msa_fpe_exits; in kvm_mips_handle_exit()
1353 trace_kvm_exit(vcpu, MSA_FPE_EXITS); in kvm_mips_handle_exit()
1354 ret = kvm_mips_callbacks->handle_msa_fpe(vcpu); in kvm_mips_handle_exit()
1358 ++vcpu->stat.fpe_exits; in kvm_mips_handle_exit()
1359 trace_kvm_exit(vcpu, FPE_EXITS); in kvm_mips_handle_exit()
1360 ret = kvm_mips_callbacks->handle_fpe(vcpu); in kvm_mips_handle_exit()
1364 ++vcpu->stat.msa_disabled_exits; in kvm_mips_handle_exit()
1365 trace_kvm_exit(vcpu, MSA_DISABLED_EXITS); in kvm_mips_handle_exit()
1366 ret = kvm_mips_callbacks->handle_msa_disabled(vcpu); in kvm_mips_handle_exit()
1371 exccode, opc, kvm_get_inst(opc, vcpu), badvaddr, in kvm_mips_handle_exit()
1372 kvm_read_c0_guest_status(vcpu->arch.cop0)); in kvm_mips_handle_exit()
1373 kvm_arch_vcpu_dump_regs(vcpu); in kvm_mips_handle_exit()
1384 kvm_mips_deliver_interrupts(vcpu, cause); in kvm_mips_handle_exit()
1391 ++vcpu->stat.signal_exits; in kvm_mips_handle_exit()
1392 trace_kvm_exit(vcpu, SIGNAL_EXITS); in kvm_mips_handle_exit()
1406 if (kvm_mips_guest_has_fpu(&vcpu->arch) && in kvm_mips_handle_exit()
1408 __kvm_restore_fcsr(&vcpu->arch); in kvm_mips_handle_exit()
1410 if (kvm_mips_guest_has_msa(&vcpu->arch) && in kvm_mips_handle_exit()
1412 __kvm_restore_msacsr(&vcpu->arch); in kvm_mips_handle_exit()
1422 void kvm_own_fpu(struct kvm_vcpu *vcpu) in kvm_own_fpu() argument
1424 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_own_fpu()
1442 vcpu->arch.fpu_inuse & KVM_MIPS_FPU_MSA) in kvm_own_fpu()
1443 kvm_lose_fpu(vcpu); in kvm_own_fpu()
1457 if (!(vcpu->arch.fpu_inuse & KVM_MIPS_FPU_FPU)) { in kvm_own_fpu()
1458 __kvm_restore_fpu(&vcpu->arch); in kvm_own_fpu()
1459 vcpu->arch.fpu_inuse |= KVM_MIPS_FPU_FPU; in kvm_own_fpu()
1467 void kvm_own_msa(struct kvm_vcpu *vcpu) in kvm_own_msa() argument
1469 struct mips_coproc *cop0 = vcpu->arch.cop0; in kvm_own_msa()
1478 if (kvm_mips_guest_has_fpu(&vcpu->arch)) { in kvm_own_msa()
1486 (vcpu->arch.fpu_inuse & (KVM_MIPS_FPU_FPU | in kvm_own_msa()
1488 kvm_lose_fpu(vcpu); in kvm_own_msa()
1501 switch (vcpu->arch.fpu_inuse & (KVM_MIPS_FPU_FPU | KVM_MIPS_FPU_MSA)) { in kvm_own_msa()
1506 __kvm_restore_msa_upper(&vcpu->arch); in kvm_own_msa()
1507 vcpu->arch.fpu_inuse |= KVM_MIPS_FPU_MSA; in kvm_own_msa()
1511 __kvm_restore_msa(&vcpu->arch); in kvm_own_msa()
1512 vcpu->arch.fpu_inuse |= KVM_MIPS_FPU_MSA; in kvm_own_msa()
1513 if (kvm_mips_guest_has_fpu(&vcpu->arch)) in kvm_own_msa()
1514 vcpu->arch.fpu_inuse |= KVM_MIPS_FPU_FPU; in kvm_own_msa()
1525 void kvm_drop_fpu(struct kvm_vcpu *vcpu) in kvm_drop_fpu() argument
1528 if (cpu_has_msa && vcpu->arch.fpu_inuse & KVM_MIPS_FPU_MSA) { in kvm_drop_fpu()
1530 vcpu->arch.fpu_inuse &= ~KVM_MIPS_FPU_MSA; in kvm_drop_fpu()
1532 if (vcpu->arch.fpu_inuse & KVM_MIPS_FPU_FPU) { in kvm_drop_fpu()
1534 vcpu->arch.fpu_inuse &= ~KVM_MIPS_FPU_FPU; in kvm_drop_fpu()
1540 void kvm_lose_fpu(struct kvm_vcpu *vcpu) in kvm_lose_fpu() argument
1550 if (cpu_has_msa && vcpu->arch.fpu_inuse & KVM_MIPS_FPU_MSA) { in kvm_lose_fpu()
1554 __kvm_save_msa(&vcpu->arch); in kvm_lose_fpu()
1558 if (vcpu->arch.fpu_inuse & KVM_MIPS_FPU_FPU) in kvm_lose_fpu()
1560 vcpu->arch.fpu_inuse &= ~(KVM_MIPS_FPU_FPU | KVM_MIPS_FPU_MSA); in kvm_lose_fpu()
1561 } else if (vcpu->arch.fpu_inuse & KVM_MIPS_FPU_FPU) { in kvm_lose_fpu()
1565 __kvm_save_fpu(&vcpu->arch); in kvm_lose_fpu()
1566 vcpu->arch.fpu_inuse &= ~KVM_MIPS_FPU_FPU; in kvm_lose_fpu()