Lines Matching refs:guest

111 		rc = cxl_h_collect_vpd_adapter(adapter->guest->handle,
114 rc = cxl_h_collect_vpd(afu->guest->handle, 0,
152 return cxl_h_collect_int_info(ctx->afu->guest->handle, ctx->process_token, info);
180 rc = cxl_h_read_error_state(afu->guest->handle, &state);
197 rc = cxl_h_get_fn_error_interrupt(afu->guest->handle, &serr);
208 rc = cxl_h_ack_fn_error_interrupt(afu->guest->handle, serr);
222 for (i = 0; i < adapter->guest->irq_nranges; i++) {
223 cur = &adapter->guest->irq_avail[i];
229 pr_devel("guest: allocate IRQs %#x->%#x\n",
246 for (i = 0; i < adapter->guest->irq_nranges; i++) {
247 cur = &adapter->guest->irq_avail[i];
252 pr_devel("guest: release IRQs %#x->%#x\n",
275 rc = cxl_h_reset_adapter(adapter->guest->handle);
291 spin_lock(&adapter->guest->irq_alloc_lock);
294 spin_unlock(&adapter->guest->irq_alloc_lock);
300 spin_lock(&adapter->guest->irq_alloc_lock);
302 spin_unlock(&adapter->guest->irq_alloc_lock);
312 spin_lock(&adapter->guest->irq_alloc_lock);
328 spin_unlock(&adapter->guest->irq_alloc_lock);
334 spin_unlock(&adapter->guest->irq_alloc_lock);
343 spin_lock(&adapter->guest->irq_alloc_lock);
346 spin_unlock(&adapter->guest->irq_alloc_lock);
375 return cxl_h_control_faults(ctx->afu->guest->handle, ctx->process_token,
428 rc = cxl_h_get_config(afu->guest->handle, cr_idx, offset,
499 /* config record is not writable from guest */
505 /* config record is not writable from guest */
511 /* config record is not writable from guest */
575 idx = ctx->irqs.offset[r] + i - adapter->guest->irq_base_offset;
585 rc = cxl_h_attach_process(ctx->afu->guest->handle, elem,
637 if (cxl_h_detach_process(ctx->afu->guest->handle, ctx->process_token))
664 kfree(afu->guest);
684 rc = cxl_h_get_afu_err(afu->guest->handle,
802 return cxl_h_reset_afu(afu->guest->handle);
807 if (!(afu->p2n_mmio = ioremap(afu->guest->p2n_phys, afu->guest->p2n_size))) {
829 if (afu->guest->previous_state == cur_state)
836 afu->guest->previous_state = cur_state;
853 afu->guest->previous_state = 0;
857 afu->guest->previous_state = cur_state;
864 afu->guest->previous_state = cur_state;
927 if (!(afu->guest = kzalloc(sizeof(struct cxl_afu_guest), GFP_KERNEL))) {
989 * of the AFU using "afu" stored in the guest structure.
991 afu->guest->parent = afu;
992 afu->guest->handle_err = true;
993 INIT_DELAYED_WORK(&afu->guest->work_err, afu_handle_errstate);
994 schedule_delayed_work(&afu->guest->work_err, msecs_to_jiffies(1000));
1013 kfree(afu->guest);
1025 afu->guest->handle_err = false;
1026 flush_delayed_work(&afu->guest->work_err);
1048 if (adapter->guest) {
1049 if (adapter->guest->irq_avail) {
1050 for (i = 0; i < adapter->guest->irq_nranges; i++) {
1051 cur = &adapter->guest->irq_avail[i];
1054 kfree(adapter->guest->irq_avail);
1056 kfree(adapter->guest->status);
1057 kfree(adapter->guest);
1068 if (strlen(adapter->guest->status) &&
1069 strcmp(adapter->guest->status, "okay")) {
1106 if (!(adapter->guest = kzalloc(sizeof(struct cxl_guest), GFP_KERNEL))) {
1112 adapter->guest->pdev = pdev;
1166 pdev = adapter->guest->pdev;