Lines Matching refs:guest
117 rc = cxl_h_collect_vpd_adapter(adapter->guest->handle,
120 rc = cxl_h_collect_vpd(afu->guest->handle, 0,
158 return cxl_h_collect_int_info(ctx->afu->guest->handle, ctx->process_token, info);
186 rc = cxl_h_read_error_state(afu->guest->handle, &state);
203 rc = cxl_h_get_fn_error_interrupt(afu->guest->handle, &serr);
214 rc = cxl_h_ack_fn_error_interrupt(afu->guest->handle, serr);
228 for (i = 0; i < adapter->guest->irq_nranges; i++) {
229 cur = &adapter->guest->irq_avail[i];
235 pr_devel("guest: allocate IRQs %#x->%#x\n",
252 for (i = 0; i < adapter->guest->irq_nranges; i++) {
253 cur = &adapter->guest->irq_avail[i];
258 pr_devel("guest: release IRQs %#x->%#x\n",
281 rc = cxl_h_reset_adapter(adapter->guest->handle);
297 spin_lock(&adapter->guest->irq_alloc_lock);
300 spin_unlock(&adapter->guest->irq_alloc_lock);
306 spin_lock(&adapter->guest->irq_alloc_lock);
308 spin_unlock(&adapter->guest->irq_alloc_lock);
318 spin_lock(&adapter->guest->irq_alloc_lock);
334 spin_unlock(&adapter->guest->irq_alloc_lock);
340 spin_unlock(&adapter->guest->irq_alloc_lock);
349 spin_lock(&adapter->guest->irq_alloc_lock);
352 spin_unlock(&adapter->guest->irq_alloc_lock);
381 return cxl_h_control_faults(ctx->afu->guest->handle, ctx->process_token,
434 rc = cxl_h_get_config(afu->guest->handle, cr_idx, offset,
505 /* config record is not writable from guest */
511 /* config record is not writable from guest */
517 /* config record is not writable from guest */
581 idx = ctx->irqs.offset[r] + i - adapter->guest->irq_base_offset;
591 rc = cxl_h_attach_process(ctx->afu->guest->handle, elem,
643 if (cxl_h_detach_process(ctx->afu->guest->handle, ctx->process_token))
670 kfree(afu->guest);
690 rc = cxl_h_get_afu_err(afu->guest->handle,
808 return cxl_h_reset_afu(afu->guest->handle);
813 if (!(afu->p2n_mmio = ioremap(afu->guest->p2n_phys, afu->guest->p2n_size))) {
835 if (afu->guest->previous_state == cur_state)
842 afu->guest->previous_state = cur_state;
859 afu->guest->previous_state = 0;
863 afu->guest->previous_state = cur_state;
870 afu->guest->previous_state = cur_state;
933 if (!(afu->guest = kzalloc(sizeof(struct cxl_afu_guest), GFP_KERNEL))) {
995 * of the AFU using "afu" stored in the guest structure.
997 afu->guest->parent = afu;
998 afu->guest->handle_err = true;
999 INIT_DELAYED_WORK(&afu->guest->work_err, afu_handle_errstate);
1000 schedule_delayed_work(&afu->guest->work_err, msecs_to_jiffies(1000));
1019 kfree(afu->guest);
1031 afu->guest->handle_err = false;
1032 flush_delayed_work(&afu->guest->work_err);
1054 if (adapter->guest) {
1055 if (adapter->guest->irq_avail) {
1056 for (i = 0; i < adapter->guest->irq_nranges; i++) {
1057 cur = &adapter->guest->irq_avail[i];
1060 kfree(adapter->guest->irq_avail);
1062 kfree(adapter->guest->status);
1063 kfree(adapter->guest);
1074 if (strlen(adapter->guest->status) &&
1075 strcmp(adapter->guest->status, "okay")) {
1112 if (!(adapter->guest = kzalloc(sizeof(struct cxl_guest), GFP_KERNEL))) {
1118 adapter->guest->pdev = pdev;
1172 pdev = adapter->guest->pdev;