Lines Matching +full:cross +full:- +full:s390x +full:- +full:system

10  * your option) any later version. See the COPYING file in the top-level
17 #include "system/memory.h"
18 #include "qemu/error-report.h"
20 #include "system/hw_accel.h"
23 #include "hw/s390x/s390-pci-inst.h"
24 #include "hw/s390x/s390-pci-bus.h"
25 #include "hw/s390x/s390-pci-kvm.h"
26 #include "hw/s390x/s390-pci-vfio.h"
27 #include "hw/s390x/tod.h"
33 if (iommu->dma_limit) { in inc_dma_avail()
34 iommu->dma_limit->avail++; in inc_dma_avail()
40 if (iommu->dma_limit) { in dec_dma_avail()
41 iommu->dma_limit->avail--; in dec_dma_avail()
48 env->regs[r] &= ~0xff000000ULL; in s390_set_status_code()
49 env->regs[r] |= (status_code & 0xff) << 24; in s390_set_status_code()
61 if (lduw_be_p(&rrb->request.hdr.len) != 32) { in list_pci()
63 rc = -EINVAL; in list_pci()
67 if ((ldl_be_p(&rrb->request.fmt) & CLP_MASK_FMT) != 0) { in list_pci()
69 rc = -EINVAL; in list_pci()
73 if ((ldl_be_p(&rrb->request.fmt) & ~CLP_MASK_FMT) != 0 || in list_pci()
74 ldq_be_p(&rrb->request.reserved1) != 0) { in list_pci()
76 rc = -EINVAL; in list_pci()
80 resume_token = ldq_be_p(&rrb->request.resume_token); in list_pci()
86 rc = -EINVAL; in list_pci()
93 if (lduw_be_p(&rrb->response.hdr.len) < 48) { in list_pci()
95 rc = -EINVAL; in list_pci()
99 initial_l2 = lduw_be_p(&rrb->response.hdr.len); in list_pci()
100 if ((initial_l2 - LIST_PCI_HDR_LEN) % sizeof(ClpFhListEntry) in list_pci()
103 rc = -EINVAL; in list_pci()
108 stl_be_p(&rrb->response.fmt, 0); in list_pci()
109 stq_be_p(&rrb->response.reserved1, 0); in list_pci()
110 stl_be_p(&rrb->response.mdd, FH_MASK_SHM); in list_pci()
111 stw_be_p(&rrb->response.max_fn, PCI_MAX_FUNCTIONS); in list_pci()
112 rrb->response.flags = UID_CHECKING_ENABLED; in list_pci()
113 rrb->response.entry_size = sizeof(ClpFhListEntry); in list_pci()
118 stw_be_p(&rrb->response.fh_list[i].device_id, in list_pci()
119 pci_get_word(pbdev->pdev->config + PCI_DEVICE_ID)); in list_pci()
120 stw_be_p(&rrb->response.fh_list[i].vendor_id, in list_pci()
121 pci_get_word(pbdev->pdev->config + PCI_VENDOR_ID)); in list_pci()
123 stl_be_p(&rrb->response.fh_list[i].config, in list_pci()
124 pbdev->state == ZPCI_FS_STANDBY ? 0 : 1 << 31); in list_pci()
125 stl_be_p(&rrb->response.fh_list[i].fid, pbdev->fid); in list_pci()
126 stl_be_p(&rrb->response.fh_list[i].fh, pbdev->fh); in list_pci()
131 lduw_be_p(&rrb->response.fh_list[i].vendor_id), in list_pci()
132 lduw_be_p(&rrb->response.fh_list[i].device_id), in list_pci()
133 ldl_be_p(&rrb->response.fh_list[i].fid), in list_pci()
134 ldl_be_p(&rrb->response.fh_list[i].fh)); in list_pci()
142 resume_token = pbdev->fh & FH_MASK_INDEX; in list_pci()
144 stq_be_p(&rrb->response.resume_token, resume_token); in list_pci()
145 stw_be_p(&rrb->response.hdr.len, g_l2); in list_pci()
146 stw_be_p(&rrb->response.hdr.rsp, CLP_RC_OK); in list_pci()
150 stw_be_p(&rrb->response.hdr.rsp, res_code); in list_pci()
164 CPUS390XState *env = &cpu->env; in clp_service_call()
168 if (env->psw.mask & PSW_MASK_PSTATE) { in clp_service_call()
173 if (s390_cpu_virt_mem_read(cpu, env->regs[r2], r2, buffer, sizeof(*reqh))) { in clp_service_call()
178 req_len = lduw_be_p(&reqh->len); in clp_service_call()
184 if (s390_cpu_virt_mem_read(cpu, env->regs[r2], r2, buffer, in clp_service_call()
190 res_len = lduw_be_p(&resh->len); in clp_service_call()
200 if (s390_cpu_virt_mem_read(cpu, env->regs[r2], r2, buffer, in clp_service_call()
207 stw_be_p(&resh->rsp, CLP_RC_LEN); in clp_service_call()
211 switch (lduw_be_p(&reqh->cmd)) { in clp_service_call()
221 pbdev = s390_pci_find_dev_by_fh(s, ldl_be_p(&reqsetpci->fh)); in clp_service_call()
223 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FH); in clp_service_call()
227 switch (reqsetpci->oc) { in clp_service_call()
229 switch (reqsetpci->ndas) { in clp_service_call()
231 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_DMAAS); in clp_service_call()
236 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_RES); in clp_service_call()
240 if (pbdev->fh & FH_MASK_ENABLE) { in clp_service_call()
241 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FHOP); in clp_service_call()
251 if (pbdev->interp) { in clp_service_call()
253 if (!s390_pci_get_host_fh(pbdev, &pbdev->fh) || in clp_service_call()
254 !(pbdev->fh & FH_MASK_ENABLE)) { in clp_service_call()
255 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FH); in clp_service_call()
259 pbdev->fh |= FH_MASK_ENABLE; in clp_service_call()
260 pbdev->state = ZPCI_FS_ENABLED; in clp_service_call()
261 stl_be_p(&ressetpci->fh, pbdev->fh); in clp_service_call()
262 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_OK); in clp_service_call()
265 if (!(pbdev->fh & FH_MASK_ENABLE)) { in clp_service_call()
266 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FHOP); in clp_service_call()
270 pbdev->fh &= ~FH_MASK_ENABLE; in clp_service_call()
271 pbdev->state = ZPCI_FS_DISABLED; in clp_service_call()
272 stl_be_p(&ressetpci->fh, pbdev->fh); in clp_service_call()
273 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_OK); in clp_service_call()
276 trace_s390_pci_unknown("set-pci", reqsetpci->oc); in clp_service_call()
277 stw_be_p(&ressetpci->hdr.rsp, CLP_RC_SETPCIFN_FHOP); in clp_service_call()
286 pbdev = s390_pci_find_dev_by_fh(s, ldl_be_p(&reqquery->fh)); in clp_service_call()
288 trace_s390_pci_nodev("query", ldl_be_p(&reqquery->fh)); in clp_service_call()
289 stw_be_p(&resquery->hdr.rsp, CLP_RC_SETPCIFN_FH); in clp_service_call()
293 stq_be_p(&resquery->sdma, pbdev->zpci_fn.sdma); in clp_service_call()
294 stq_be_p(&resquery->edma, pbdev->zpci_fn.edma); in clp_service_call()
295 stw_be_p(&resquery->pchid, pbdev->zpci_fn.pchid); in clp_service_call()
296 stw_be_p(&resquery->vfn, pbdev->zpci_fn.vfn); in clp_service_call()
297 resquery->flags = pbdev->zpci_fn.flags; in clp_service_call()
298 resquery->pfgid = pbdev->zpci_fn.pfgid; in clp_service_call()
299 resquery->pft = pbdev->zpci_fn.pft; in clp_service_call()
300 resquery->fmbl = pbdev->zpci_fn.fmbl; in clp_service_call()
301 stl_be_p(&resquery->fid, pbdev->zpci_fn.fid); in clp_service_call()
302 stl_be_p(&resquery->uid, pbdev->zpci_fn.uid); in clp_service_call()
303 memcpy(resquery->pfip, pbdev->zpci_fn.pfip, CLP_PFIP_NR_SEGMENTS); in clp_service_call()
304 memcpy(resquery->util_str, pbdev->zpci_fn.util_str, CLP_UTIL_STR_LEN); in clp_service_call()
307 uint32_t data = pci_get_long(pbdev->pdev->config + in clp_service_call()
310 stl_be_p(&resquery->bar[i], data); in clp_service_call()
311 resquery->bar_size[i] = pbdev->pdev->io_regions[i].size ? in clp_service_call()
312 ctz64(pbdev->pdev->io_regions[i].size) : 0; in clp_service_call()
314 ldl_be_p(&resquery->bar[i]), in clp_service_call()
315 pbdev->pdev->io_regions[i].size, in clp_service_call()
316 resquery->bar_size[i]); in clp_service_call()
319 stw_be_p(&resquery->hdr.rsp, CLP_RC_OK); in clp_service_call()
328 group = s390_group_find(reqgrp->g); in clp_service_call()
332 stw_be_p(&resgrp->hdr.rsp, CLP_RC_QUERYPCIFG_PFGID); in clp_service_call()
335 resgrp->fr = group->zpci_group.fr; in clp_service_call()
336 stq_be_p(&resgrp->dasm, group->zpci_group.dasm); in clp_service_call()
337 stq_be_p(&resgrp->msia, group->zpci_group.msia); in clp_service_call()
338 stw_be_p(&resgrp->mui, group->zpci_group.mui); in clp_service_call()
339 stw_be_p(&resgrp->i, group->zpci_group.i); in clp_service_call()
340 stw_be_p(&resgrp->maxstbl, group->zpci_group.maxstbl); in clp_service_call()
341 resgrp->version = group->zpci_group.version; in clp_service_call()
342 resgrp->dtsm = group->zpci_group.dtsm; in clp_service_call()
343 stw_be_p(&resgrp->hdr.rsp, CLP_RC_OK); in clp_service_call()
347 trace_s390_pci_unknown("clp", lduw_be_p(&reqh->cmd)); in clp_service_call()
348 stw_be_p(&resh->rsp, CLP_RC_CMD); in clp_service_call()
353 if (s390_cpu_virt_mem_write(cpu, env->regs[r2], r2, buffer, in clp_service_call()
363 * Swap data contained in s390x big endian registers to little endian
386 return -EINVAL; in zpci_endian_swap()
398 QTAILQ_FOREACH(subregion, &mr->subregions, subregions_link) { in s390_get_subregion()
399 subregion_size = int128_get64(subregion->size); in s390_get_subregion()
400 if ((offset >= subregion->addr) && in s390_get_subregion()
401 (offset + len) <= (subregion->addr + subregion_size)) { in s390_get_subregion()
414 mr = pbdev->pdev->io_regions[pcias].memory; in zpci_read_bar()
416 offset -= mr->addr; in zpci_read_bar()
424 CPUS390XState *env = &cpu->env; in pcilg_service_call()
433 if (env->psw.mask & PSW_MASK_PSTATE) { in pcilg_service_call()
443 fh = env->regs[r2] >> 32; in pcilg_service_call()
444 pcias = (env->regs[r2] >> 16) & 0xf; in pcilg_service_call()
445 len = env->regs[r2] & 0xf; in pcilg_service_call()
446 offset = env->regs[r2 + 1]; in pcilg_service_call()
460 switch (pbdev->state) { in pcilg_service_call()
472 if (!len || (len > (8 - (offset & 0x7)))) { in pcilg_service_call()
483 if (!len || (len > (4 - (offset & 0x3))) || len == 3) { in pcilg_service_call()
488 pbdev->pdev, offset, pci_config_size(pbdev->pdev), len); in pcilg_service_call()
502 pbdev->fmb.counter[ZPCI_FMB_CNT_LD]++; in pcilg_service_call()
504 env->regs[r1] = data; in pcilg_service_call()
514 mr = pbdev->pdev->io_regions[pcias].memory; in zpci_write_bar()
516 offset -= mr->addr; in zpci_write_bar()
524 CPUS390XState *env = &cpu->env; in pcistg_service_call()
532 if (env->psw.mask & PSW_MASK_PSTATE) { in pcistg_service_call()
542 fh = env->regs[r2] >> 32; in pcistg_service_call()
543 pcias = (env->regs[r2] >> 16) & 0xf; in pcistg_service_call()
544 len = env->regs[r2] & 0xf; in pcistg_service_call()
545 offset = env->regs[r2 + 1]; in pcistg_service_call()
546 data = env->regs[r1]; in pcistg_service_call()
560 switch (pbdev->state) { in pcistg_service_call()
577 * A length of 0 is invalid and length should not cross a double word in pcistg_service_call()
579 if (!len || (len > (8 - (offset & 0x7)))) { in pcistg_service_call()
592 /* possible access lengths are 1,2,4 and must not cross a word */ in pcistg_service_call()
593 if (!len || (len > (4 - (offset & 0x3))) || len == 3) { in pcistg_service_call()
599 pci_host_config_write_common(pbdev->pdev, offset, in pcistg_service_call()
600 pci_config_size(pbdev->pdev), in pcistg_service_call()
610 pbdev->fmb.counter[ZPCI_FMB_CNT_ST]++; in pcistg_service_call()
619 S390IOTLBEntry *cache = g_hash_table_lookup(iommu->iotlb, &entry->iova); in s390_pci_update_iotlb()
621 .type = entry->perm ? IOMMU_NOTIFIER_MAP : IOMMU_NOTIFIER_UNMAP, in s390_pci_update_iotlb()
624 .iova = entry->iova, in s390_pci_update_iotlb()
625 .translated_addr = entry->translated_addr, in s390_pci_update_iotlb()
626 .perm = entry->perm, in s390_pci_update_iotlb()
635 g_hash_table_remove(iommu->iotlb, &entry->iova); in s390_pci_update_iotlb()
641 if (cache->perm == entry->perm && in s390_pci_update_iotlb()
642 cache->translated_addr == entry->translated_addr) { in s390_pci_update_iotlb()
648 memory_region_notify_iommu(&iommu->iommu_mr, 0, event); in s390_pci_update_iotlb()
650 event.entry.perm = entry->perm; in s390_pci_update_iotlb()
654 cache->iova = entry->iova; in s390_pci_update_iotlb()
655 cache->translated_addr = entry->translated_addr; in s390_pci_update_iotlb()
656 cache->len = TARGET_PAGE_SIZE; in s390_pci_update_iotlb()
657 cache->perm = entry->perm; in s390_pci_update_iotlb()
658 g_hash_table_replace(iommu->iotlb, &cache->iova, cache); in s390_pci_update_iotlb()
666 memory_region_notify_iommu(&iommu->iommu_mr, 0, event); in s390_pci_update_iotlb()
669 return iommu->dma_limit ? iommu->dma_limit->avail : 1; in s390_pci_update_iotlb()
675 uint64_t remain = len, start = iova, end = start + len - 1, mask, size; in s390_pci_batch_unmap()
690 memory_region_notify_iommu(&iommu->iommu_mr, 0, event); in s390_pci_batch_unmap()
692 remain -= size; in s390_pci_batch_unmap()
698 CPUS390XState *env = &cpu->env; in rpcit_service_call()
709 if (env->psw.mask & PSW_MASK_PSTATE) { in rpcit_service_call()
719 fh = env->regs[r1] >> 32; in rpcit_service_call()
720 sstart = start = env->regs[r2]; in rpcit_service_call()
721 end = start + env->regs[r2 + 1]; in rpcit_service_call()
730 switch (pbdev->state) { in rpcit_service_call()
745 iommu = pbdev->iommu; in rpcit_service_call()
746 if (iommu->dma_limit) { in rpcit_service_call()
747 dma_avail = iommu->dma_limit->avail; in rpcit_service_call()
751 if (!iommu->g_iota) { in rpcit_service_call()
756 if (end < iommu->pba || start > iommu->pal) { in rpcit_service_call()
765 error = s390_guest_io_table_walk(iommu->g_iota, start, &entry); in rpcit_service_call()
811 pbdev->state = ZPCI_FS_ERROR; in rpcit_service_call()
814 s390_pci_generate_error_event(error, pbdev->fh, pbdev->fid, start, 0); in rpcit_service_call()
816 pbdev->fmb.counter[ZPCI_FMB_CNT_RPCIT]++; in rpcit_service_call()
831 CPUS390XState *env = &cpu->env; in pcistb_service_call()
842 if (env->psw.mask & PSW_MASK_PSTATE) { in pcistb_service_call()
847 fh = env->regs[r1] >> 32; in pcistb_service_call()
848 pcias = (env->regs[r1] >> 16) & 0xf; in pcistb_service_call()
849 len = env->regs[r1] & 0x1fff; in pcistb_service_call()
850 offset = env->regs[r3]; in pcistb_service_call()
864 switch (pbdev->state) { in pcistb_service_call()
889 (len > pbdev->pci_group->zpci_group.maxstbl)) { in pcistb_service_call()
892 /* Do not cross a 4K-byte boundary */ in pcistb_service_call()
901 mr = pbdev->pdev->io_regions[pcias].memory; in pcistb_service_call()
903 offset -= mr->addr; in pcistb_service_call()
928 pbdev->fmb.counter[ZPCI_FMB_CNT_STB]++; in pcistb_service_call()
943 pbdev->routes.adapter.adapter_id = css_get_adapter_id( in reg_irqs()
945 pbdev->summary_ind = get_indicator(ldq_be_p(&fib.aisb), sizeof(uint64_t)); in reg_irqs()
947 pbdev->indicator = get_indicator(ldq_be_p(&fib.aibv), len); in reg_irqs()
949 ret = map_indicator(&pbdev->routes.adapter, pbdev->summary_ind); in reg_irqs()
954 ret = map_indicator(&pbdev->routes.adapter, pbdev->indicator); in reg_irqs()
959 pbdev->routes.adapter.summary_addr = ldq_be_p(&fib.aisb); in reg_irqs()
960 pbdev->routes.adapter.summary_offset = FIB_DATA_AISBO(ldl_be_p(&fib.data)); in reg_irqs()
961 pbdev->routes.adapter.ind_addr = ldq_be_p(&fib.aibv); in reg_irqs()
962 pbdev->routes.adapter.ind_offset = FIB_DATA_AIBVO(ldl_be_p(&fib.data)); in reg_irqs()
963 pbdev->isc = isc; in reg_irqs()
964 pbdev->noi = FIB_DATA_NOI(ldl_be_p(&fib.data)); in reg_irqs()
965 pbdev->sum = FIB_DATA_SUM(ldl_be_p(&fib.data)); in reg_irqs()
967 trace_s390_pci_irqs("register", pbdev->routes.adapter.adapter_id); in reg_irqs()
970 release_indicator(&pbdev->routes.adapter, pbdev->summary_ind); in reg_irqs()
971 release_indicator(&pbdev->routes.adapter, pbdev->indicator); in reg_irqs()
972 pbdev->summary_ind = NULL; in reg_irqs()
973 pbdev->indicator = NULL; in reg_irqs()
979 release_indicator(&pbdev->routes.adapter, pbdev->summary_ind); in pci_dereg_irqs()
980 release_indicator(&pbdev->routes.adapter, pbdev->indicator); in pci_dereg_irqs()
982 pbdev->summary_ind = NULL; in pci_dereg_irqs()
983 pbdev->indicator = NULL; in pci_dereg_irqs()
984 pbdev->routes.adapter.summary_addr = 0; in pci_dereg_irqs()
985 pbdev->routes.adapter.summary_offset = 0; in pci_dereg_irqs()
986 pbdev->routes.adapter.ind_addr = 0; in pci_dereg_irqs()
987 pbdev->routes.adapter.ind_offset = 0; in pci_dereg_irqs()
988 pbdev->isc = 0; in pci_dereg_irqs()
989 pbdev->noi = 0; in pci_dereg_irqs()
990 pbdev->sum = 0; in pci_dereg_irqs()
992 trace_s390_pci_irqs("unregister", pbdev->routes.adapter.adapter_id); in pci_dereg_irqs()
999 S390PCIIOMMU *iommu = pbdev->iommu; in reg_ioat()
1008 if (pba > pal || pba < pbdev->zpci_fn.sdma || pal > pbdev->zpci_fn.edma) { in reg_ioat()
1010 return -EINVAL; in reg_ioat()
1017 return -EINVAL; in reg_ioat()
1018 } else if (!t && !pbdev->rtr_avail) { in reg_ioat()
1021 return -EINVAL; in reg_ioat()
1024 iommu->pba = pba; in reg_ioat()
1025 iommu->pal = pal; in reg_ioat()
1026 iommu->g_iota = g_iota; in reg_ioat()
1040 iommu->pba = 0; in pci_dereg_ioat()
1041 iommu->pal = 0; in pci_dereg_ioat()
1042 iommu->g_iota = 0; in pci_dereg_ioat()
1047 if (pbdev->fmb_timer) { in fmb_timer_free()
1048 timer_free(pbdev->fmb_timer); in fmb_timer_free()
1049 pbdev->fmb_timer = NULL; in fmb_timer_free()
1051 pbdev->fmb_addr = 0; in fmb_timer_free()
1052 memset(&pbdev->fmb, 0, sizeof(ZpciFmb)); in fmb_timer_free()
1059 uint64_t dst = pbdev->fmb_addr + offset; in fmb_do_update()
1087 s390_pci_generate_error_event(ERR_EVENT_FMBA, pbdev->fh, pbdev->fid, in fmb_do_update()
1088 pbdev->fmb_addr, 0); in fmb_do_update()
1102 pbdev->fmb.last_update *= 2; in fmb_update()
1103 pbdev->fmb.last_update |= UPDATE_U_BIT; in fmb_update()
1105 pbdev->fmb.last_update, in fmb_update()
1106 sizeof(pbdev->fmb.last_update))) { in fmb_update()
1112 pbdev->fmb.sample++, in fmb_update()
1113 sizeof(pbdev->fmb.sample))) { in fmb_update()
1120 pbdev->fmb.counter[i], in fmb_update()
1121 sizeof(pbdev->fmb.counter[0]))) { in fmb_update()
1127 pbdev->fmb.last_update = time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)); in fmb_update()
1128 pbdev->fmb.last_update *= 2; in fmb_update()
1130 pbdev->fmb.last_update, in fmb_update()
1131 sizeof(pbdev->fmb.last_update))) { in fmb_update()
1134 timer_mod(pbdev->fmb_timer, t + pbdev->pci_group->zpci_group.mui); in fmb_update()
1141 rc = s390_pci_kvm_aif_enable(pbdev, fib, pbdev->forwarding_assist); in mpcifc_reg_int_interp()
1166 CPUS390XState *env = &cpu->env; in mpcifc_service_call()
1173 if (env->psw.mask & PSW_MASK_PSTATE) { in mpcifc_service_call()
1178 oc = env->regs[r1] & 0xff; in mpcifc_service_call()
1179 dmaas = (env->regs[r1] >> 16) & 0xff; in mpcifc_service_call()
1180 fh = env->regs[r1] >> 32; in mpcifc_service_call()
1194 switch (pbdev->state) { in mpcifc_service_call()
1217 if (pbdev->interp) { in mpcifc_service_call()
1222 } else if (pbdev->summary_ind) { in mpcifc_service_call()
1231 if (pbdev->interp) { in mpcifc_service_call()
1236 } else if (!pbdev->summary_ind) { in mpcifc_service_call()
1247 } else if (pbdev->iommu->enabled) { in mpcifc_service_call()
1259 } else if (!pbdev->iommu->enabled) { in mpcifc_service_call()
1263 pci_dereg_ioat(pbdev->iommu); in mpcifc_service_call()
1270 } else if (!pbdev->iommu->enabled) { in mpcifc_service_call()
1274 pci_dereg_ioat(pbdev->iommu); in mpcifc_service_call()
1282 switch (pbdev->state) { in mpcifc_service_call()
1285 pbdev->state = ZPCI_FS_ENABLED; in mpcifc_service_call()
1293 switch (pbdev->state) { in mpcifc_service_call()
1295 pbdev->state = ZPCI_FS_BLOCKED; in mpcifc_service_call()
1307 s390_pci_generate_error_event(ERR_EVENT_FMBPRO, pbdev->fh, in mpcifc_service_call()
1308 pbdev->fid, fmb_addr, 0); in mpcifc_service_call()
1319 if (!pbdev->fmb_timer) { in mpcifc_service_call()
1320 pbdev->fmb_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, in mpcifc_service_call()
1322 } else if (timer_pending(pbdev->fmb_timer)) { in mpcifc_service_call()
1324 timer_del(pbdev->fmb_timer); in mpcifc_service_call()
1326 pbdev->fmb_addr = fmb_addr; in mpcifc_service_call()
1327 timer_mod(pbdev->fmb_timer, in mpcifc_service_call()
1329 pbdev->pci_group->zpci_group.mui); in mpcifc_service_call()
1333 s390_program_interrupt(&cpu->env, PGM_OPERAND, ra); in mpcifc_service_call()
1344 CPUS390XState *env = &cpu->env; in stpcifc_service_call()
1352 if (env->psw.mask & PSW_MASK_PSTATE) { in stpcifc_service_call()
1357 fh = env->regs[r1] >> 32; in stpcifc_service_call()
1358 dmaas = (env->regs[r1] >> 16) & 0xff; in stpcifc_service_call()
1379 switch (pbdev->state) { in stpcifc_service_call()
1400 if (pbdev->iommu->enabled) { in stpcifc_service_call()
1404 env->regs[r1] |= 1ULL << 63; in stpcifc_service_call()
1413 stq_be_p(&fib.pba, pbdev->iommu->pba); in stpcifc_service_call()
1414 stq_be_p(&fib.pal, pbdev->iommu->pal); in stpcifc_service_call()
1415 stq_be_p(&fib.iota, pbdev->iommu->g_iota); in stpcifc_service_call()
1416 stq_be_p(&fib.aibv, pbdev->routes.adapter.ind_addr); in stpcifc_service_call()
1417 stq_be_p(&fib.aisb, pbdev->routes.adapter.summary_addr); in stpcifc_service_call()
1418 stq_be_p(&fib.fmb_addr, pbdev->fmb_addr); in stpcifc_service_call()
1420 data = ((uint32_t)pbdev->isc << 28) | ((uint32_t)pbdev->noi << 16) | in stpcifc_service_call()
1421 ((uint32_t)pbdev->routes.adapter.ind_offset << 8) | in stpcifc_service_call()
1422 ((uint32_t)pbdev->sum << 7) | pbdev->routes.adapter.summary_offset; in stpcifc_service_call()