Lines Matching refs:arch
12 struct kvmppc_vcore *vc = vcpu->arch.vcore; in __start_timing()
15 vcpu->arch.cur_activity = next; in __start_timing()
16 vcpu->arch.cur_tb_start = tb; in __start_timing()
21 struct kvmppc_vcore *vc = vcpu->arch.vcore; in __accumulate_time()
28 curr = vcpu->arch.cur_activity; in __accumulate_time()
29 vcpu->arch.cur_activity = next; in __accumulate_time()
30 prev_tb = vcpu->arch.cur_tb_start; in __accumulate_time()
31 vcpu->arch.cur_tb_start = tb; in __accumulate_time()
97 struct kvm_nested_guest *nested = vcpu->arch.nested; in switch_mmu_to_guest_radix()
100 lpid = nested ? nested->shadow_lpid : kvm->arch.lpid; in switch_mmu_to_guest_radix()
112 mtspr(SPRN_PID, vcpu->arch.pid); in switch_mmu_to_guest_radix()
121 lpid = kvm->arch.lpid; in switch_mmu_to_guest_hpt()
125 mtspr(SPRN_PID, vcpu->arch.pid); in switch_mmu_to_guest_hpt()
127 for (i = 0; i < vcpu->arch.slb_max; i++) in switch_mmu_to_guest_hpt()
128 mtslb(vcpu->arch.slb[i].orige, vcpu->arch.slb[i].origv); in switch_mmu_to_guest_hpt()
138 mtspr(SPRN_LPID, kvm->arch.host_lpid); in switch_mmu_to_host()
140 mtspr(SPRN_LPCR, kvm->arch.host_lpcr); in switch_mmu_to_host()
172 for (i = 0; i < vcpu->arch.slb_nr; i++) { in save_clear_guest_mmu()
176 vcpu->arch.slb[nr].orige = slbee | i; in save_clear_guest_mmu()
177 vcpu->arch.slb[nr].origv = slbev; in save_clear_guest_mmu()
181 vcpu->arch.slb_max = nr; in save_clear_guest_mmu()
189 struct kvm_nested_guest *nested = vcpu->arch.nested; in kvmhv_vcpu_entry_p9()
190 struct kvmppc_vcore *vc = vcpu->arch.vcore; in kvmhv_vcpu_entry_p9()
210 WARN_ON_ONCE(vcpu->arch.shregs.msr & MSR_HV); in kvmhv_vcpu_entry_p9()
211 WARN_ON_ONCE(!(vcpu->arch.shregs.msr & MSR_ME)); in kvmhv_vcpu_entry_p9()
213 start_timing(vcpu, &vcpu->arch.rm_entry); in kvmhv_vcpu_entry_p9()
215 vcpu->arch.ceded = 0; in kvmhv_vcpu_entry_p9()
246 mtspr(SPRN_PURR, vcpu->arch.purr); in kvmhv_vcpu_entry_p9()
247 mtspr(SPRN_SPURR, vcpu->arch.spurr); in kvmhv_vcpu_entry_p9()
250 mtspr(SPRN_DAWR0, vcpu->arch.dawr0); in kvmhv_vcpu_entry_p9()
251 mtspr(SPRN_DAWRX0, vcpu->arch.dawrx0); in kvmhv_vcpu_entry_p9()
253 mtspr(SPRN_DAWR1, vcpu->arch.dawr1); in kvmhv_vcpu_entry_p9()
254 mtspr(SPRN_DAWRX1, vcpu->arch.dawrx1); in kvmhv_vcpu_entry_p9()
257 mtspr(SPRN_CIABR, vcpu->arch.ciabr); in kvmhv_vcpu_entry_p9()
258 mtspr(SPRN_IC, vcpu->arch.ic); in kvmhv_vcpu_entry_p9()
260 mtspr(SPRN_PSSCR, vcpu->arch.psscr | PSSCR_EC | in kvmhv_vcpu_entry_p9()
263 mtspr(SPRN_HFSCR, vcpu->arch.hfscr); in kvmhv_vcpu_entry_p9()
265 mtspr(SPRN_HSRR0, vcpu->arch.regs.nip); in kvmhv_vcpu_entry_p9()
266 mtspr(SPRN_HSRR1, (vcpu->arch.shregs.msr & ~MSR_HV) | MSR_ME); in kvmhv_vcpu_entry_p9()
283 mtspr(SPRN_SPRG0, vcpu->arch.shregs.sprg0); in kvmhv_vcpu_entry_p9()
284 mtspr(SPRN_SPRG1, vcpu->arch.shregs.sprg1); in kvmhv_vcpu_entry_p9()
285 mtspr(SPRN_SPRG2, vcpu->arch.shregs.sprg2); in kvmhv_vcpu_entry_p9()
286 mtspr(SPRN_SPRG3, vcpu->arch.shregs.sprg3); in kvmhv_vcpu_entry_p9()
323 mtspr(SPRN_DAR, vcpu->arch.shregs.dar); in kvmhv_vcpu_entry_p9()
324 mtspr(SPRN_DSISR, vcpu->arch.shregs.dsisr); in kvmhv_vcpu_entry_p9()
325 mtspr(SPRN_SRR0, vcpu->arch.shregs.srr0); in kvmhv_vcpu_entry_p9()
326 mtspr(SPRN_SRR1, vcpu->arch.shregs.srr1); in kvmhv_vcpu_entry_p9()
328 accumulate_time(vcpu, &vcpu->arch.guest_time); in kvmhv_vcpu_entry_p9()
332 accumulate_time(vcpu, &vcpu->arch.rm_intr); in kvmhv_vcpu_entry_p9()
335 vcpu->arch.shregs.srr0 = mfspr(SPRN_SRR0); in kvmhv_vcpu_entry_p9()
336 vcpu->arch.shregs.srr1 = mfspr(SPRN_SRR1); in kvmhv_vcpu_entry_p9()
337 vcpu->arch.shregs.dar = mfspr(SPRN_DAR); in kvmhv_vcpu_entry_p9()
338 vcpu->arch.shregs.dsisr = mfspr(SPRN_DSISR); in kvmhv_vcpu_entry_p9()
347 (vcpu->arch.shregs.msr & MSR_RI)) in kvmhv_vcpu_entry_p9()
356 vcpu->arch.regs.gpr[1] = local_paca->kvm_hstate.scratch1; in kvmhv_vcpu_entry_p9()
357 vcpu->arch.regs.gpr[3] = local_paca->kvm_hstate.scratch2; in kvmhv_vcpu_entry_p9()
374 vcpu->arch.regs.gpr[9] = exsave[EX_R9/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
375 vcpu->arch.regs.gpr[10] = exsave[EX_R10/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
376 vcpu->arch.regs.gpr[11] = exsave[EX_R11/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
377 vcpu->arch.regs.gpr[12] = exsave[EX_R12/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
378 vcpu->arch.regs.gpr[13] = exsave[EX_R13/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
379 vcpu->arch.ppr = exsave[EX_PPR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
380 vcpu->arch.cfar = exsave[EX_CFAR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
381 vcpu->arch.regs.ctr = exsave[EX_CTR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
383 vcpu->arch.last_inst = KVM_INST_FETCH_FAILED; in kvmhv_vcpu_entry_p9()
386 vcpu->arch.fault_dar = exsave[EX_DAR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
387 vcpu->arch.fault_dsisr = exsave[EX_DSISR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
394 vcpu->arch.emul_inst = mfspr(SPRN_HEIR); in kvmhv_vcpu_entry_p9()
397 vcpu->arch.fault_dar = exsave[EX_DAR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
398 vcpu->arch.fault_dsisr = exsave[EX_DSISR/sizeof(u64)]; in kvmhv_vcpu_entry_p9()
399 vcpu->arch.fault_gpa = mfspr(SPRN_ASDR); in kvmhv_vcpu_entry_p9()
402 vcpu->arch.fault_gpa = mfspr(SPRN_ASDR); in kvmhv_vcpu_entry_p9()
405 vcpu->arch.hfscr = mfspr(SPRN_HFSCR); in kvmhv_vcpu_entry_p9()
414 vcpu->arch.emul_inst = mfspr(SPRN_HEIR); in kvmhv_vcpu_entry_p9()
422 (vcpu->arch.shregs.msr & MSR_TS_S)) { in kvmhv_vcpu_entry_p9()
428 mtspr(SPRN_HSRR0, vcpu->arch.regs.nip); in kvmhv_vcpu_entry_p9()
429 mtspr(SPRN_HSRR1, vcpu->arch.shregs.msr); in kvmhv_vcpu_entry_p9()
443 accumulate_time(vcpu, &vcpu->arch.rm_exit); in kvmhv_vcpu_entry_p9()
449 purr - vcpu->arch.purr); in kvmhv_vcpu_entry_p9()
451 spurr - vcpu->arch.spurr); in kvmhv_vcpu_entry_p9()
452 vcpu->arch.purr = purr; in kvmhv_vcpu_entry_p9()
453 vcpu->arch.spurr = spurr; in kvmhv_vcpu_entry_p9()
455 vcpu->arch.ic = mfspr(SPRN_IC); in kvmhv_vcpu_entry_p9()
456 vcpu->arch.pid = mfspr(SPRN_PID); in kvmhv_vcpu_entry_p9()
457 vcpu->arch.psscr = mfspr(SPRN_PSSCR) & PSSCR_GUEST_VIS; in kvmhv_vcpu_entry_p9()
459 vcpu->arch.shregs.sprg0 = mfspr(SPRN_SPRG0); in kvmhv_vcpu_entry_p9()
460 vcpu->arch.shregs.sprg1 = mfspr(SPRN_SPRG1); in kvmhv_vcpu_entry_p9()
461 vcpu->arch.shregs.sprg2 = mfspr(SPRN_SPRG2); in kvmhv_vcpu_entry_p9()
462 vcpu->arch.shregs.sprg3 = mfspr(SPRN_SPRG3); in kvmhv_vcpu_entry_p9()
518 vcpu->arch.shregs.msr & MSR_TS_MASK) in kvmhv_vcpu_entry_p9()