Lines Matching +full:num +full:- +full:guest +full:- +full:ids

29 /* MIPS KVM register ids */
102 #define KVM_HVA_ERR_BAD (-1UL)
103 #define KVM_HVA_ERR_RO_BAD (-2UL)
176 /* Guest physical mm */
247 #define RESUME_FLAG_DR (1<<0) /* Reload guest nonvolatile state? */
260 EMULATE_EXCEPT, /* A guest exception has been generated */
265 #define VPN2_MASK GENMASK(cpu_vmbits - 1, 13)
294 /* Host registers preserved across guest mode execution */
300 /* Host CP0 registers used when handling exits from guest */
353 /* wired guest TLB entries */
358 /* emulated guest MAAR registers */
363 /* Last CPU the VCPU actually executed guest code on */
426 /* Guest register types, used in accessor build below */
432 * These operate on the saved guest C0 state in RAM.
439 return cop0->reg[(_reg)][(sel)]; \
444 cop0->reg[(_reg)][(sel)] = val; \
452 cop0->reg[(_reg)][(sel)] |= val; \
457 cop0->reg[(_reg)][(sel)] &= ~val; \
464 cop0->reg[(_reg)][(sel)] &= ~_mask; \
465 cop0->reg[(_reg)][(sel)] |= val & _mask; \
473 _kvm_atomic_set_c0_guest_reg(&cop0->reg[(_reg)][(sel)], val); \
478 _kvm_atomic_clear_c0_guest_reg(&cop0->reg[(_reg)][(sel)], val); \
484 _kvm_atomic_change_c0_guest_reg(&cop0->reg[(_reg)][(sel)], mask, \
490 * These operate on the VZ guest C0 context in hardware.
493 /* Generate VZ guest context simple accessors */
505 /* Generate VZ guest context bitwise modifiers */
524 /* Generate VZ guest context save/restore to/from saved context */
528 write_gc0_##name(cop0->reg[(_reg)][(sel)]); \
532 cop0->reg[(_reg)][(sel)] = read_gc0_##name(); \
536 * __BUILD_KVM_$ops_WRAP(): kvm_$op_$name1() -> kvm_$op_$name2()
572 * __BUILD_KVM_$ops_SW(): kvm_$op_c0_guest_$reg() -> kvm_$op_sw_gc0_$reg()
574 * with the common guest C0 accessors (for use by common emulation code).
591 * These macros use the active guest state in VZ mode (hardware registers),
595 * __BUILD_KVM_$ops_HW(): kvm_$op_c0_guest_$reg() -> kvm_$op_vz_gc0_$reg()
596 * These generate accessors operating on the VZ guest context in hardware, and
597 * wrap them with the common guest C0 accessors (for use by common emulation
622 * Define accessors for CP0 registers that are accessible to the guest. These
626 * fns_hw/sw name type reg num select
695 vcpu->fpu_enabled; in kvm_mips_guest_can_have_fpu()
701 kvm_read_c0_guest_config1(&vcpu->cop0) & MIPS_CONF1_FP; in kvm_mips_guest_has_fpu()
707 vcpu->msa_enabled; in kvm_mips_guest_can_have_msa()
713 kvm_read_c0_guest_config3(&vcpu->cop0) & MIPS_CONF3_MSA; in kvm_mips_guest_has_msa()
819 * kvm_is_ifetch_fault() - Find whether a TLBL exception is due to ifetch fault.
827 unsigned long badvaddr = vcpu->host_cp0_badvaddr; in kvm_is_ifetch_fault()
828 unsigned long epc = msk_isa16_mode(vcpu->pc); in kvm_is_ifetch_fault()
829 u32 cause = vcpu->host_cp0_cause; in kvm_is_ifetch_fault()
835 * Branches may be 32-bit or 16-bit instructions. in kvm_is_ifetch_fault()
839 if ((cause & CAUSEF_BD) && badvaddr - epc <= 4) in kvm_is_ifetch_fault()