Lines Matching refs:sregs

1502                            struct kvm_sregs *sregs)  in get_sregs_base()  argument
1506 sregs->u.e.features |= KVM_SREGS_E_BASE; in get_sregs_base()
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()
1511 sregs->u.e.esr = kvmppc_get_esr(vcpu); in get_sregs_base()
1512 sregs->u.e.dear = kvmppc_get_dar(vcpu); 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()
1515 sregs->u.e.dec = kvmppc_get_dec(vcpu, tb); in get_sregs_base()
1516 sregs->u.e.tb = tb; in get_sregs_base()
1517 sregs->u.e.vrsave = vcpu->arch.vrsave; in get_sregs_base()
1521 struct kvm_sregs *sregs) in set_sregs_base() argument
1523 if (!(sregs->u.e.features & KVM_SREGS_E_BASE)) in set_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()
1529 kvmppc_set_esr(vcpu, sregs->u.e.esr); in set_sregs_base()
1530 kvmppc_set_dar(vcpu, sregs->u.e.dear); in set_sregs_base()
1531 vcpu->arch.vrsave = sregs->u.e.vrsave; in set_sregs_base()
1532 kvmppc_set_tcr(vcpu, sregs->u.e.tcr); in set_sregs_base()
1534 if (sregs->u.e.update_special & KVM_SREGS_E_UPDATE_DEC) { in set_sregs_base()
1535 vcpu->arch.dec = sregs->u.e.dec; in set_sregs_base()
1539 if (sregs->u.e.update_special & KVM_SREGS_E_UPDATE_TSR) in set_sregs_base()
1540 kvmppc_set_tsr(vcpu, sregs->u.e.tsr); in set_sregs_base()
1546 struct kvm_sregs *sregs) in get_sregs_arch206() argument
1548 sregs->u.e.features |= KVM_SREGS_E_ARCH206; in get_sregs_arch206()
1550 sregs->u.e.pir = vcpu->vcpu_id; in get_sregs_arch206()
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()
1558 struct kvm_sregs *sregs) in set_sregs_arch206() argument
1560 if (!(sregs->u.e.features & KVM_SREGS_E_ARCH206)) in set_sregs_arch206()
1563 if (sregs->u.e.pir != vcpu->vcpu_id) in set_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()
1574 int kvmppc_get_sregs_ivor(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) in kvmppc_get_sregs_ivor() argument
1576 sregs->u.e.features |= KVM_SREGS_E_IVOR; in kvmppc_get_sregs_ivor()
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()
1597 int kvmppc_set_sregs_ivor(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) in kvmppc_set_sregs_ivor() argument
1599 if (!(sregs->u.e.features & KVM_SREGS_E_IVOR)) in kvmppc_set_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()
1623 struct kvm_sregs *sregs) in kvm_arch_vcpu_ioctl_get_sregs() argument
1629 sregs->pvr = vcpu->arch.pvr; in kvm_arch_vcpu_ioctl_get_sregs()
1631 get_sregs_base(vcpu, sregs); in kvm_arch_vcpu_ioctl_get_sregs()
1632 get_sregs_arch206(vcpu, sregs); 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()
1640 struct kvm_sregs *sregs) in kvm_arch_vcpu_ioctl_set_sregs() argument
1645 if (vcpu->arch.pvr != sregs->pvr) in kvm_arch_vcpu_ioctl_set_sregs()
1648 ret = set_sregs_base(vcpu, sregs); in kvm_arch_vcpu_ioctl_set_sregs()
1652 ret = set_sregs_arch206(vcpu, sregs); 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()