Lines Matching full:sregs

1510                            struct kvm_sregs *sregs)  in get_sregs_base()  argument
1514 sregs->u.e.features |= KVM_SREGS_E_BASE; in get_sregs_base()
1516 sregs->u.e.csrr0 = vcpu->arch.csrr0; in get_sregs_base()
1517 sregs->u.e.csrr1 = vcpu->arch.csrr1; in get_sregs_base()
1518 sregs->u.e.mcsr = vcpu->arch.mcsr; in get_sregs_base()
1519 sregs->u.e.esr = kvmppc_get_esr(vcpu); in get_sregs_base()
1520 sregs->u.e.dear = kvmppc_get_dar(vcpu); in get_sregs_base()
1521 sregs->u.e.tsr = vcpu->arch.tsr; in get_sregs_base()
1522 sregs->u.e.tcr = vcpu->arch.tcr; in get_sregs_base()
1523 sregs->u.e.dec = kvmppc_get_dec(vcpu, tb); in get_sregs_base()
1524 sregs->u.e.tb = tb; in get_sregs_base()
1525 sregs->u.e.vrsave = vcpu->arch.vrsave; in get_sregs_base()
1529 struct kvm_sregs *sregs) in set_sregs_base() argument
1531 if (!(sregs->u.e.features & KVM_SREGS_E_BASE)) in set_sregs_base()
1534 vcpu->arch.csrr0 = sregs->u.e.csrr0; in set_sregs_base()
1535 vcpu->arch.csrr1 = sregs->u.e.csrr1; in set_sregs_base()
1536 vcpu->arch.mcsr = sregs->u.e.mcsr; in set_sregs_base()
1537 kvmppc_set_esr(vcpu, sregs->u.e.esr); in set_sregs_base()
1538 kvmppc_set_dar(vcpu, sregs->u.e.dear); in set_sregs_base()
1539 vcpu->arch.vrsave = sregs->u.e.vrsave; in set_sregs_base()
1540 kvmppc_set_tcr(vcpu, sregs->u.e.tcr); in set_sregs_base()
1542 if (sregs->u.e.update_special & KVM_SREGS_E_UPDATE_DEC) { in set_sregs_base()
1543 vcpu->arch.dec = sregs->u.e.dec; in set_sregs_base()
1547 if (sregs->u.e.update_special & KVM_SREGS_E_UPDATE_TSR) in set_sregs_base()
1548 kvmppc_set_tsr(vcpu, sregs->u.e.tsr); in set_sregs_base()
1554 struct kvm_sregs *sregs) in get_sregs_arch206() argument
1556 sregs->u.e.features |= KVM_SREGS_E_ARCH206; in get_sregs_arch206()
1558 sregs->u.e.pir = vcpu->vcpu_id; in get_sregs_arch206()
1559 sregs->u.e.mcsrr0 = vcpu->arch.mcsrr0; in get_sregs_arch206()
1560 sregs->u.e.mcsrr1 = vcpu->arch.mcsrr1; in get_sregs_arch206()
1561 sregs->u.e.decar = vcpu->arch.decar; in get_sregs_arch206()
1562 sregs->u.e.ivpr = vcpu->arch.ivpr; in get_sregs_arch206()
1566 struct kvm_sregs *sregs) in set_sregs_arch206() argument
1568 if (!(sregs->u.e.features & KVM_SREGS_E_ARCH206)) in set_sregs_arch206()
1571 if (sregs->u.e.pir != vcpu->vcpu_id) in set_sregs_arch206()
1574 vcpu->arch.mcsrr0 = sregs->u.e.mcsrr0; in set_sregs_arch206()
1575 vcpu->arch.mcsrr1 = sregs->u.e.mcsrr1; in set_sregs_arch206()
1576 vcpu->arch.decar = sregs->u.e.decar; in set_sregs_arch206()
1577 vcpu->arch.ivpr = sregs->u.e.ivpr; in set_sregs_arch206()
1582 int kvmppc_get_sregs_ivor(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) in kvmppc_get_sregs_ivor() argument
1584 sregs->u.e.features |= KVM_SREGS_E_IVOR; in kvmppc_get_sregs_ivor()
1586 sregs->u.e.ivor_low[0] = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL]; in kvmppc_get_sregs_ivor()
1587 sregs->u.e.ivor_low[1] = vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK]; in kvmppc_get_sregs_ivor()
1588 sregs->u.e.ivor_low[2] = vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE]; in kvmppc_get_sregs_ivor()
1589 sregs->u.e.ivor_low[3] = vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE]; in kvmppc_get_sregs_ivor()
1590 sregs->u.e.ivor_low[4] = vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL]; in kvmppc_get_sregs_ivor()
1591 sregs->u.e.ivor_low[5] = vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT]; in kvmppc_get_sregs_ivor()
1592 sregs->u.e.ivor_low[6] = vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM]; in kvmppc_get_sregs_ivor()
1593 sregs->u.e.ivor_low[7] = vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL]; in kvmppc_get_sregs_ivor()
1594 sregs->u.e.ivor_low[8] = vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL]; in kvmppc_get_sregs_ivor()
1595 sregs->u.e.ivor_low[9] = vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL]; in kvmppc_get_sregs_ivor()
1596 sregs->u.e.ivor_low[10] = vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER]; in kvmppc_get_sregs_ivor()
1597 sregs->u.e.ivor_low[11] = vcpu->arch.ivor[BOOKE_IRQPRIO_FIT]; in kvmppc_get_sregs_ivor()
1598 sregs->u.e.ivor_low[12] = vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG]; in kvmppc_get_sregs_ivor()
1599 sregs->u.e.ivor_low[13] = vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS]; in kvmppc_get_sregs_ivor()
1600 sregs->u.e.ivor_low[14] = vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS]; in kvmppc_get_sregs_ivor()
1601 sregs->u.e.ivor_low[15] = vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG]; in kvmppc_get_sregs_ivor()
1605 int kvmppc_set_sregs_ivor(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) in kvmppc_set_sregs_ivor() argument
1607 if (!(sregs->u.e.features & KVM_SREGS_E_IVOR)) in kvmppc_set_sregs_ivor()
1610 vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL] = sregs->u.e.ivor_low[0]; in kvmppc_set_sregs_ivor()
1611 vcpu->arch.ivor[BOOKE_IRQPRIO_MACHINE_CHECK] = sregs->u.e.ivor_low[1]; in kvmppc_set_sregs_ivor()
1612 vcpu->arch.ivor[BOOKE_IRQPRIO_DATA_STORAGE] = sregs->u.e.ivor_low[2]; in kvmppc_set_sregs_ivor()
1613 vcpu->arch.ivor[BOOKE_IRQPRIO_INST_STORAGE] = sregs->u.e.ivor_low[3]; in kvmppc_set_sregs_ivor()
1614 vcpu->arch.ivor[BOOKE_IRQPRIO_EXTERNAL] = sregs->u.e.ivor_low[4]; in kvmppc_set_sregs_ivor()
1615 vcpu->arch.ivor[BOOKE_IRQPRIO_ALIGNMENT] = sregs->u.e.ivor_low[5]; in kvmppc_set_sregs_ivor()
1616 vcpu->arch.ivor[BOOKE_IRQPRIO_PROGRAM] = sregs->u.e.ivor_low[6]; in kvmppc_set_sregs_ivor()
1617 vcpu->arch.ivor[BOOKE_IRQPRIO_FP_UNAVAIL] = sregs->u.e.ivor_low[7]; in kvmppc_set_sregs_ivor()
1618 vcpu->arch.ivor[BOOKE_IRQPRIO_SYSCALL] = sregs->u.e.ivor_low[8]; in kvmppc_set_sregs_ivor()
1619 vcpu->arch.ivor[BOOKE_IRQPRIO_AP_UNAVAIL] = sregs->u.e.ivor_low[9]; in kvmppc_set_sregs_ivor()
1620 vcpu->arch.ivor[BOOKE_IRQPRIO_DECREMENTER] = sregs->u.e.ivor_low[10]; in kvmppc_set_sregs_ivor()
1621 vcpu->arch.ivor[BOOKE_IRQPRIO_FIT] = sregs->u.e.ivor_low[11]; in kvmppc_set_sregs_ivor()
1622 vcpu->arch.ivor[BOOKE_IRQPRIO_WATCHDOG] = sregs->u.e.ivor_low[12]; in kvmppc_set_sregs_ivor()
1623 vcpu->arch.ivor[BOOKE_IRQPRIO_DTLB_MISS] = sregs->u.e.ivor_low[13]; in kvmppc_set_sregs_ivor()
1624 vcpu->arch.ivor[BOOKE_IRQPRIO_ITLB_MISS] = sregs->u.e.ivor_low[14]; in kvmppc_set_sregs_ivor()
1625 vcpu->arch.ivor[BOOKE_IRQPRIO_DEBUG] = sregs->u.e.ivor_low[15]; in kvmppc_set_sregs_ivor()
1631 struct kvm_sregs *sregs) in kvm_arch_vcpu_ioctl_get_sregs() argument
1637 sregs->pvr = vcpu->arch.pvr; in kvm_arch_vcpu_ioctl_get_sregs()
1639 get_sregs_base(vcpu, sregs); in kvm_arch_vcpu_ioctl_get_sregs()
1640 get_sregs_arch206(vcpu, sregs); in kvm_arch_vcpu_ioctl_get_sregs()
1641 ret = vcpu->kvm->arch.kvm_ops->get_sregs(vcpu, sregs); in kvm_arch_vcpu_ioctl_get_sregs()
1648 struct kvm_sregs *sregs) in kvm_arch_vcpu_ioctl_set_sregs() argument
1653 if (vcpu->arch.pvr != sregs->pvr) in kvm_arch_vcpu_ioctl_set_sregs()
1656 ret = set_sregs_base(vcpu, sregs); in kvm_arch_vcpu_ioctl_set_sregs()
1660 ret = set_sregs_arch206(vcpu, sregs); in kvm_arch_vcpu_ioctl_set_sregs()
1664 ret = vcpu->kvm->arch.kvm_ops->set_sregs(vcpu, sregs); in kvm_arch_vcpu_ioctl_set_sregs()