Lines Matching refs:fi

676 	struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;  in __deliver_machine_check()  local
682 spin_lock(&fi->lock); in __deliver_machine_check()
704 if (test_and_clear_bit(IRQ_PEND_MCHK_REP, &fi->pending_irqs)) { in __deliver_machine_check()
705 mchk.mcic |= fi->mchk.mcic; in __deliver_machine_check()
706 mchk.cr14 |= fi->mchk.cr14; in __deliver_machine_check()
707 memset(&fi->mchk, 0, sizeof(mchk)); in __deliver_machine_check()
711 spin_unlock(&fi->lock); in __deliver_machine_check()
997 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; in __deliver_service() local
1000 spin_lock(&fi->lock); in __deliver_service()
1001 if (test_bit(IRQ_PEND_EXT_SERVICE, &fi->masked_irqs) || in __deliver_service()
1002 !(test_bit(IRQ_PEND_EXT_SERVICE, &fi->pending_irqs))) { in __deliver_service()
1003 spin_unlock(&fi->lock); in __deliver_service()
1006 ext = fi->srv_signal; in __deliver_service()
1007 memset(&fi->srv_signal, 0, sizeof(ext)); in __deliver_service()
1008 clear_bit(IRQ_PEND_EXT_SERVICE, &fi->pending_irqs); in __deliver_service()
1009 clear_bit(IRQ_PEND_EXT_SERVICE_EV, &fi->pending_irqs); in __deliver_service()
1011 set_bit(IRQ_PEND_EXT_SERVICE, &fi->masked_irqs); in __deliver_service()
1012 spin_unlock(&fi->lock); in __deliver_service()
1025 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; in __deliver_service_ev() local
1028 spin_lock(&fi->lock); in __deliver_service_ev()
1029 if (!(test_bit(IRQ_PEND_EXT_SERVICE_EV, &fi->pending_irqs))) { in __deliver_service_ev()
1030 spin_unlock(&fi->lock); in __deliver_service_ev()
1033 ext = fi->srv_signal; in __deliver_service_ev()
1035 fi->srv_signal.ext_params &= ~SCCB_EVENT_PENDING; in __deliver_service_ev()
1036 clear_bit(IRQ_PEND_EXT_SERVICE_EV, &fi->pending_irqs); in __deliver_service_ev()
1037 spin_unlock(&fi->lock); in __deliver_service_ev()
1049 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; in __deliver_pfault_done() local
1053 spin_lock(&fi->lock); in __deliver_pfault_done()
1054 inti = list_first_entry_or_null(&fi->lists[FIRQ_LIST_PFAULT], in __deliver_pfault_done()
1059 fi->counters[FIRQ_CNTR_PFAULT] -= 1; in __deliver_pfault_done()
1061 if (list_empty(&fi->lists[FIRQ_LIST_PFAULT])) in __deliver_pfault_done()
1062 clear_bit(IRQ_PEND_PFAULT_DONE, &fi->pending_irqs); in __deliver_pfault_done()
1063 spin_unlock(&fi->lock); in __deliver_pfault_done()
1091 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; in __deliver_virtio() local
1095 spin_lock(&fi->lock); in __deliver_virtio()
1096 inti = list_first_entry_or_null(&fi->lists[FIRQ_LIST_VIRTIO], in __deliver_virtio()
1109 fi->counters[FIRQ_CNTR_VIRTIO] -= 1; in __deliver_virtio()
1111 if (list_empty(&fi->lists[FIRQ_LIST_VIRTIO])) in __deliver_virtio()
1112 clear_bit(IRQ_PEND_VIRTIO, &fi->pending_irqs); in __deliver_virtio()
1113 spin_unlock(&fi->lock); in __deliver_virtio()
1165 struct kvm_s390_float_interrupt *fi; in __deliver_io() local
1172 fi = &vcpu->kvm->arch.float_int; in __deliver_io()
1174 spin_lock(&fi->lock); in __deliver_io()
1176 isc_list = &fi->lists[isc]; in __deliver_io()
1197 fi->counters[FIRQ_CNTR_IO] -= 1; in __deliver_io()
1200 clear_bit(irq_type, &fi->pending_irqs); in __deliver_io()
1201 spin_unlock(&fi->lock); in __deliver_io()
1711 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in get_io_int() local
1712 struct list_head *isc_list = &fi->lists[FIRQ_LIST_IO_ISC_0 + isc]; in get_io_int()
1717 spin_lock(&fi->lock); in get_io_int()
1724 fi->counters[FIRQ_CNTR_IO] -= 1; in get_io_int()
1726 clear_bit(isc_to_irq_type(isc), &fi->pending_irqs); in get_io_int()
1727 spin_unlock(&fi->lock); in get_io_int()
1730 spin_unlock(&fi->lock); in get_io_int()
1822 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in __inject_service() local
1825 spin_lock(&fi->lock); in __inject_service()
1826 fi->srv_signal.ext_params |= inti->ext.ext_params & SCCB_EVENT_PENDING; in __inject_service()
1829 if (fi->srv_signal.ext_params & SCCB_EVENT_PENDING) in __inject_service()
1830 set_bit(IRQ_PEND_EXT_SERVICE_EV, &fi->pending_irqs); in __inject_service()
1840 if (fi->srv_signal.ext_params & SCCB_MASK) in __inject_service()
1842 fi->srv_signal.ext_params |= inti->ext.ext_params & SCCB_MASK; in __inject_service()
1843 set_bit(IRQ_PEND_EXT_SERVICE, &fi->pending_irqs); in __inject_service()
1845 spin_unlock(&fi->lock); in __inject_service()
1853 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in __inject_virtio() local
1856 spin_lock(&fi->lock); in __inject_virtio()
1857 if (fi->counters[FIRQ_CNTR_VIRTIO] >= KVM_S390_MAX_VIRTIO_IRQS) { in __inject_virtio()
1858 spin_unlock(&fi->lock); in __inject_virtio()
1861 fi->counters[FIRQ_CNTR_VIRTIO] += 1; in __inject_virtio()
1862 list_add_tail(&inti->list, &fi->lists[FIRQ_LIST_VIRTIO]); in __inject_virtio()
1863 set_bit(IRQ_PEND_VIRTIO, &fi->pending_irqs); in __inject_virtio()
1864 spin_unlock(&fi->lock); in __inject_virtio()
1871 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in __inject_pfault_done() local
1874 spin_lock(&fi->lock); in __inject_pfault_done()
1875 if (fi->counters[FIRQ_CNTR_PFAULT] >= in __inject_pfault_done()
1877 spin_unlock(&fi->lock); in __inject_pfault_done()
1880 fi->counters[FIRQ_CNTR_PFAULT] += 1; in __inject_pfault_done()
1881 list_add_tail(&inti->list, &fi->lists[FIRQ_LIST_PFAULT]); in __inject_pfault_done()
1882 set_bit(IRQ_PEND_PFAULT_DONE, &fi->pending_irqs); in __inject_pfault_done()
1883 spin_unlock(&fi->lock); in __inject_pfault_done()
1891 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in __inject_float_mchk() local
1894 spin_lock(&fi->lock); in __inject_float_mchk()
1895 fi->mchk.cr14 |= inti->mchk.cr14 & (1UL << CR_PENDING_SUBCLASS); in __inject_float_mchk()
1896 fi->mchk.mcic |= inti->mchk.mcic; in __inject_float_mchk()
1897 set_bit(IRQ_PEND_MCHK_REP, &fi->pending_irqs); in __inject_float_mchk()
1898 spin_unlock(&fi->lock); in __inject_float_mchk()
1906 struct kvm_s390_float_interrupt *fi; in __inject_io() local
1926 fi = &kvm->arch.float_int; in __inject_io()
1927 spin_lock(&fi->lock); in __inject_io()
1928 if (fi->counters[FIRQ_CNTR_IO] >= KVM_S390_MAX_FLOAT_IRQS) { in __inject_io()
1929 spin_unlock(&fi->lock); in __inject_io()
1932 fi->counters[FIRQ_CNTR_IO] += 1; in __inject_io()
1941 list = &fi->lists[FIRQ_LIST_IO_ISC_0 + isc]; in __inject_io()
1943 set_bit(isc_to_irq_type(isc), &fi->pending_irqs); in __inject_io()
1944 spin_unlock(&fi->lock); in __inject_io()
2231 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in kvm_s390_clear_float_irqs() local
2236 fi->masked_irqs = 0; in kvm_s390_clear_float_irqs()
2238 spin_lock(&fi->lock); in kvm_s390_clear_float_irqs()
2239 fi->pending_irqs = 0; in kvm_s390_clear_float_irqs()
2240 memset(&fi->srv_signal, 0, sizeof(fi->srv_signal)); in kvm_s390_clear_float_irqs()
2241 memset(&fi->mchk, 0, sizeof(fi->mchk)); in kvm_s390_clear_float_irqs()
2243 clear_irq_list(&fi->lists[i]); in kvm_s390_clear_float_irqs()
2245 fi->counters[i] = 0; in kvm_s390_clear_float_irqs()
2246 spin_unlock(&fi->lock); in kvm_s390_clear_float_irqs()
2254 struct kvm_s390_float_interrupt *fi; in get_all_floating_irqs() local
2291 fi = &kvm->arch.float_int; in get_all_floating_irqs()
2292 spin_lock(&fi->lock); in get_all_floating_irqs()
2294 list_for_each_entry(inti, &fi->lists[i], list) { in get_all_floating_irqs()
2304 if (test_bit(IRQ_PEND_EXT_SERVICE, &fi->pending_irqs) || in get_all_floating_irqs()
2305 test_bit(IRQ_PEND_EXT_SERVICE_EV, &fi->pending_irqs)) { in get_all_floating_irqs()
2313 irq->u.ext = fi->srv_signal; in get_all_floating_irqs()
2316 if (test_bit(IRQ_PEND_MCHK_REP, &fi->pending_irqs)) { in get_all_floating_irqs()
2324 irq->u.mchk = fi->mchk; in get_all_floating_irqs()
2329 spin_unlock(&fi->lock); in get_all_floating_irqs()
2342 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in flic_ais_mode_get_all() local
2351 mutex_lock(&fi->ais_lock); in flic_ais_mode_get_all()
2352 ais.simm = fi->simm; in flic_ais_mode_get_all()
2353 ais.nimm = fi->nimm; in flic_ais_mode_get_all()
2354 mutex_unlock(&fi->ais_lock); in flic_ais_mode_get_all()
2578 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in modify_ais_mode() local
2592 (fi->simm & AIS_MODE_MASK(req.isc)) ? in modify_ais_mode()
2593 (fi->nimm & AIS_MODE_MASK(req.isc)) ? in modify_ais_mode()
2597 mutex_lock(&fi->ais_lock); in modify_ais_mode()
2600 fi->simm &= ~AIS_MODE_MASK(req.isc); in modify_ais_mode()
2601 fi->nimm &= ~AIS_MODE_MASK(req.isc); in modify_ais_mode()
2604 fi->simm |= AIS_MODE_MASK(req.isc); in modify_ais_mode()
2605 fi->nimm &= ~AIS_MODE_MASK(req.isc); in modify_ais_mode()
2610 mutex_unlock(&fi->ais_lock); in modify_ais_mode()
2618 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in kvm_s390_inject_airq() local
2629 mutex_lock(&fi->ais_lock); in kvm_s390_inject_airq()
2630 if (fi->nimm & AIS_MODE_MASK(adapter->isc)) { in kvm_s390_inject_airq()
2636 if (!ret && (fi->simm & AIS_MODE_MASK(adapter->isc))) { in kvm_s390_inject_airq()
2637 fi->nimm |= AIS_MODE_MASK(adapter->isc); in kvm_s390_inject_airq()
2642 mutex_unlock(&fi->ais_lock); in kvm_s390_inject_airq()
2659 struct kvm_s390_float_interrupt *fi = &kvm->arch.float_int; in flic_ais_mode_set_all() local
2668 mutex_lock(&fi->ais_lock); in flic_ais_mode_set_all()
2669 fi->simm = ais.simm; in flic_ais_mode_set_all()
2670 fi->nimm = ais.nimm; in flic_ais_mode_set_all()
2671 mutex_unlock(&fi->ais_lock); in flic_ais_mode_set_all()