Lines Matching refs:arch

94 	printk("pc:   %08lx msr:  %08llx\n", vcpu->arch.regs.nip,  in kvmppc_dump_vcpu()
95 vcpu->arch.shared->msr); in kvmppc_dump_vcpu()
96 printk("lr: %08lx ctr: %08lx\n", vcpu->arch.regs.link, in kvmppc_dump_vcpu()
97 vcpu->arch.regs.ctr); in kvmppc_dump_vcpu()
98 printk("srr0: %08llx srr1: %08llx\n", vcpu->arch.shared->srr0, in kvmppc_dump_vcpu()
99 vcpu->arch.shared->srr1); in kvmppc_dump_vcpu()
101 printk("exceptions: %08lx\n", vcpu->arch.pending_exceptions); in kvmppc_dump_vcpu()
119 vcpu->arch.shadow_msr &= ~MSR_SPE; in kvmppc_vcpu_disable_spe()
129 vcpu->arch.shadow_msr |= MSR_SPE; in kvmppc_vcpu_enable_spe()
135 if (vcpu->arch.shared->msr & MSR_SPE) { in kvmppc_vcpu_sync_spe()
136 if (!(vcpu->arch.shadow_msr & MSR_SPE)) in kvmppc_vcpu_sync_spe()
138 } else if (vcpu->arch.shadow_msr & MSR_SPE) { in kvmppc_vcpu_sync_spe()
162 load_fp_state(&vcpu->arch.fp); in kvmppc_load_guest_fp()
164 current->thread.fp_save_area = &vcpu->arch.fp; in kvmppc_load_guest_fp()
188 vcpu->arch.shadow_msr &= ~MSR_FP; in kvmppc_vcpu_sync_fpu()
189 vcpu->arch.shadow_msr |= vcpu->arch.shared->msr & MSR_FP; in kvmppc_vcpu_sync_fpu()
204 load_vr_state(&vcpu->arch.vr); in kvmppc_load_guest_altivec()
206 current->thread.vr_save_area = &vcpu->arch.vr; in kvmppc_load_guest_altivec()
232 vcpu->arch.shadow_msr &= ~MSR_DE; in kvmppc_vcpu_sync_debug()
233 vcpu->arch.shadow_msr |= vcpu->arch.shared->msr & MSR_DE; in kvmppc_vcpu_sync_debug()
243 vcpu->arch.shared->msr |= MSR_DE; in kvmppc_vcpu_sync_debug()
245 vcpu->arch.shadow_msr |= MSR_DE; in kvmppc_vcpu_sync_debug()
246 vcpu->arch.shared->msr &= ~MSR_DE; in kvmppc_vcpu_sync_debug()
257 u32 old_msr = vcpu->arch.shared->msr; in kvmppc_set_msr()
263 vcpu->arch.shared->msr = new_msr; in kvmppc_set_msr()
275 set_bit(priority, &vcpu->arch.pending_exceptions); in kvmppc_booke_queue_irqprio()
281 vcpu->arch.queued_dear = dear_flags; in kvmppc_core_queue_dtlb_miss()
282 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_dtlb_miss()
289 vcpu->arch.queued_dear = dear_flags; in kvmppc_core_queue_data_storage()
290 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_data_storage()
301 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_inst_storage()
308 vcpu->arch.queued_dear = dear_flags; in kvmppc_core_queue_alignment()
309 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_alignment()
315 vcpu->arch.queued_esr = esr_flags; in kvmppc_core_queue_program()
338 return test_bit(BOOKE_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions); in kvmppc_core_pending_dec()
343 clear_bit(BOOKE_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_dec()
359 clear_bit(BOOKE_IRQPRIO_EXTERNAL, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_external()
360 clear_bit(BOOKE_IRQPRIO_EXTERNAL_LEVEL, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_external()
370 clear_bit(BOOKE_IRQPRIO_WATCHDOG, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_watchdog()
380 clear_bit(BOOKE_IRQPRIO_DEBUG, &vcpu->arch.pending_exceptions); in kvmppc_core_dequeue_debug()
391 vcpu->arch.csrr0 = srr0; in set_guest_csrr()
392 vcpu->arch.csrr1 = srr1; in set_guest_csrr()
398 vcpu->arch.dsrr0 = srr0; in set_guest_dsrr()
399 vcpu->arch.dsrr1 = srr1; in set_guest_dsrr()
407 vcpu->arch.mcsrr0 = srr0; in set_guest_mcsrr()
408 vcpu->arch.mcsrr1 = srr1; in set_guest_mcsrr()
418 ulong crit_raw = vcpu->arch.shared->critical; in kvmppc_booke_irqprio_deliver()
423 ulong new_msr = vcpu->arch.shared->msr; in kvmppc_booke_irqprio_deliver()
426 if (!(vcpu->arch.shared->msr & MSR_SF)) { in kvmppc_booke_irqprio_deliver()
434 crit = crit && !(vcpu->arch.shared->msr & MSR_PR); in kvmppc_booke_irqprio_deliver()
441 if ((priority == BOOKE_IRQPRIO_EXTERNAL) && vcpu->arch.epr_flags) in kvmppc_booke_irqprio_deliver()
474 allowed = vcpu->arch.shared->msr & MSR_CE; in kvmppc_booke_irqprio_deliver()
480 allowed = vcpu->arch.shared->msr & MSR_ME; in kvmppc_booke_irqprio_deliver()
490 allowed = vcpu->arch.shared->msr & MSR_EE; in kvmppc_booke_irqprio_deliver()
496 allowed = vcpu->arch.shared->msr & MSR_DE; in kvmppc_booke_irqprio_deliver()
510 set_guest_srr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
511 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
514 set_guest_csrr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
515 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
518 set_guest_dsrr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
519 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
522 set_guest_mcsrr(vcpu, vcpu->arch.regs.nip, in kvmppc_booke_irqprio_deliver()
523 vcpu->arch.shared->msr); in kvmppc_booke_irqprio_deliver()
527 vcpu->arch.regs.nip = vcpu->arch.ivpr | in kvmppc_booke_irqprio_deliver()
528 vcpu->arch.ivor[priority]; in kvmppc_booke_irqprio_deliver()
530 kvmppc_set_esr(vcpu, vcpu->arch.queued_esr); in kvmppc_booke_irqprio_deliver()
532 kvmppc_set_dar(vcpu, vcpu->arch.queued_dear); in kvmppc_booke_irqprio_deliver()
534 if (vcpu->arch.epr_flags & KVMPPC_EPR_USER) in kvmppc_booke_irqprio_deliver()
536 else if (vcpu->arch.epr_flags & KVMPPC_EPR_KERNEL) { in kvmppc_booke_irqprio_deliver()
537 BUG_ON(vcpu->arch.irq_type != KVMPPC_IRQ_MPIC); in kvmppc_booke_irqprio_deliver()
544 if (vcpu->arch.epcr & SPRN_EPCR_ICM) in kvmppc_booke_irqprio_deliver()
550 clear_bit(priority, &vcpu->arch.pending_exceptions); in kvmppc_booke_irqprio_deliver()
559 if (vcpu->arch.pending_exceptions & BOOKE_IRQMASK_EE) in kvmppc_booke_irqprio_deliver()
561 if (vcpu->arch.pending_exceptions & BOOKE_IRQMASK_CE) in kvmppc_booke_irqprio_deliver()
563 if (vcpu->arch.pending_exceptions & BOOKE_IRQPRIO_MACHINE_CHECK) in kvmppc_booke_irqprio_deliver()
579 u32 period = TCR_GET_WP(vcpu->arch.tcr); in watchdog_next_timeout()
610 if ((vcpu->arch.tsr & (TSR_ENW | TSR_WIS)) != (TSR_ENW | TSR_WIS)) in arm_next_watchdog()
613 spin_lock_irqsave(&vcpu->arch.wdt_lock, flags); in arm_next_watchdog()
620 mod_timer(&vcpu->arch.wdt_timer, jiffies + nr_jiffies); in arm_next_watchdog()
622 del_timer(&vcpu->arch.wdt_timer); in arm_next_watchdog()
623 spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags); in arm_next_watchdog()
628 struct kvm_vcpu *vcpu = from_timer(vcpu, t, arch.wdt_timer); in kvmppc_watchdog_func()
633 new_tsr = tsr = vcpu->arch.tsr; in kvmppc_watchdog_func()
645 } while (cmpxchg(&vcpu->arch.tsr, tsr, new_tsr) != tsr); in kvmppc_watchdog_func()
657 if (final && (vcpu->arch.tcr & TCR_WRC_MASK) && in kvmppc_watchdog_func()
658 vcpu->arch.watchdog_enabled) { in kvmppc_watchdog_func()
676 if ((vcpu->arch.tcr & TCR_DIE) && (vcpu->arch.tsr & TSR_DIS)) in update_timer_ints()
681 if ((vcpu->arch.tcr & TCR_WIE) && (vcpu->arch.tsr & TSR_WIS)) in update_timer_ints()
689 unsigned long *pending = &vcpu->arch.pending_exceptions; in kvmppc_core_check_exceptions()
703 vcpu->arch.shared->int_pending = !!*pending; in kvmppc_core_check_exceptions()
719 if (vcpu->arch.shared->msr & MSR_WE) { in kvmppc_core_prepare_to_enter()
750 vcpu->arch.epr_needed = true; in kvmppc_core_check_requests()
763 if (!vcpu->arch.sane) { in kvmppc_vcpu_run()
798 debug = vcpu->arch.dbg_reg; in kvmppc_vcpu_run()
801 current->thread.debug = vcpu->arch.dbg_reg; in kvmppc_vcpu_run()
803 vcpu->arch.pgdir = vcpu->kvm->mm->pgd; in kvmppc_vcpu_run()
846 __func__, vcpu->arch.regs.nip, vcpu->arch.last_inst); in emulation_exit()
850 vcpu->run->hw.hardware_exit_reason |= vcpu->arch.last_inst; in emulation_exit()
865 struct debug_reg *dbg_reg = &(vcpu->arch.dbg_reg); in kvmppc_handle_debug()
866 u32 dbsr = vcpu->arch.dbsr; in kvmppc_handle_debug()
879 if (dbsr && (vcpu->arch.shared->msr & MSR_DE) && in kvmppc_handle_debug()
880 (vcpu->arch.dbg_reg.dbcr0 & DBCR0_IDM)) in kvmppc_handle_debug()
884 if ((dbsr & DBSR_TIE) && !(vcpu->arch.shared->msr & MSR_DE)) in kvmppc_handle_debug()
894 vcpu->arch.dbsr = 0; in kvmppc_handle_debug()
895 run->debug.arch.status = 0; in kvmppc_handle_debug()
896 run->debug.arch.address = vcpu->arch.regs.nip; in kvmppc_handle_debug()
899 run->debug.arch.status |= KVMPPC_DEBUG_BREAKPOINT; in kvmppc_handle_debug()
902 run->debug.arch.status |= KVMPPC_DEBUG_WATCH_WRITE; in kvmppc_handle_debug()
904 run->debug.arch.status |= KVMPPC_DEBUG_WATCH_READ; in kvmppc_handle_debug()
906 run->debug.arch.address = dbg_reg->dac1; in kvmppc_handle_debug()
908 run->debug.arch.address = dbg_reg->dac2; in kvmppc_handle_debug()
977 vcpu->arch.dbsr = mfspr(SPRN_DBSR); in kvmppc_restart_interrupt()
992 __func__, vcpu->arch.regs.nip); in kvmppc_resume_inst_load()
1143 if (vcpu->arch.shared->msr & (MSR_PR | MSR_GS)) { in kvmppc_handle_exit()
1152 kvmppc_core_queue_program(vcpu, vcpu->arch.fault_esr); in kvmppc_handle_exit()
1169 if (vcpu->arch.shared->msr & MSR_SPE) in kvmppc_handle_exit()
1204 __func__, exit_nr, vcpu->arch.regs.nip); in kvmppc_handle_exit()
1227 kvmppc_core_queue_data_storage(vcpu, vcpu->arch.fault_dear, in kvmppc_handle_exit()
1228 vcpu->arch.fault_esr); in kvmppc_handle_exit()
1234 kvmppc_core_queue_inst_storage(vcpu, vcpu->arch.fault_esr); in kvmppc_handle_exit()
1240 kvmppc_core_queue_alignment(vcpu, vcpu->arch.fault_dear, in kvmppc_handle_exit()
1241 vcpu->arch.fault_esr); in kvmppc_handle_exit()
1247 if (!(vcpu->arch.shared->msr & MSR_PR)) { in kvmppc_handle_exit()
1261 if (!(vcpu->arch.shared->msr & MSR_PR) && in kvmppc_handle_exit()
1276 unsigned long eaddr = vcpu->arch.fault_dear; in kvmppc_handle_exit()
1282 if (!(vcpu->arch.shared->msr & MSR_PR) && in kvmppc_handle_exit()
1283 (eaddr & PAGE_MASK) == vcpu->arch.magic_page_ea) { in kvmppc_handle_exit()
1297 vcpu->arch.fault_dear, in kvmppc_handle_exit()
1298 vcpu->arch.fault_esr); in kvmppc_handle_exit()
1323 vcpu->arch.paddr_accessed = gpaddr; in kvmppc_handle_exit()
1324 vcpu->arch.vaddr_accessed = eaddr; in kvmppc_handle_exit()
1334 unsigned long eaddr = vcpu->arch.regs.nip; in kvmppc_handle_exit()
1410 u32 old_tsr = vcpu->arch.tsr; in kvmppc_set_tsr()
1412 vcpu->arch.tsr = new_tsr; in kvmppc_set_tsr()
1414 if ((old_tsr ^ vcpu->arch.tsr) & (TSR_ENW | TSR_WIS)) in kvmppc_set_tsr()
1423 spin_lock_init(&vcpu->arch.wdt_lock); in kvmppc_subarch_vcpu_init()
1424 timer_setup(&vcpu->arch.wdt_timer, kvmppc_watchdog_func, 0); in kvmppc_subarch_vcpu_init()
1436 del_timer_sync(&vcpu->arch.wdt_timer); in kvmppc_subarch_vcpu_uninit()
1445 regs->pc = vcpu->arch.regs.nip; in kvm_arch_vcpu_ioctl_get_regs()
1447 regs->ctr = vcpu->arch.regs.ctr; in kvm_arch_vcpu_ioctl_get_regs()
1448 regs->lr = vcpu->arch.regs.link; in kvm_arch_vcpu_ioctl_get_regs()
1450 regs->msr = vcpu->arch.shared->msr; in kvm_arch_vcpu_ioctl_get_regs()
1453 regs->pid = vcpu->arch.pid; in kvm_arch_vcpu_ioctl_get_regs()
1476 vcpu->arch.regs.nip = regs->pc; in kvm_arch_vcpu_ioctl_set_regs()
1478 vcpu->arch.regs.ctr = regs->ctr; in kvm_arch_vcpu_ioctl_set_regs()
1479 vcpu->arch.regs.link = regs->lr; in kvm_arch_vcpu_ioctl_set_regs()
1508 sregs->u.e.csrr0 = vcpu->arch.csrr0; in get_sregs_base()
1509 sregs->u.e.csrr1 = vcpu->arch.csrr1; in get_sregs_base()
1510 sregs->u.e.mcsr = vcpu->arch.mcsr; in get_sregs_base()
1513 sregs->u.e.tsr = vcpu->arch.tsr; in get_sregs_base()
1514 sregs->u.e.tcr = vcpu->arch.tcr; in get_sregs_base()
1517 sregs->u.e.vrsave = vcpu->arch.vrsave; in get_sregs_base()
1526 vcpu->arch.csrr0 = sregs->u.e.csrr0; in set_sregs_base()
1527 vcpu->arch.csrr1 = sregs->u.e.csrr1; in set_sregs_base()
1528 vcpu->arch.mcsr = sregs->u.e.mcsr; in set_sregs_base()
1531 vcpu->arch.vrsave = sregs->u.e.vrsave; in set_sregs_base()
1535 vcpu->arch.dec = sregs->u.e.dec; in set_sregs_base()
1551 sregs->u.e.mcsrr0 = vcpu->arch.mcsrr0; in get_sregs_arch206()
1552 sregs->u.e.mcsrr1 = vcpu->arch.mcsrr1; in get_sregs_arch206()
1553 sregs->u.e.decar = vcpu->arch.decar; in get_sregs_arch206()
1554 sregs->u.e.ivpr = vcpu->arch.ivpr; in get_sregs_arch206()
1566 vcpu->arch.mcsrr0 = sregs->u.e.mcsrr0; in set_sregs_arch206()
1567 vcpu->arch.mcsrr1 = sregs->u.e.mcsrr1; in set_sregs_arch206()
1568 vcpu->arch.decar = sregs->u.e.decar; in set_sregs_arch206()
1569 vcpu->arch.ivpr = sregs->u.e.ivpr; in set_sregs_arch206()
1578 sregs->u.e.ivor_low[0] = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL]; in kvmppc_get_sregs_ivor()
1579 sregs->u.e.ivor_low[1] = vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK]; in kvmppc_get_sregs_ivor()
1580 sregs->u.e.ivor_low[2] = vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE]; in kvmppc_get_sregs_ivor()
1581 sregs->u.e.ivor_low[3] = vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE]; in kvmppc_get_sregs_ivor()
1582 sregs->u.e.ivor_low[4] = vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL]; in kvmppc_get_sregs_ivor()
1583 sregs->u.e.ivor_low[5] = vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT]; in kvmppc_get_sregs_ivor()
1584 sregs->u.e.ivor_low[6] = vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM]; in kvmppc_get_sregs_ivor()
1585 sregs->u.e.ivor_low[7] = vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL]; in kvmppc_get_sregs_ivor()
1586 sregs->u.e.ivor_low[8] = vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL]; in kvmppc_get_sregs_ivor()
1587 sregs->u.e.ivor_low[9] = vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL]; in kvmppc_get_sregs_ivor()
1588 sregs->u.e.ivor_low[10] = vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER]; in kvmppc_get_sregs_ivor()
1589 sregs->u.e.ivor_low[11] = vcpu->arch.ivor[BOOKE_IRQPRIO_FIT]; in kvmppc_get_sregs_ivor()
1590 sregs->u.e.ivor_low[12] = vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG]; in kvmppc_get_sregs_ivor()
1591 sregs->u.e.ivor_low[13] = vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS]; in kvmppc_get_sregs_ivor()
1592 sregs->u.e.ivor_low[14] = vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS]; in kvmppc_get_sregs_ivor()
1593 sregs->u.e.ivor_low[15] = vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG]; in kvmppc_get_sregs_ivor()
1602 vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL] = sregs->u.e.ivor_low[0]; in kvmppc_set_sregs_ivor()
1603 vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK] = sregs->u.e.ivor_low[1]; in kvmppc_set_sregs_ivor()
1604 vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE] = sregs->u.e.ivor_low[2]; in kvmppc_set_sregs_ivor()
1605 vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE] = sregs->u.e.ivor_low[3]; in kvmppc_set_sregs_ivor()
1606 vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL] = sregs->u.e.ivor_low[4]; in kvmppc_set_sregs_ivor()
1607 vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT] = sregs->u.e.ivor_low[5]; in kvmppc_set_sregs_ivor()
1608 vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM] = sregs->u.e.ivor_low[6]; in kvmppc_set_sregs_ivor()
1609 vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL] = sregs->u.e.ivor_low[7]; in kvmppc_set_sregs_ivor()
1610 vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL] = sregs->u.e.ivor_low[8]; in kvmppc_set_sregs_ivor()
1611 vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL] = sregs->u.e.ivor_low[9]; in kvmppc_set_sregs_ivor()
1612 vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER] = sregs->u.e.ivor_low[10]; in kvmppc_set_sregs_ivor()
1613 vcpu->arch.ivor[BOOKE_IRQPRIO_FIT] = sregs->u.e.ivor_low[11]; in kvmppc_set_sregs_ivor()
1614 vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG] = sregs->u.e.ivor_low[12]; in kvmppc_set_sregs_ivor()
1615 vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS] = sregs->u.e.ivor_low[13]; in kvmppc_set_sregs_ivor()
1616 vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS] = sregs->u.e.ivor_low[14]; in kvmppc_set_sregs_ivor()
1617 vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG] = sregs->u.e.ivor_low[15]; in kvmppc_set_sregs_ivor()
1629 sregs->pvr = vcpu->arch.pvr; in kvm_arch_vcpu_ioctl_get_sregs()
1633 ret = vcpu->kvm->arch.kvm_ops->get_sregs(vcpu, sregs); in kvm_arch_vcpu_ioctl_get_sregs()
1645 if (vcpu->arch.pvr != sregs->pvr) in kvm_arch_vcpu_ioctl_set_sregs()
1656 ret = vcpu->kvm->arch.kvm_ops->set_sregs(vcpu, sregs); in kvm_arch_vcpu_ioctl_set_sregs()
1670 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac1); in kvmppc_get_one_reg()
1673 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac2); in kvmppc_get_one_reg()
1677 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac3); in kvmppc_get_one_reg()
1680 *val = get_reg_val(id, vcpu->arch.dbg_reg.iac4); in kvmppc_get_one_reg()
1684 *val = get_reg_val(id, vcpu->arch.dbg_reg.dac1); in kvmppc_get_one_reg()
1687 *val = get_reg_val(id, vcpu->arch.dbg_reg.dac2); in kvmppc_get_one_reg()
1696 *val = get_reg_val(id, vcpu->arch.epcr); in kvmppc_get_one_reg()
1700 *val = get_reg_val(id, vcpu->arch.tcr); in kvmppc_get_one_reg()
1703 *val = get_reg_val(id, vcpu->arch.tsr); in kvmppc_get_one_reg()
1709 *val = get_reg_val(id, vcpu->arch.vrsave); in kvmppc_get_one_reg()
1712 r = vcpu->kvm->arch.kvm_ops->get_one_reg(vcpu, id, val); in kvmppc_get_one_reg()
1726 vcpu->arch.dbg_reg.iac1 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1729 vcpu->arch.dbg_reg.iac2 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1733 vcpu->arch.dbg_reg.iac3 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1736 vcpu->arch.dbg_reg.iac4 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1740 vcpu->arch.dbg_reg.dac1 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1743 vcpu->arch.dbg_reg.dac2 = set_reg_val(id, *val); in kvmppc_set_one_reg()
1778 vcpu->arch.vrsave = set_reg_val(id, *val); in kvmppc_set_one_reg()
1781 r = vcpu->kvm->arch.kvm_ops->set_one_reg(vcpu, id, val); in kvmppc_set_one_reg()
1846 vcpu->arch.epcr = new_epcr; in kvmppc_set_epcr()
1848 vcpu->arch.shadow_epcr &= ~SPRN_EPCR_GICM; in kvmppc_set_epcr()
1849 if (vcpu->arch.epcr & SPRN_EPCR_ICM) in kvmppc_set_epcr()
1850 vcpu->arch.shadow_epcr |= SPRN_EPCR_GICM; in kvmppc_set_epcr()
1857 vcpu->arch.tcr = new_tcr; in kvmppc_set_tcr()
1864 set_bits(tsr_bits, &vcpu->arch.tsr); in kvmppc_set_tsr_bits()
1872 clear_bits(tsr_bits, &vcpu->arch.tsr); in kvmppc_clr_tsr_bits()
1886 if (vcpu->arch.tcr & TCR_ARE) { in kvmppc_decrementer_func()
1887 vcpu->arch.dec = vcpu->arch.decar; in kvmppc_decrementer_func()
1956 vcpu->arch.shadow_msrp |= MSRP_UCLEP; in kvm_guest_protect_msr()
1958 vcpu->arch.shadow_msrp |= MSRP_DEP; in kvm_guest_protect_msr()
1960 vcpu->arch.shadow_msrp |= MSRP_PMMP; in kvm_guest_protect_msr()
1963 vcpu->arch.shadow_msrp &= ~MSRP_UCLEP; in kvm_guest_protect_msr()
1965 vcpu->arch.shadow_msrp &= ~MSRP_DEP; in kvm_guest_protect_msr()
1967 vcpu->arch.shadow_msrp &= ~MSRP_PMMP; in kvm_guest_protect_msr()
1979 if (!(vcpu->arch.shared->msr & MSR_PR) && in kvmppc_xlate()
1980 (eaddr & PAGE_MASK) == vcpu->arch.magic_page_ea) { in kvmppc_xlate()
1982 pte->raddr = (vcpu->arch.magic_page_pa & PAGE_MASK) | in kvmppc_xlate()
2033 vcpu->arch.dbg_reg.dbcr0 = 0; in kvm_arch_vcpu_ioctl_set_guest_debug()
2041 vcpu->arch.dbg_reg.dbcr0 = 0; in kvm_arch_vcpu_ioctl_set_guest_debug()
2044 vcpu->arch.dbg_reg.dbcr0 |= DBCR0_IDM | DBCR0_IC; in kvm_arch_vcpu_ioctl_set_guest_debug()
2047 dbg_reg = &(vcpu->arch.dbg_reg); in kvm_arch_vcpu_ioctl_set_guest_debug()
2072 uint64_t addr = dbg->arch.bp[n].addr; in kvm_arch_vcpu_ioctl_set_guest_debug()
2073 uint32_t type = dbg->arch.bp[n].type; in kvm_arch_vcpu_ioctl_set_guest_debug()
2118 return kvm->arch.kvm_ops->init_vm(kvm); in kvmppc_core_init_vm()
2126 r = vcpu->kvm->arch.kvm_ops->vcpu_create(vcpu); in kvmppc_core_vcpu_create()
2131 vcpu->arch.regs.nip = 0; in kvmppc_core_vcpu_create()
2132 vcpu->arch.shared->pir = vcpu->vcpu_id; in kvmppc_core_vcpu_create()
2137 vcpu->arch.shadow_msr = MSR_USER | MSR_IS | MSR_DS; in kvmppc_core_vcpu_create()
2138 vcpu->arch.shadow_pid = 1; in kvmppc_core_vcpu_create()
2139 vcpu->arch.shared->msr = 0; in kvmppc_core_vcpu_create()
2144 vcpu->arch.ivpr = 0x55550000; in kvmppc_core_vcpu_create()
2146 vcpu->arch.ivor[i] = 0x7700 | i * 4; in kvmppc_core_vcpu_create()
2152 vcpu->kvm->arch.kvm_ops->vcpu_free(vcpu); in kvmppc_core_vcpu_create()
2159 vcpu->kvm->arch.kvm_ops->vcpu_free(vcpu); in kvmppc_core_vcpu_free()
2164 kvm->arch.kvm_ops->destroy_vm(kvm); in kvmppc_core_destroy_vm()
2169 vcpu->kvm->arch.kvm_ops->vcpu_load(vcpu, cpu); in kvmppc_core_vcpu_load()
2174 vcpu->kvm->arch.kvm_ops->vcpu_put(vcpu); in kvmppc_core_vcpu_put()