Lines Matching refs:arch
80 printk("pc: %08lx msr: %08llx\n", vcpu->arch.regs.nip, in kvmppc_dump_vcpu()
81 vcpu->arch.shared->msr); in kvmppc_dump_vcpu()
82 printk("lr: %08lx ctr: %08lx\n", vcpu->arch.regs.link, in kvmppc_dump_vcpu()
83 vcpu->arch.regs.ctr); in kvmppc_dump_vcpu()
84 printk("srr0: %08llx srr1: %08llx\n", vcpu->arch.shared->srr0, in kvmppc_dump_vcpu()
85 vcpu->arch.shared->srr1); in kvmppc_dump_vcpu()
87 printk("exceptions: %08lx\n", vcpu->arch.pending_exceptions); in kvmppc_dump_vcpu()
105 vcpu->arch.shadow_msr &= ~MSR_SPE; in kvmppc_vcpu_disable_spe()
115 vcpu->arch.shadow_msr |= MSR_SPE; in kvmppc_vcpu_enable_spe()
121 if (vcpu->arch.shared->msr & MSR_SPE) { in kvmppc_vcpu_sync_spe()
122 if (!(vcpu->arch.shadow_msr & MSR_SPE)) in kvmppc_vcpu_sync_spe()
124 } else if (vcpu->arch.shadow_msr & MSR_SPE) { in kvmppc_vcpu_sync_spe()
148 load_fp_state(&vcpu->arch.fp); in kvmppc_load_guest_fp()
150 current->thread.fp_save_area = &vcpu->arch.fp; in kvmppc_load_guest_fp()
174 vcpu->arch.shadow_msr &= ~MSR_FP; in kvmppc_vcpu_sync_fpu()
175 vcpu->arch.shadow_msr |= vcpu->arch.shared->msr & MSR_FP; in kvmppc_vcpu_sync_fpu()
190 load_vr_state(&vcpu->arch.vr); in kvmppc_load_guest_altivec()
192 current->thread.vr_save_area = &vcpu->arch.vr; in kvmppc_load_guest_altivec()
218 vcpu->arch.shadow_msr &= ~MSR_DE; in kvmppc_vcpu_sync_debug()
219 vcpu->arch.shadow_msr |= vcpu->arch.shared->msr & MSR_DE; in kvmppc_vcpu_sync_debug()
229 vcpu->arch.shared->msr |= MSR_DE; in kvmppc_vcpu_sync_debug()
231 vcpu->arch.shadow_msr |= MSR_DE; in kvmppc_vcpu_sync_debug()
232 vcpu->arch.shared->msr &= ~MSR_DE; in kvmppc_vcpu_sync_debug()
243 u32 old_msr = vcpu->arch.shared->msr; in kvmppc_set_msr()
249 vcpu->arch.shared->msr = new_msr; in kvmppc_set_msr()
261 set_bit(priority, &vcpu->arch.pending_exceptions); in kvmppc_booke_queue_irqprio()
267 vcpu->arch.queued_dear = dear_flags; in kvmppc_core_queue_dtlb_miss()
268 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_dtlb_miss()
275 vcpu->arch.queued_dear = dear_flags; in kvmppc_core_queue_data_storage()
276 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_data_storage()
287 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_inst_storage()
294 vcpu->arch.queued_dear = dear_flags; in kvmppc_core_queue_alignment()
295 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_alignment()
301 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_program()
324 return test_bit(BOOKE_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions); in kvmppc_core_pending_dec()
329 clear_bit(BOOKE_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_dec()
345 clear_bit(BOOKE_IRQPRIO_EXTERNAL, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_external()
346 clear_bit(BOOKE_IRQPRIO_EXTERNAL_LEVEL, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_external()
356 clear_bit(BOOKE_IRQPRIO_WATCHDOG, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_watchdog()
366 clear_bit(BOOKE_IRQPRIO_DEBUG, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_debug()
377 vcpu->arch.csrr0 = srr0; in set_guest_csrr()
378 vcpu->arch.csrr1 = srr1; in set_guest_csrr()
384 vcpu->arch.dsrr0 = srr0; in set_guest_dsrr()
385 vcpu->arch.dsrr1 = srr1; in set_guest_dsrr()
393 vcpu->arch.mcsrr0 = srr0; in set_guest_mcsrr()
394 vcpu->arch.mcsrr1 = srr1; in set_guest_mcsrr()
404 ulong crit_raw = vcpu->arch.shared->critical; in kvmppc_booke_irqprio_deliver()
409 ulong new_msr = vcpu->arch.shared->msr; in kvmppc_booke_irqprio_deliver()
412 if (!(vcpu->arch.shared->msr & MSR_SF)) { in kvmppc_booke_irqprio_deliver()
420 crit = crit && !(vcpu->arch.shared->msr & MSR_PR); in kvmppc_booke_irqprio_deliver()
427 if ((priority == BOOKE_IRQPRIO_EXTERNAL) && vcpu->arch.epr_flags) in kvmppc_booke_irqprio_deliver()
460 allowed = vcpu->arch.shared->msr & MSR_CE; in kvmppc_booke_irqprio_deliver()
466 allowed = vcpu->arch.shared->msr & MSR_ME; in kvmppc_booke_irqprio_deliver()
476 allowed = vcpu->arch.shared->msr & MSR_EE; in kvmppc_booke_irqprio_deliver()
482 allowed = vcpu->arch.shared->msr & MSR_DE; in kvmppc_booke_irqprio_deliver()
496 set_guest_srr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
497 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
500 set_guest_csrr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
501 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
504 set_guest_dsrr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
505 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
508 set_guest_mcsrr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
509 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
513 vcpu->arch.regs.nip = vcpu->arch.ivpr | in kvmppc_booke_irqprio_deliver()
514 vcpu->arch.ivor[priority]; in kvmppc_booke_irqprio_deliver()
516 kvmppc_set_esr(vcpu, vcpu->arch.queued_esr); in kvmppc_booke_irqprio_deliver()
518 kvmppc_set_dar(vcpu, vcpu->arch.queued_dear); in kvmppc_booke_irqprio_deliver()
520 if (vcpu->arch.epr_flags & KVMPPC_EPR_USER) in kvmppc_booke_irqprio_deliver()
522 else if (vcpu->arch.epr_flags & KVMPPC_EPR_KERNEL) { in kvmppc_booke_irqprio_deliver()
523 BUG_ON(vcpu->arch.irq_type != KVMPPC_IRQ_MPIC); in kvmppc_booke_irqprio_deliver()
530 if (vcpu->arch.epcr & SPRN_EPCR_ICM) in kvmppc_booke_irqprio_deliver()
536 clear_bit(priority, &vcpu->arch.pending_exceptions); in kvmppc_booke_irqprio_deliver()
545 if (vcpu->arch.pending_exceptions & BOOKE_IRQMASK_EE) in kvmppc_booke_irqprio_deliver()
547 if (vcpu->arch.pending_exceptions & BOOKE_IRQMASK_CE) in kvmppc_booke_irqprio_deliver()
549 if (vcpu->arch.pending_exceptions & BOOKE_IRQPRIO_MACHINE_CHECK) in kvmppc_booke_irqprio_deliver()
565 u32 period = TCR_GET_WP(vcpu->arch.tcr); in watchdog_next_timeout()
596 if ((vcpu->arch.tsr & (TSR_ENW | TSR_WIS)) != (TSR_ENW | TSR_WIS)) in arm_next_watchdog()
599 spin_lock_irqsave(&vcpu->arch.wdt_lock, flags); in arm_next_watchdog()
606 mod_timer(&vcpu->arch.wdt_timer, jiffies + nr_jiffies); in arm_next_watchdog()
608 del_timer(&vcpu->arch.wdt_timer); in arm_next_watchdog()
609 spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags); in arm_next_watchdog()
614 struct kvm_vcpu *vcpu = from_timer(vcpu, t, arch.wdt_timer); in kvmppc_watchdog_func()
619 new_tsr = tsr = vcpu->arch.tsr; in kvmppc_watchdog_func()
631 } while (cmpxchg(&vcpu->arch.tsr, tsr, new_tsr) != tsr); in kvmppc_watchdog_func()
643 if (final && (vcpu->arch.tcr & TCR_WRC_MASK) && in kvmppc_watchdog_func()
644 vcpu->arch.watchdog_enabled) { in kvmppc_watchdog_func()
662 if ((vcpu->arch.tcr & TCR_DIE) && (vcpu->arch.tsr & TSR_DIS)) in update_timer_ints()
667 if ((vcpu->arch.tcr & TCR_WIE) && (vcpu->arch.tsr & TSR_WIS)) in update_timer_ints()
675 unsigned long *pending = &vcpu->arch.pending_exceptions; in kvmppc_core_check_exceptions()
689 vcpu->arch.shared->int_pending = !!*pending; in kvmppc_core_check_exceptions()
705 if (vcpu->arch.shared->msr & MSR_WE) { in kvmppc_core_prepare_to_enter()
736 vcpu->arch.epr_needed = true; in kvmppc_core_check_requests()
749 if (!vcpu->arch.sane) { in kvmppc_vcpu_run()
784 debug = vcpu->arch.dbg_reg; in kvmppc_vcpu_run()
787 current->thread.debug = vcpu->arch.dbg_reg; in kvmppc_vcpu_run()
789 vcpu->arch.pgdir = current->mm->pgd; in kvmppc_vcpu_run()
832 __func__, vcpu->arch.regs.nip, vcpu->arch.last_inst); in emulation_exit()
836 run->hw.hardware_exit_reason |= vcpu->arch.last_inst; in emulation_exit()
850 struct debug_reg *dbg_reg = &(vcpu->arch.dbg_reg); in kvmppc_handle_debug()
851 u32 dbsr = vcpu->arch.dbsr; in kvmppc_handle_debug()
864 if (dbsr && (vcpu->arch.shared->msr & MSR_DE) && in kvmppc_handle_debug()
865 (vcpu->arch.dbg_reg.dbcr0 & DBCR0_IDM)) in kvmppc_handle_debug()
869 if ((dbsr & DBSR_TIE) && !(vcpu->arch.shared->msr & MSR_DE)) in kvmppc_handle_debug()
879 vcpu->arch.dbsr = 0; in kvmppc_handle_debug()
880 run->debug.arch.status = 0; in kvmppc_handle_debug()
881 run->debug.arch.address = vcpu->arch.regs.nip; in kvmppc_handle_debug()
884 run->debug.arch.status |= KVMPPC_DEBUG_BREAKPOINT; in kvmppc_handle_debug()
887 run->debug.arch.status |= KVMPPC_DEBUG_WATCH_WRITE; in kvmppc_handle_debug()
889 run->debug.arch.status |= KVMPPC_DEBUG_WATCH_READ; in kvmppc_handle_debug()
891 run->debug.arch.address = dbg_reg->dac1; in kvmppc_handle_debug()
893 run->debug.arch.address = dbg_reg->dac2; in kvmppc_handle_debug()
962 vcpu->arch.dbsr = mfspr(SPRN_DBSR); in kvmppc_restart_interrupt()
977 __func__, vcpu->arch.regs.nip); in kvmppc_resume_inst_load()
1114 if (vcpu->arch.shared->msr & (MSR_PR | MSR_GS)) { in kvmppc_handle_exit()
1123 kvmppc_core_queue_program(vcpu, vcpu->arch.fault_esr); in kvmppc_handle_exit()
1140 if (vcpu->arch.shared->msr & MSR_SPE) in kvmppc_handle_exit()
1175 __func__, exit_nr, vcpu->arch.regs.nip); in kvmppc_handle_exit()
1198 kvmppc_core_queue_data_storage(vcpu, vcpu->arch.fault_dear, in kvmppc_handle_exit()
1199 vcpu->arch.fault_esr); in kvmppc_handle_exit()
1205 kvmppc_core_queue_inst_storage(vcpu, vcpu->arch.fault_esr); in kvmppc_handle_exit()
1211 kvmppc_core_queue_alignment(vcpu, vcpu->arch.fault_dear, in kvmppc_handle_exit()
1212 vcpu->arch.fault_esr); in kvmppc_handle_exit()
1218 if (!(vcpu->arch.shared->msr & MSR_PR)) { in kvmppc_handle_exit()
1232 if (!(vcpu->arch.shared->msr & MSR_PR) && in kvmppc_handle_exit()
1247 unsigned long eaddr = vcpu->arch.fault_dear; in kvmppc_handle_exit()
1253 if (!(vcpu->arch.shared->msr & MSR_PR) && in kvmppc_handle_exit()
1254 (eaddr & PAGE_MASK) == vcpu->arch.magic_page_ea) { in kvmppc_handle_exit()
1268 vcpu->arch.fault_dear, in kvmppc_handle_exit()
1269 vcpu->arch.fault_esr); in kvmppc_handle_exit()
1294 vcpu->arch.paddr_accessed = gpaddr; in kvmppc_handle_exit()
1295 vcpu->arch.vaddr_accessed = eaddr; in kvmppc_handle_exit()
1305 unsigned long eaddr = vcpu->arch.regs.nip; in kvmppc_handle_exit()
1381 u32 old_tsr = vcpu->arch.tsr; in kvmppc_set_tsr()
1383 vcpu->arch.tsr = new_tsr; in kvmppc_set_tsr()
1385 if ((old_tsr ^ vcpu->arch.tsr) & (TSR_ENW | TSR_WIS)) in kvmppc_set_tsr()
1397 vcpu->arch.regs.nip = 0; in kvm_arch_vcpu_setup()
1398 vcpu->arch.shared->pir = vcpu->vcpu_id; in kvm_arch_vcpu_setup()
1403 vcpu->arch.shadow_msr = MSR_USER | MSR_IS | MSR_DS; in kvm_arch_vcpu_setup()
1404 vcpu->arch.shadow_pid = 1; in kvm_arch_vcpu_setup()
1405 vcpu->arch.shared->msr = 0; in kvm_arch_vcpu_setup()
1410 vcpu->arch.ivpr = 0x55550000; in kvm_arch_vcpu_setup()
1412 vcpu->arch.ivor[i] = 0x7700 | i * 4; in kvm_arch_vcpu_setup()
1424 spin_lock_init(&vcpu->arch.wdt_lock); in kvmppc_subarch_vcpu_init()
1425 timer_setup(&vcpu->arch.wdt_timer, kvmppc_watchdog_func, 0); in kvmppc_subarch_vcpu_init()
1437 del_timer_sync(&vcpu->arch.wdt_timer); in kvmppc_subarch_vcpu_uninit()
1446 regs->pc = vcpu->arch.regs.nip; in kvm_arch_vcpu_ioctl_get_regs()
1448 regs->ctr = vcpu->arch.regs.ctr; in kvm_arch_vcpu_ioctl_get_regs()
1449 regs->lr = vcpu->arch.regs.link; in kvm_arch_vcpu_ioctl_get_regs()
1451 regs->msr = vcpu->arch.shared->msr; in kvm_arch_vcpu_ioctl_get_regs()
1454 regs->pid = vcpu->arch.pid; in kvm_arch_vcpu_ioctl_get_regs()
1477 vcpu->arch.regs.nip = regs->pc; in kvm_arch_vcpu_ioctl_set_regs()
1479 vcpu->arch.regs.ctr = regs->ctr; in kvm_arch_vcpu_ioctl_set_regs()
1480 vcpu->arch.regs.link = regs->lr; in kvm_arch_vcpu_ioctl_set_regs()
1509 sregs->u.e.csrr0 = vcpu->arch.csrr0; in get_sregs_base()
1510 sregs->u.e.csrr1 = vcpu->arch.csrr1; in get_sregs_base()
1511 sregs->u.e.mcsr = vcpu->arch.mcsr; in get_sregs_base()
1514 sregs->u.e.tsr = vcpu->arch.tsr; in get_sregs_base()
1515 sregs->u.e.tcr = vcpu->arch.tcr; in get_sregs_base()
1518 sregs->u.e.vrsave = vcpu->arch.vrsave; in get_sregs_base()
1527 vcpu->arch.csrr0 = sregs->u.e.csrr0; in set_sregs_base()
1528 vcpu->arch.csrr1 = sregs->u.e.csrr1; in set_sregs_base()
1529 vcpu->arch.mcsr = sregs->u.e.mcsr; in set_sregs_base()
1532 vcpu->arch.vrsave = sregs->u.e.vrsave; in set_sregs_base()
1536 vcpu->arch.dec = sregs->u.e.dec; in set_sregs_base()
1552 sregs->u.e.mcsrr0 = vcpu->arch.mcsrr0; in get_sregs_arch206()
1553 sregs->u.e.mcsrr1 = vcpu->arch.mcsrr1; in get_sregs_arch206()
1554 sregs->u.e.decar = vcpu->arch.decar; in get_sregs_arch206()
1555 sregs->u.e.ivpr = vcpu->arch.ivpr; in get_sregs_arch206()
1567 vcpu->arch.mcsrr0 = sregs->u.e.mcsrr0; in set_sregs_arch206()
1568 vcpu->arch.mcsrr1 = sregs->u.e.mcsrr1; in set_sregs_arch206()
1569 vcpu->arch.decar = sregs->u.e.decar; in set_sregs_arch206()
1570 vcpu->arch.ivpr = sregs->u.e.ivpr; in set_sregs_arch206()
1579 sregs->u.e.ivor_low[0] = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL]; in kvmppc_get_sregs_ivor()
1580 sregs->u.e.ivor_low[1] = vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK]; in kvmppc_get_sregs_ivor()
1581 sregs->u.e.ivor_low[2] = vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE]; in kvmppc_get_sregs_ivor()
1582 sregs->u.e.ivor_low[3] = vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE]; in kvmppc_get_sregs_ivor()
1583 sregs->u.e.ivor_low[4] = vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL]; in kvmppc_get_sregs_ivor()
1584 sregs->u.e.ivor_low[5] = vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT]; in kvmppc_get_sregs_ivor()
1585 sregs->u.e.ivor_low[6] = vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM]; in kvmppc_get_sregs_ivor()
1586 sregs->u.e.ivor_low[7] = vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL]; in kvmppc_get_sregs_ivor()
1587 sregs->u.e.ivor_low[8] = vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL]; in kvmppc_get_sregs_ivor()
1588 sregs->u.e.ivor_low[9] = vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL]; in kvmppc_get_sregs_ivor()
1589 sregs->u.e.ivor_low[10] = vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER]; in kvmppc_get_sregs_ivor()
1590 sregs->u.e.ivor_low[11] = vcpu->arch.ivor[BOOKE_IRQPRIO_FIT]; in kvmppc_get_sregs_ivor()
1591 sregs->u.e.ivor_low[12] = vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG]; in kvmppc_get_sregs_ivor()
1592 sregs->u.e.ivor_low[13] = vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS]; in kvmppc_get_sregs_ivor()
1593 sregs->u.e.ivor_low[14] = vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS]; in kvmppc_get_sregs_ivor()
1594 sregs->u.e.ivor_low[15] = vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG]; in kvmppc_get_sregs_ivor()
1603 vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL] = sregs->u.e.ivor_low[0]; in kvmppc_set_sregs_ivor()
1604 vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK] = sregs->u.e.ivor_low[1]; in kvmppc_set_sregs_ivor()
1605 vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE] = sregs->u.e.ivor_low[2]; in kvmppc_set_sregs_ivor()
1606 vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE] = sregs->u.e.ivor_low[3]; in kvmppc_set_sregs_ivor()
1607 vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL] = sregs->u.e.ivor_low[4]; in kvmppc_set_sregs_ivor()
1608 vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT] = sregs->u.e.ivor_low[5]; in kvmppc_set_sregs_ivor()
1609 vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM] = sregs->u.e.ivor_low[6]; in kvmppc_set_sregs_ivor()
1610 vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL] = sregs->u.e.ivor_low[7]; in kvmppc_set_sregs_ivor()
1611 vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL] = sregs->u.e.ivor_low[8]; in kvmppc_set_sregs_ivor()
1612 vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL] = sregs->u.e.ivor_low[9]; in kvmppc_set_sregs_ivor()
1613 vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER] = sregs->u.e.ivor_low[10]; in kvmppc_set_sregs_ivor()
1614 vcpu->arch.ivor[BOOKE_IRQPRIO_FIT] = sregs->u.e.ivor_low[11]; in kvmppc_set_sregs_ivor()
1615 vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG] = sregs->u.e.ivor_low[12]; in kvmppc_set_sregs_ivor()
1616 vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS] = sregs->u.e.ivor_low[13]; in kvmppc_set_sregs_ivor()
1617 vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS] = sregs->u.e.ivor_low[14]; in kvmppc_set_sregs_ivor()
1618 vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG] = sregs->u.e.ivor_low[15]; in kvmppc_set_sregs_ivor()
1630 sregs->pvr = vcpu->arch.pvr; in kvm_arch_vcpu_ioctl_get_sregs()
1634 ret = vcpu->kvm->arch.kvm_ops->get_sregs(vcpu, sregs); in kvm_arch_vcpu_ioctl_get_sregs()
1646 if (vcpu->arch.pvr != sregs->pvr) in kvm_arch_vcpu_ioctl_set_sregs()
1657 ret = vcpu->kvm->arch.kvm_ops->set_sregs(vcpu, sregs); in kvm_arch_vcpu_ioctl_set_sregs()
1671 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac1); in kvmppc_get_one_reg()
1674 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac2); in kvmppc_get_one_reg()
1678 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac3); in kvmppc_get_one_reg()
1681 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac4); in kvmppc_get_one_reg()
1685 *val = get_reg_val(id, vcpu->arch.dbg_reg.dac1); in kvmppc_get_one_reg()
1688 *val = get_reg_val(id, vcpu->arch.dbg_reg.dac2); in kvmppc_get_one_reg()
1697 *val = get_reg_val(id, vcpu->arch.epcr); in kvmppc_get_one_reg()
1701 *val = get_reg_val(id, vcpu->arch.tcr); in kvmppc_get_one_reg()
1704 *val = get_reg_val(id, vcpu->arch.tsr); in kvmppc_get_one_reg()
1710 *val = get_reg_val(id, vcpu->arch.vrsave); in kvmppc_get_one_reg()
1713 r = vcpu->kvm->arch.kvm_ops->get_one_reg(vcpu, id, val); in kvmppc_get_one_reg()
1727 vcpu->arch.dbg_reg.iac1 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1730 vcpu->arch.dbg_reg.iac2 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1734 vcpu->arch.dbg_reg.iac3 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1737 vcpu->arch.dbg_reg.iac4 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1741 vcpu->arch.dbg_reg.dac1 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1744 vcpu->arch.dbg_reg.dac2 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1779 vcpu->arch.vrsave = set_reg_val(id, *val); in kvmppc_set_one_reg()
1782 r = vcpu->kvm->arch.kvm_ops->set_one_reg(vcpu, id, val); in kvmppc_set_one_reg()
1847 vcpu->arch.epcr = new_epcr; in kvmppc_set_epcr()
1849 vcpu->arch.shadow_epcr &= ~SPRN_EPCR_GICM; in kvmppc_set_epcr()
1850 if (vcpu->arch.epcr & SPRN_EPCR_ICM) in kvmppc_set_epcr()
1851 vcpu->arch.shadow_epcr |= SPRN_EPCR_GICM; in kvmppc_set_epcr()
1858 vcpu->arch.tcr = new_tcr; in kvmppc_set_tcr()
1865 set_bits(tsr_bits, &vcpu->arch.tsr); in kvmppc_set_tsr_bits()
1873 clear_bits(tsr_bits, &vcpu->arch.tsr); in kvmppc_clr_tsr_bits()
1887 if (vcpu->arch.tcr & TCR_ARE) { in kvmppc_decrementer_func()
1888 vcpu->arch.dec = vcpu->arch.decar; in kvmppc_decrementer_func()
1957 vcpu->arch.shadow_msrp |= MSRP_UCLEP; in kvm_guest_protect_msr()
1959 vcpu->arch.shadow_msrp |= MSRP_DEP; in kvm_guest_protect_msr()
1961 vcpu->arch.shadow_msrp |= MSRP_PMMP; in kvm_guest_protect_msr()
1964 vcpu->arch.shadow_msrp &= ~MSRP_UCLEP; in kvm_guest_protect_msr()
1966 vcpu->arch.shadow_msrp &= ~MSRP_DEP; in kvm_guest_protect_msr()
1968 vcpu->arch.shadow_msrp &= ~MSRP_PMMP; in kvm_guest_protect_msr()
1980 if (!(vcpu->arch.shared->msr & MSR_PR) && in kvmppc_xlate()
1981 (eaddr & PAGE_MASK) == vcpu->arch.magic_page_ea) { in kvmppc_xlate()
1983 pte->raddr = (vcpu->arch.magic_page_pa & PAGE_MASK) | in kvmppc_xlate()
2034 vcpu->arch.dbg_reg.dbcr0 = 0; in kvm_arch_vcpu_ioctl_set_guest_debug()
2042 vcpu->arch.dbg_reg.dbcr0 = 0; in kvm_arch_vcpu_ioctl_set_guest_debug()
2045 vcpu->arch.dbg_reg.dbcr0 |= DBCR0_IDM | DBCR0_IC; in kvm_arch_vcpu_ioctl_set_guest_debug()
2048 dbg_reg = &(vcpu->arch.dbg_reg); in kvm_arch_vcpu_ioctl_set_guest_debug()
2073 uint64_t addr = dbg->arch.bp[n].addr; in kvm_arch_vcpu_ioctl_set_guest_debug()
2074 uint32_t type = dbg->arch.bp[n].type; in kvm_arch_vcpu_ioctl_set_guest_debug()
2119 vcpu->kvm->arch.kvm_ops->mmu_destroy(vcpu); in kvmppc_mmu_destroy()
2124 return kvm->arch.kvm_ops->init_vm(kvm); in kvmppc_core_init_vm()
2129 return kvm->arch.kvm_ops->vcpu_create(kvm, id); in kvmppc_core_vcpu_create()
2134 vcpu->kvm->arch.kvm_ops->vcpu_free(vcpu); in kvmppc_core_vcpu_free()
2139 kvm->arch.kvm_ops->destroy_vm(kvm); in kvmppc_core_destroy_vm()
2144 vcpu->kvm->arch.kvm_ops->vcpu_load(vcpu, cpu); in kvmppc_core_vcpu_load()
2149 vcpu->kvm->arch.kvm_ops->vcpu_put(vcpu); in kvmppc_core_vcpu_put()