Lines Matching refs:mode
115 unsigned long mode = *vcpu_cpsr(vcpu) & COMPAT_PSR_MODE_MASK; in vcpu_reg32() local
117 switch (mode) { in vcpu_reg32()
119 mode &= ~PSR_MODE32_BIT; /* 0 ... 3 */ in vcpu_reg32()
123 mode = 4; in vcpu_reg32()
127 mode = 5; in vcpu_reg32()
131 mode = 0; /* SYS maps to USR */ in vcpu_reg32()
138 return reg_array + vcpu_reg_offsets[mode][reg_num]; in vcpu_reg32()
146 unsigned long mode = *vcpu_cpsr(vcpu) & COMPAT_PSR_MODE_MASK; in vcpu_spsr32() local
147 switch (mode) { in vcpu_spsr32()
149 mode = KVM_SPSR_SVC; in vcpu_spsr32()
152 mode = KVM_SPSR_ABT; in vcpu_spsr32()
155 mode = KVM_SPSR_UND; in vcpu_spsr32()
158 mode = KVM_SPSR_IRQ; in vcpu_spsr32()
161 mode = KVM_SPSR_FIQ; in vcpu_spsr32()
167 return (unsigned long *)&vcpu_gp_regs(vcpu)->spsr[mode]; in vcpu_spsr32()