Lines Matching defs:call
3 * vboxguest vmm-req and hgcm-call code, VBoxGuestR0LibHGCMInternal.cpp,
22 /* Get the pointer to the first parameter of a HGCM call request. */
240 * Preprocesses the HGCM call, validate parameters, alloc bounce buffers and
243 * @src_parm: Pointer to source function call parameters
244 * @parm_count: Number of function call parameters.
330 static void hgcm_call_init_linaddr(struct vmmdev_hgcm_call *call,
347 dst_pg_lst = (void *)call + *off_extra;
372 * Initializes the call request that we're sending to the host.
373 * @call: The call to initialize.
375 * @function: The function number of the function to call.
376 * @src_parm: Pointer to source function call parameters.
377 * @parm_count: Number of function call parameters.
381 struct vmmdev_hgcm_call *call, u32 client_id, u32 function,
386 VMMDEV_HGCM_CALL_PARMS(call);
387 u32 i, off_extra = (uintptr_t)(dst_parm + parm_count) - (uintptr_t)call;
390 call->header.flags = 0;
391 call->header.result = VINF_SUCCESS;
392 call->client_id = client_id;
393 call->function = function;
394 call->parm_count = parm_count;
406 hgcm_call_init_linaddr(call, dst_parm, bounce_bufs[i],
415 hgcm_call_init_linaddr(call, dst_parm, buf,
428 * Tries to cancel a pending HGCM call.
432 static int hgcm_cancel_call(struct vbg_dev *gdev, struct vmmdev_hgcm_call *call)
442 gdev->cancel_req->phys_req_to_cancel = virt_to_phys(call);
447 call->header.flags |= VMMDEV_HGCM_REQ_CANCELLED;
448 call->header.header.request_type = VMMDEVREQ_HGCM_CANCEL;
450 rc = vbg_req_perform(gdev, call);
456 call->header.flags |= VMMDEV_HGCM_REQ_CANCELLED;
462 * Performs the call and completion wait.
465 * @call: The call to execute.
470 static int vbg_hgcm_do_call(struct vbg_dev *gdev, struct vmmdev_hgcm_call *call,
478 rc = vbg_req_perform(gdev, call);
481 * If the call failed, then pretend success. Upper layers will
485 call->header.result = rc;
500 hgcm_req_done(gdev, &call->header),
504 hgcm_req_done(gdev, &call->header),
518 cancel_rc = hgcm_cancel_call(gdev, call);
532 hgcm_req_done(gdev, &call->header),
543 /* The call has completed normally after all */
548 * Copies the result of the call back to the caller info structure and user
551 * @call: HGCM call request.
552 * @dst_parm: Pointer to function call parameters destination.
553 * @parm_count: Number of function call parameters.
557 const struct vmmdev_hgcm_call *call,
562 VMMDEV_HGCM_CALL_PARMS(call);
612 struct vmmdev_hgcm_call *call;
621 * Validate and buffer the parameters for the call. This also increases
630 call = vbg_req_alloc(size, VMMDEVREQ_HGCM_CALL, requestor);
631 if (!call) {
636 hgcm_call_init_call(call, client_id, function, parms, parm_count,
639 ret = vbg_hgcm_do_call(gdev, call, timeout_ms,
642 *vbox_status = call->header.result;
643 ret = hgcm_call_copy_back_result(call, parms, parm_count,
648 vbg_req_free(call, size);