Lines Matching refs:svcpu
98 struct kvmppc_book3s_shadow_vcpu *svcpu = svcpu_get(vcpu); in kvmppc_core_vcpu_load_pr() local
99 memcpy(svcpu->slb, to_book3s(vcpu)->slb_shadow, sizeof(svcpu->slb)); in kvmppc_core_vcpu_load_pr()
100 svcpu->slb_max = to_book3s(vcpu)->slb_shadow_max; in kvmppc_core_vcpu_load_pr()
101 svcpu->in_use = 0; in kvmppc_core_vcpu_load_pr()
102 svcpu_put(svcpu); in kvmppc_core_vcpu_load_pr()
122 struct kvmppc_book3s_shadow_vcpu *svcpu = svcpu_get(vcpu); in kvmppc_core_vcpu_put_pr() local
123 if (svcpu->in_use) { in kvmppc_core_vcpu_put_pr()
124 kvmppc_copy_from_svcpu(vcpu, svcpu); in kvmppc_core_vcpu_put_pr()
126 memcpy(to_book3s(vcpu)->slb_shadow, svcpu->slb, sizeof(svcpu->slb)); in kvmppc_core_vcpu_put_pr()
127 to_book3s(vcpu)->slb_shadow_max = svcpu->slb_max; in kvmppc_core_vcpu_put_pr()
128 svcpu_put(svcpu); in kvmppc_core_vcpu_put_pr()
146 void kvmppc_copy_to_svcpu(struct kvmppc_book3s_shadow_vcpu *svcpu, in kvmppc_copy_to_svcpu() argument
149 svcpu->gpr[0] = vcpu->arch.gpr[0]; in kvmppc_copy_to_svcpu()
150 svcpu->gpr[1] = vcpu->arch.gpr[1]; in kvmppc_copy_to_svcpu()
151 svcpu->gpr[2] = vcpu->arch.gpr[2]; in kvmppc_copy_to_svcpu()
152 svcpu->gpr[3] = vcpu->arch.gpr[3]; in kvmppc_copy_to_svcpu()
153 svcpu->gpr[4] = vcpu->arch.gpr[4]; in kvmppc_copy_to_svcpu()
154 svcpu->gpr[5] = vcpu->arch.gpr[5]; in kvmppc_copy_to_svcpu()
155 svcpu->gpr[6] = vcpu->arch.gpr[6]; in kvmppc_copy_to_svcpu()
156 svcpu->gpr[7] = vcpu->arch.gpr[7]; in kvmppc_copy_to_svcpu()
157 svcpu->gpr[8] = vcpu->arch.gpr[8]; in kvmppc_copy_to_svcpu()
158 svcpu->gpr[9] = vcpu->arch.gpr[9]; in kvmppc_copy_to_svcpu()
159 svcpu->gpr[10] = vcpu->arch.gpr[10]; in kvmppc_copy_to_svcpu()
160 svcpu->gpr[11] = vcpu->arch.gpr[11]; in kvmppc_copy_to_svcpu()
161 svcpu->gpr[12] = vcpu->arch.gpr[12]; in kvmppc_copy_to_svcpu()
162 svcpu->gpr[13] = vcpu->arch.gpr[13]; in kvmppc_copy_to_svcpu()
163 svcpu->cr = vcpu->arch.cr; in kvmppc_copy_to_svcpu()
164 svcpu->xer = vcpu->arch.xer; in kvmppc_copy_to_svcpu()
165 svcpu->ctr = vcpu->arch.ctr; in kvmppc_copy_to_svcpu()
166 svcpu->lr = vcpu->arch.lr; in kvmppc_copy_to_svcpu()
167 svcpu->pc = vcpu->arch.pc; in kvmppc_copy_to_svcpu()
169 svcpu->shadow_fscr = vcpu->arch.shadow_fscr; in kvmppc_copy_to_svcpu()
179 svcpu->in_use = true; in kvmppc_copy_to_svcpu()
184 struct kvmppc_book3s_shadow_vcpu *svcpu) in kvmppc_copy_from_svcpu() argument
196 if (!svcpu->in_use) in kvmppc_copy_from_svcpu()
199 vcpu->arch.gpr[0] = svcpu->gpr[0]; in kvmppc_copy_from_svcpu()
200 vcpu->arch.gpr[1] = svcpu->gpr[1]; in kvmppc_copy_from_svcpu()
201 vcpu->arch.gpr[2] = svcpu->gpr[2]; in kvmppc_copy_from_svcpu()
202 vcpu->arch.gpr[3] = svcpu->gpr[3]; in kvmppc_copy_from_svcpu()
203 vcpu->arch.gpr[4] = svcpu->gpr[4]; in kvmppc_copy_from_svcpu()
204 vcpu->arch.gpr[5] = svcpu->gpr[5]; in kvmppc_copy_from_svcpu()
205 vcpu->arch.gpr[6] = svcpu->gpr[6]; in kvmppc_copy_from_svcpu()
206 vcpu->arch.gpr[7] = svcpu->gpr[7]; in kvmppc_copy_from_svcpu()
207 vcpu->arch.gpr[8] = svcpu->gpr[8]; in kvmppc_copy_from_svcpu()
208 vcpu->arch.gpr[9] = svcpu->gpr[9]; in kvmppc_copy_from_svcpu()
209 vcpu->arch.gpr[10] = svcpu->gpr[10]; in kvmppc_copy_from_svcpu()
210 vcpu->arch.gpr[11] = svcpu->gpr[11]; in kvmppc_copy_from_svcpu()
211 vcpu->arch.gpr[12] = svcpu->gpr[12]; in kvmppc_copy_from_svcpu()
212 vcpu->arch.gpr[13] = svcpu->gpr[13]; in kvmppc_copy_from_svcpu()
213 vcpu->arch.cr = svcpu->cr; in kvmppc_copy_from_svcpu()
214 vcpu->arch.xer = svcpu->xer; in kvmppc_copy_from_svcpu()
215 vcpu->arch.ctr = svcpu->ctr; in kvmppc_copy_from_svcpu()
216 vcpu->arch.lr = svcpu->lr; in kvmppc_copy_from_svcpu()
217 vcpu->arch.pc = svcpu->pc; in kvmppc_copy_from_svcpu()
218 vcpu->arch.shadow_srr1 = svcpu->shadow_srr1; in kvmppc_copy_from_svcpu()
219 vcpu->arch.fault_dar = svcpu->fault_dar; in kvmppc_copy_from_svcpu()
220 vcpu->arch.fault_dsisr = svcpu->fault_dsisr; in kvmppc_copy_from_svcpu()
221 vcpu->arch.last_inst = svcpu->last_inst; in kvmppc_copy_from_svcpu()
223 vcpu->arch.shadow_fscr = svcpu->shadow_fscr; in kvmppc_copy_from_svcpu()
233 svcpu->in_use = false; in kvmppc_copy_from_svcpu()
1001 struct kvmppc_book3s_shadow_vcpu *svcpu; in kvmppc_handle_exit_pr() local
1004 svcpu = svcpu_get(vcpu); in kvmppc_handle_exit_pr()
1005 sr = svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT]; in kvmppc_handle_exit_pr()
1006 svcpu_put(svcpu); in kvmppc_handle_exit_pr()
1049 struct kvmppc_book3s_shadow_vcpu *svcpu; in kvmppc_handle_exit_pr() local
1052 svcpu = svcpu_get(vcpu); in kvmppc_handle_exit_pr()
1053 sr = svcpu->sr[dar >> SID_SHIFT]; in kvmppc_handle_exit_pr()
1054 svcpu_put(svcpu); in kvmppc_handle_exit_pr()