2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * KVM/MIPS: Deliver/Emulate exceptions to the guest kernel
8 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
9 * Authors: Sanjay Lal <sanjayl@kymasys.com>
12 #include <linux/errno.h>
13 #include <linux/err.h>
14 #include <linux/module.h>
15 #include <linux/vmalloc.h>
17 #include <linux/kvm_host.h>
19 #include "interrupt.h"
21 static gpa_t
kvm_trap_emul_gva_to_gpa_cb(gva_t gva
)
24 gva_t kseg
= KSEGX(gva
);
26 if ((kseg
== CKSEG0
) || (kseg
== CKSEG1
))
29 kvm_err("%s: cannot find GPA for GVA: %#lx\n", __func__
, gva
);
30 kvm_mips_dump_host_tlbs();
31 gpa
= KVM_INVALID_ADDR
;
34 kvm_debug("%s: gva %#lx, gpa: %#llx\n", __func__
, gva
, gpa
);
39 static int kvm_trap_emul_handle_cop_unusable(struct kvm_vcpu
*vcpu
)
41 struct mips_coproc
*cop0
= vcpu
->arch
.cop0
;
42 struct kvm_run
*run
= vcpu
->run
;
43 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
44 u32 cause
= vcpu
->arch
.host_cp0_cause
;
45 enum emulation_result er
= EMULATE_DONE
;
46 int ret
= RESUME_GUEST
;
48 if (((cause
& CAUSEF_CE
) >> CAUSEB_CE
) == 1) {
50 if (!kvm_mips_guest_has_fpu(&vcpu
->arch
) ||
51 (kvm_read_c0_guest_status(cop0
) & ST0_CU1
) == 0) {
53 * Unusable/no FPU in guest:
54 * deliver guest COP1 Unusable Exception
56 er
= kvm_mips_emulate_fpu_exc(cause
, opc
, run
, vcpu
);
58 /* Restore FPU state */
63 er
= kvm_mips_emulate_inst(cause
, opc
, run
, vcpu
);
72 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
77 run
->exit_reason
= KVM_EXIT_INTR
;
87 static int kvm_trap_emul_handle_tlb_mod(struct kvm_vcpu
*vcpu
)
89 struct kvm_run
*run
= vcpu
->run
;
90 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
91 unsigned long badvaddr
= vcpu
->arch
.host_cp0_badvaddr
;
92 u32 cause
= vcpu
->arch
.host_cp0_cause
;
93 enum emulation_result er
= EMULATE_DONE
;
94 int ret
= RESUME_GUEST
;
96 if (KVM_GUEST_KSEGX(badvaddr
) < KVM_GUEST_KSEG0
97 || KVM_GUEST_KSEGX(badvaddr
) == KVM_GUEST_KSEG23
) {
98 kvm_debug("USER/KSEG23 ADDR TLB MOD fault: cause %#x, PC: %p, BadVaddr: %#lx\n",
99 cause
, opc
, badvaddr
);
100 er
= kvm_mips_handle_tlbmod(cause
, opc
, run
, vcpu
);
102 if (er
== EMULATE_DONE
)
105 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
108 } else if (KVM_GUEST_KSEGX(badvaddr
) == KVM_GUEST_KSEG0
) {
110 * XXXKYMA: The guest kernel does not expect to get this fault
111 * when we are not using HIGHMEM. Need to address this in a
114 kvm_err("TLB MOD fault not handled, cause %#x, PC: %p, BadVaddr: %#lx\n",
115 cause
, opc
, badvaddr
);
116 kvm_mips_dump_host_tlbs();
117 kvm_arch_vcpu_dump_regs(vcpu
);
118 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
121 kvm_err("Illegal TLB Mod fault address , cause %#x, PC: %p, BadVaddr: %#lx\n",
122 cause
, opc
, badvaddr
);
123 kvm_mips_dump_host_tlbs();
124 kvm_arch_vcpu_dump_regs(vcpu
);
125 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
131 static int kvm_trap_emul_handle_tlb_miss(struct kvm_vcpu
*vcpu
, bool store
)
133 struct kvm_run
*run
= vcpu
->run
;
134 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
135 unsigned long badvaddr
= vcpu
->arch
.host_cp0_badvaddr
;
136 u32 cause
= vcpu
->arch
.host_cp0_cause
;
137 enum emulation_result er
= EMULATE_DONE
;
138 int ret
= RESUME_GUEST
;
140 if (((badvaddr
& PAGE_MASK
) == KVM_GUEST_COMMPAGE_ADDR
)
141 && KVM_GUEST_KERNEL_MODE(vcpu
)) {
142 if (kvm_mips_handle_commpage_tlb_fault(badvaddr
, vcpu
) < 0) {
143 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
146 } else if (KVM_GUEST_KSEGX(badvaddr
) < KVM_GUEST_KSEG0
147 || KVM_GUEST_KSEGX(badvaddr
) == KVM_GUEST_KSEG23
) {
148 kvm_debug("USER ADDR TLB %s fault: cause %#x, PC: %p, BadVaddr: %#lx\n",
149 store
? "ST" : "LD", cause
, opc
, badvaddr
);
152 * User Address (UA) fault, this could happen if
153 * (1) TLB entry not present/valid in both Guest and shadow host
154 * TLBs, in this case we pass on the fault to the guest
155 * kernel and let it handle it.
156 * (2) TLB entry is present in the Guest TLB but not in the
157 * shadow, in this case we inject the TLB from the Guest TLB
158 * into the shadow host TLB
161 er
= kvm_mips_handle_tlbmiss(cause
, opc
, run
, vcpu
);
162 if (er
== EMULATE_DONE
)
165 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
168 } else if (KVM_GUEST_KSEGX(badvaddr
) == KVM_GUEST_KSEG0
) {
170 * All KSEG0 faults are handled by KVM, as the guest kernel does
171 * not expect to ever get them
173 if (kvm_mips_handle_kseg0_tlb_fault
174 (vcpu
->arch
.host_cp0_badvaddr
, vcpu
) < 0) {
175 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
179 kvm_err("Illegal TLB %s fault address , cause %#x, PC: %p, BadVaddr: %#lx\n",
180 store
? "ST" : "LD", cause
, opc
, badvaddr
);
181 kvm_mips_dump_host_tlbs();
182 kvm_arch_vcpu_dump_regs(vcpu
);
183 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
189 static int kvm_trap_emul_handle_tlb_st_miss(struct kvm_vcpu
*vcpu
)
191 return kvm_trap_emul_handle_tlb_miss(vcpu
, true);
194 static int kvm_trap_emul_handle_tlb_ld_miss(struct kvm_vcpu
*vcpu
)
196 return kvm_trap_emul_handle_tlb_miss(vcpu
, false);
199 static int kvm_trap_emul_handle_addr_err_st(struct kvm_vcpu
*vcpu
)
201 struct kvm_run
*run
= vcpu
->run
;
202 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
203 unsigned long badvaddr
= vcpu
->arch
.host_cp0_badvaddr
;
204 u32 cause
= vcpu
->arch
.host_cp0_cause
;
205 enum emulation_result er
= EMULATE_DONE
;
206 int ret
= RESUME_GUEST
;
208 if (KVM_GUEST_KERNEL_MODE(vcpu
)
209 && (KSEGX(badvaddr
) == CKSEG0
|| KSEGX(badvaddr
) == CKSEG1
)) {
210 kvm_debug("Emulate Store to MMIO space\n");
211 er
= kvm_mips_emulate_inst(cause
, opc
, run
, vcpu
);
212 if (er
== EMULATE_FAIL
) {
213 kvm_err("Emulate Store to MMIO space failed\n");
214 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
217 run
->exit_reason
= KVM_EXIT_MMIO
;
221 kvm_err("Address Error (STORE): cause %#x, PC: %p, BadVaddr: %#lx\n",
222 cause
, opc
, badvaddr
);
223 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
229 static int kvm_trap_emul_handle_addr_err_ld(struct kvm_vcpu
*vcpu
)
231 struct kvm_run
*run
= vcpu
->run
;
232 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
233 unsigned long badvaddr
= vcpu
->arch
.host_cp0_badvaddr
;
234 u32 cause
= vcpu
->arch
.host_cp0_cause
;
235 enum emulation_result er
= EMULATE_DONE
;
236 int ret
= RESUME_GUEST
;
238 if (KSEGX(badvaddr
) == CKSEG0
|| KSEGX(badvaddr
) == CKSEG1
) {
239 kvm_debug("Emulate Load from MMIO space @ %#lx\n", badvaddr
);
240 er
= kvm_mips_emulate_inst(cause
, opc
, run
, vcpu
);
241 if (er
== EMULATE_FAIL
) {
242 kvm_err("Emulate Load from MMIO space failed\n");
243 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
246 run
->exit_reason
= KVM_EXIT_MMIO
;
250 kvm_err("Address Error (LOAD): cause %#x, PC: %p, BadVaddr: %#lx\n",
251 cause
, opc
, badvaddr
);
252 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
259 static int kvm_trap_emul_handle_syscall(struct kvm_vcpu
*vcpu
)
261 struct kvm_run
*run
= vcpu
->run
;
262 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
263 u32 cause
= vcpu
->arch
.host_cp0_cause
;
264 enum emulation_result er
= EMULATE_DONE
;
265 int ret
= RESUME_GUEST
;
267 er
= kvm_mips_emulate_syscall(cause
, opc
, run
, vcpu
);
268 if (er
== EMULATE_DONE
)
271 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
277 static int kvm_trap_emul_handle_res_inst(struct kvm_vcpu
*vcpu
)
279 struct kvm_run
*run
= vcpu
->run
;
280 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
281 u32 cause
= vcpu
->arch
.host_cp0_cause
;
282 enum emulation_result er
= EMULATE_DONE
;
283 int ret
= RESUME_GUEST
;
285 er
= kvm_mips_handle_ri(cause
, opc
, run
, vcpu
);
286 if (er
== EMULATE_DONE
)
289 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
295 static int kvm_trap_emul_handle_break(struct kvm_vcpu
*vcpu
)
297 struct kvm_run
*run
= vcpu
->run
;
298 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
299 u32 cause
= vcpu
->arch
.host_cp0_cause
;
300 enum emulation_result er
= EMULATE_DONE
;
301 int ret
= RESUME_GUEST
;
303 er
= kvm_mips_emulate_bp_exc(cause
, opc
, run
, vcpu
);
304 if (er
== EMULATE_DONE
)
307 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
313 static int kvm_trap_emul_handle_trap(struct kvm_vcpu
*vcpu
)
315 struct kvm_run
*run
= vcpu
->run
;
316 u32 __user
*opc
= (u32 __user
*)vcpu
->arch
.pc
;
317 u32 cause
= vcpu
->arch
.host_cp0_cause
;
318 enum emulation_result er
= EMULATE_DONE
;
319 int ret
= RESUME_GUEST
;
321 er
= kvm_mips_emulate_trap_exc(cause
, opc
, run
, vcpu
);
322 if (er
== EMULATE_DONE
) {
325 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
331 static int kvm_trap_emul_handle_msa_fpe(struct kvm_vcpu
*vcpu
)
333 struct kvm_run
*run
= vcpu
->run
;
334 u32 __user
*opc
= (u32 __user
*)vcpu
->arch
.pc
;
335 u32 cause
= vcpu
->arch
.host_cp0_cause
;
336 enum emulation_result er
= EMULATE_DONE
;
337 int ret
= RESUME_GUEST
;
339 er
= kvm_mips_emulate_msafpe_exc(cause
, opc
, run
, vcpu
);
340 if (er
== EMULATE_DONE
) {
343 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
349 static int kvm_trap_emul_handle_fpe(struct kvm_vcpu
*vcpu
)
351 struct kvm_run
*run
= vcpu
->run
;
352 u32 __user
*opc
= (u32 __user
*)vcpu
->arch
.pc
;
353 u32 cause
= vcpu
->arch
.host_cp0_cause
;
354 enum emulation_result er
= EMULATE_DONE
;
355 int ret
= RESUME_GUEST
;
357 er
= kvm_mips_emulate_fpe_exc(cause
, opc
, run
, vcpu
);
358 if (er
== EMULATE_DONE
) {
361 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
368 * kvm_trap_emul_handle_msa_disabled() - Guest used MSA while disabled in root.
369 * @vcpu: Virtual CPU context.
371 * Handle when the guest attempts to use MSA when it is disabled.
373 static int kvm_trap_emul_handle_msa_disabled(struct kvm_vcpu
*vcpu
)
375 struct mips_coproc
*cop0
= vcpu
->arch
.cop0
;
376 struct kvm_run
*run
= vcpu
->run
;
377 u32 __user
*opc
= (u32 __user
*) vcpu
->arch
.pc
;
378 u32 cause
= vcpu
->arch
.host_cp0_cause
;
379 enum emulation_result er
= EMULATE_DONE
;
380 int ret
= RESUME_GUEST
;
382 if (!kvm_mips_guest_has_msa(&vcpu
->arch
) ||
383 (kvm_read_c0_guest_status(cop0
) & (ST0_CU1
| ST0_FR
)) == ST0_CU1
) {
385 * No MSA in guest, or FPU enabled and not in FR=1 mode,
386 * guest reserved instruction exception
388 er
= kvm_mips_emulate_ri_exc(cause
, opc
, run
, vcpu
);
389 } else if (!(kvm_read_c0_guest_config5(cop0
) & MIPS_CONF5_MSAEN
)) {
390 /* MSA disabled by guest, guest MSA disabled exception */
391 er
= kvm_mips_emulate_msadis_exc(cause
, opc
, run
, vcpu
);
393 /* Restore MSA/FPU state */
404 run
->exit_reason
= KVM_EXIT_INTERNAL_ERROR
;
414 static int kvm_trap_emul_vm_init(struct kvm
*kvm
)
419 static int kvm_trap_emul_vcpu_init(struct kvm_vcpu
*vcpu
)
421 vcpu
->arch
.kscratch_enabled
= 0xfc;
426 static int kvm_trap_emul_vcpu_setup(struct kvm_vcpu
*vcpu
)
428 struct mips_coproc
*cop0
= vcpu
->arch
.cop0
;
430 int vcpu_id
= vcpu
->vcpu_id
;
433 * Arch specific stuff, set up config registers properly so that the
434 * guest will come up as expected, for now we simulate a MIPS 24kc
436 kvm_write_c0_guest_prid(cop0
, 0x00019300);
437 /* Have config1, Cacheable, noncoherent, write-back, write allocate */
438 kvm_write_c0_guest_config(cop0
, MIPS_CONF_M
| (0x3 << CP0C0_K0
) |
440 (MMU_TYPE_R4000
<< CP0C0_MT
));
442 /* Read the cache characteristics from the host Config1 Register */
443 config1
= (read_c0_config1() & ~0x7f);
445 /* Set up MMU size */
446 config1
&= ~(0x3f << 25);
447 config1
|= ((KVM_MIPS_GUEST_TLB_SIZE
- 1) << 25);
449 /* We unset some bits that we aren't emulating */
451 ~((1 << CP0C1_C2
) | (1 << CP0C1_MD
) | (1 << CP0C1_PC
) |
452 (1 << CP0C1_WR
) | (1 << CP0C1_CA
));
453 kvm_write_c0_guest_config1(cop0
, config1
);
455 /* Have config3, no tertiary/secondary caches implemented */
456 kvm_write_c0_guest_config2(cop0
, MIPS_CONF_M
);
457 /* MIPS_CONF_M | (read_c0_config2() & 0xfff) */
459 /* Have config4, UserLocal */
460 kvm_write_c0_guest_config3(cop0
, MIPS_CONF_M
| MIPS_CONF3_ULRI
);
463 kvm_write_c0_guest_config4(cop0
, MIPS_CONF_M
);
466 kvm_write_c0_guest_config5(cop0
, 0);
468 /* Set Wait IE/IXMT Ignore in Config7, IAR, AR */
469 kvm_write_c0_guest_config7(cop0
, (MIPS_CONF7_WII
) | (1 << 10));
472 * Setup IntCtl defaults, compatibility mode for timer interrupts (HW5)
474 kvm_write_c0_guest_intctl(cop0
, 0xFC000000);
476 /* Put in vcpu id as CPUNum into Ebase Reg to handle SMP Guests */
477 kvm_write_c0_guest_ebase(cop0
, KVM_GUEST_KSEG0
|
478 (vcpu_id
& MIPS_EBASE_CPUNUM
));
483 static unsigned long kvm_trap_emul_num_regs(struct kvm_vcpu
*vcpu
)
488 static int kvm_trap_emul_copy_reg_indices(struct kvm_vcpu
*vcpu
,
494 static int kvm_trap_emul_get_one_reg(struct kvm_vcpu
*vcpu
,
495 const struct kvm_one_reg
*reg
,
499 case KVM_REG_MIPS_CP0_COUNT
:
500 *v
= kvm_mips_read_count(vcpu
);
502 case KVM_REG_MIPS_COUNT_CTL
:
503 *v
= vcpu
->arch
.count_ctl
;
505 case KVM_REG_MIPS_COUNT_RESUME
:
506 *v
= ktime_to_ns(vcpu
->arch
.count_resume
);
508 case KVM_REG_MIPS_COUNT_HZ
:
509 *v
= vcpu
->arch
.count_hz
;
517 static int kvm_trap_emul_set_one_reg(struct kvm_vcpu
*vcpu
,
518 const struct kvm_one_reg
*reg
,
521 struct mips_coproc
*cop0
= vcpu
->arch
.cop0
;
523 unsigned int cur
, change
;
526 case KVM_REG_MIPS_CP0_COUNT
:
527 kvm_mips_write_count(vcpu
, v
);
529 case KVM_REG_MIPS_CP0_COMPARE
:
530 kvm_mips_write_compare(vcpu
, v
, false);
532 case KVM_REG_MIPS_CP0_CAUSE
:
534 * If the timer is stopped or started (DC bit) it must look
535 * atomic with changes to the interrupt pending bits (TI, IRQ5).
536 * A timer interrupt should not happen in between.
538 if ((kvm_read_c0_guest_cause(cop0
) ^ v
) & CAUSEF_DC
) {
540 /* disable timer first */
541 kvm_mips_count_disable_cause(vcpu
);
542 kvm_change_c0_guest_cause(cop0
, ~CAUSEF_DC
, v
);
544 /* enable timer last */
545 kvm_change_c0_guest_cause(cop0
, ~CAUSEF_DC
, v
);
546 kvm_mips_count_enable_cause(vcpu
);
549 kvm_write_c0_guest_cause(cop0
, v
);
552 case KVM_REG_MIPS_CP0_CONFIG
:
553 /* read-only for now */
555 case KVM_REG_MIPS_CP0_CONFIG1
:
556 cur
= kvm_read_c0_guest_config1(cop0
);
557 change
= (cur
^ v
) & kvm_mips_config1_wrmask(vcpu
);
560 kvm_write_c0_guest_config1(cop0
, v
);
563 case KVM_REG_MIPS_CP0_CONFIG2
:
564 /* read-only for now */
566 case KVM_REG_MIPS_CP0_CONFIG3
:
567 cur
= kvm_read_c0_guest_config3(cop0
);
568 change
= (cur
^ v
) & kvm_mips_config3_wrmask(vcpu
);
571 kvm_write_c0_guest_config3(cop0
, v
);
574 case KVM_REG_MIPS_CP0_CONFIG4
:
575 cur
= kvm_read_c0_guest_config4(cop0
);
576 change
= (cur
^ v
) & kvm_mips_config4_wrmask(vcpu
);
579 kvm_write_c0_guest_config4(cop0
, v
);
582 case KVM_REG_MIPS_CP0_CONFIG5
:
583 cur
= kvm_read_c0_guest_config5(cop0
);
584 change
= (cur
^ v
) & kvm_mips_config5_wrmask(vcpu
);
587 kvm_write_c0_guest_config5(cop0
, v
);
590 case KVM_REG_MIPS_COUNT_CTL
:
591 ret
= kvm_mips_set_count_ctl(vcpu
, v
);
593 case KVM_REG_MIPS_COUNT_RESUME
:
594 ret
= kvm_mips_set_count_resume(vcpu
, v
);
596 case KVM_REG_MIPS_COUNT_HZ
:
597 ret
= kvm_mips_set_count_hz(vcpu
, v
);
605 static int kvm_trap_emul_vcpu_get_regs(struct kvm_vcpu
*vcpu
)
612 static int kvm_trap_emul_vcpu_set_regs(struct kvm_vcpu
*vcpu
)
617 static struct kvm_mips_callbacks kvm_trap_emul_callbacks
= {
619 .handle_cop_unusable
= kvm_trap_emul_handle_cop_unusable
,
620 .handle_tlb_mod
= kvm_trap_emul_handle_tlb_mod
,
621 .handle_tlb_st_miss
= kvm_trap_emul_handle_tlb_st_miss
,
622 .handle_tlb_ld_miss
= kvm_trap_emul_handle_tlb_ld_miss
,
623 .handle_addr_err_st
= kvm_trap_emul_handle_addr_err_st
,
624 .handle_addr_err_ld
= kvm_trap_emul_handle_addr_err_ld
,
625 .handle_syscall
= kvm_trap_emul_handle_syscall
,
626 .handle_res_inst
= kvm_trap_emul_handle_res_inst
,
627 .handle_break
= kvm_trap_emul_handle_break
,
628 .handle_trap
= kvm_trap_emul_handle_trap
,
629 .handle_msa_fpe
= kvm_trap_emul_handle_msa_fpe
,
630 .handle_fpe
= kvm_trap_emul_handle_fpe
,
631 .handle_msa_disabled
= kvm_trap_emul_handle_msa_disabled
,
633 .vm_init
= kvm_trap_emul_vm_init
,
634 .vcpu_init
= kvm_trap_emul_vcpu_init
,
635 .vcpu_setup
= kvm_trap_emul_vcpu_setup
,
636 .gva_to_gpa
= kvm_trap_emul_gva_to_gpa_cb
,
637 .queue_timer_int
= kvm_mips_queue_timer_int_cb
,
638 .dequeue_timer_int
= kvm_mips_dequeue_timer_int_cb
,
639 .queue_io_int
= kvm_mips_queue_io_int_cb
,
640 .dequeue_io_int
= kvm_mips_dequeue_io_int_cb
,
641 .irq_deliver
= kvm_mips_irq_deliver_cb
,
642 .irq_clear
= kvm_mips_irq_clear_cb
,
643 .num_regs
= kvm_trap_emul_num_regs
,
644 .copy_reg_indices
= kvm_trap_emul_copy_reg_indices
,
645 .get_one_reg
= kvm_trap_emul_get_one_reg
,
646 .set_one_reg
= kvm_trap_emul_set_one_reg
,
647 .vcpu_get_regs
= kvm_trap_emul_vcpu_get_regs
,
648 .vcpu_set_regs
= kvm_trap_emul_vcpu_set_regs
,
651 int kvm_mips_emulation_init(struct kvm_mips_callbacks
**install_callbacks
)
653 *install_callbacks
= &kvm_trap_emul_callbacks
;