Lines Matching refs:vcpu_e500
120 static void *kvmppc_e500_id_table_alloc(struct kvmppc_vcpu_e500 *vcpu_e500) in kvmppc_e500_id_table_alloc() argument
122 vcpu_e500->idt = kzalloc(sizeof(struct vcpu_id_table), GFP_KERNEL); in kvmppc_e500_id_table_alloc()
123 return vcpu_e500->idt; in kvmppc_e500_id_table_alloc()
126 static void kvmppc_e500_id_table_free(struct kvmppc_vcpu_e500 *vcpu_e500) in kvmppc_e500_id_table_free() argument
128 kfree(vcpu_e500->idt); in kvmppc_e500_id_table_free()
129 vcpu_e500->idt = NULL; in kvmppc_e500_id_table_free()
136 static void kvmppc_e500_recalc_shadow_pid(struct kvmppc_vcpu_e500 *vcpu_e500) in kvmppc_e500_recalc_shadow_pid() argument
139 vcpu_e500->vcpu.arch.shadow_pid = kvmppc_e500_get_sid(vcpu_e500, in kvmppc_e500_recalc_shadow_pid()
140 get_cur_as(&vcpu_e500->vcpu), in kvmppc_e500_recalc_shadow_pid()
141 get_cur_pid(&vcpu_e500->vcpu), in kvmppc_e500_recalc_shadow_pid()
142 get_cur_pr(&vcpu_e500->vcpu), 1); in kvmppc_e500_recalc_shadow_pid()
143 vcpu_e500->vcpu.arch.shadow_pid1 = kvmppc_e500_get_sid(vcpu_e500, in kvmppc_e500_recalc_shadow_pid()
144 get_cur_as(&vcpu_e500->vcpu), 0, in kvmppc_e500_recalc_shadow_pid()
145 get_cur_pr(&vcpu_e500->vcpu), 1); in kvmppc_e500_recalc_shadow_pid()
150 static void kvmppc_e500_id_table_reset_all(struct kvmppc_vcpu_e500 *vcpu_e500) in kvmppc_e500_id_table_reset_all() argument
152 memset(vcpu_e500->idt, 0, sizeof(struct vcpu_id_table)); in kvmppc_e500_id_table_reset_all()
155 kvmppc_e500_recalc_shadow_pid(vcpu_e500); in kvmppc_e500_id_table_reset_all()
160 struct kvmppc_vcpu_e500 *vcpu_e500, in kvmppc_e500_id_table_reset_one() argument
163 struct vcpu_id_table *idt = vcpu_e500->idt; in kvmppc_e500_id_table_reset_one()
173 kvmppc_e500_recalc_shadow_pid(vcpu_e500); in kvmppc_e500_id_table_reset_one()
185 unsigned int kvmppc_e500_get_sid(struct kvmppc_vcpu_e500 *vcpu_e500, in kvmppc_e500_get_sid() argument
189 struct vcpu_id_table *idt = vcpu_e500->idt; in kvmppc_e500_get_sid()
208 kvmppc_e500_recalc_shadow_pid(vcpu_e500); in kvmppc_e500_get_sid()
223 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); in kvmppc_set_pid() local
226 vcpu_e500->pid[0] = vcpu->arch.pid = pid; in kvmppc_set_pid()
227 kvmppc_e500_recalc_shadow_pid(vcpu_e500); in kvmppc_set_pid()
232 void kvmppc_e500_tlbil_one(struct kvmppc_vcpu_e500 *vcpu_e500, in kvmppc_e500_tlbil_one() argument
235 struct vcpu_id_table *idt = vcpu_e500->idt; in kvmppc_e500_tlbil_one()
259 kvmppc_e500_id_table_reset_one(vcpu_e500, ts, tid, pr); in kvmppc_e500_tlbil_one()
288 void kvmppc_e500_tlbil_all(struct kvmppc_vcpu_e500 *vcpu_e500) in kvmppc_e500_tlbil_all() argument
290 kvmppc_e500_id_table_reset_all(vcpu_e500); in kvmppc_e500_tlbil_all()
329 static void kvmppc_e500_tlb_setup(struct kvmppc_vcpu_e500 *vcpu_e500) in kvmppc_e500_tlb_setup() argument
334 tlbe = get_entry(vcpu_e500, 1, 0); in kvmppc_e500_tlb_setup()
340 tlbe = get_entry(vcpu_e500, 1, 1); in kvmppc_e500_tlb_setup()
348 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); in kvmppc_core_vcpu_setup() local
350 kvmppc_e500_tlb_setup(vcpu_e500); in kvmppc_core_vcpu_setup()
354 vcpu_e500->svr = mfspr(SPRN_SVR); in kvmppc_core_vcpu_setup()
364 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); in kvmppc_core_get_sregs_e500() local
371 sregs->u.e.impl.fsl.svr = vcpu_e500->svr; in kvmppc_core_get_sregs_e500()
372 sregs->u.e.impl.fsl.hid0 = vcpu_e500->hid0; in kvmppc_core_get_sregs_e500()
373 sregs->u.e.impl.fsl.mcar = vcpu_e500->mcar; in kvmppc_core_get_sregs_e500()
389 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); in kvmppc_core_set_sregs_e500() local
393 vcpu_e500->svr = sregs->u.e.impl.fsl.svr; in kvmppc_core_set_sregs_e500()
394 vcpu_e500->hid0 = sregs->u.e.impl.fsl.hid0; in kvmppc_core_set_sregs_e500()
395 vcpu_e500->mcar = sregs->u.e.impl.fsl.mcar; in kvmppc_core_set_sregs_e500()
438 struct kvmppc_vcpu_e500 *vcpu_e500; in kvmppc_core_vcpu_create_e500() local
442 vcpu_e500 = to_e500(vcpu); in kvmppc_core_vcpu_create_e500()
444 if (kvmppc_e500_id_table_alloc(vcpu_e500) == NULL) in kvmppc_core_vcpu_create_e500()
447 err = kvmppc_e500_tlb_init(vcpu_e500); in kvmppc_core_vcpu_create_e500()
460 kvmppc_e500_tlb_uninit(vcpu_e500); in kvmppc_core_vcpu_create_e500()
462 kvmppc_e500_id_table_free(vcpu_e500); in kvmppc_core_vcpu_create_e500()
468 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); in kvmppc_core_vcpu_free_e500() local
471 kvmppc_e500_tlb_uninit(vcpu_e500); in kvmppc_core_vcpu_free_e500()
472 kvmppc_e500_id_table_free(vcpu_e500); in kvmppc_core_vcpu_free_e500()