Lines Matching refs:gdev
95 int vbg_req_perform(struct vbg_dev *gdev, void *req) in vbg_req_perform() argument
99 outl(phys_req, gdev->io_port + VMMDEV_PORT_OFF_REQUEST); in vbg_req_perform()
109 static bool hgcm_req_done(struct vbg_dev *gdev, in hgcm_req_done() argument
115 spin_lock_irqsave(&gdev->event_spinlock, flags); in hgcm_req_done()
117 spin_unlock_irqrestore(&gdev->event_spinlock, flags); in hgcm_req_done()
122 int vbg_hgcm_connect(struct vbg_dev *gdev, in vbg_hgcm_connect() argument
138 rc = vbg_req_perform(gdev, hgcm_connect); in vbg_hgcm_connect()
141 wait_event(gdev->hgcm_wq, in vbg_hgcm_connect()
142 hgcm_req_done(gdev, &hgcm_connect->header)); in vbg_hgcm_connect()
156 int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status) in vbg_hgcm_disconnect() argument
169 rc = vbg_req_perform(gdev, hgcm_disconnect); in vbg_hgcm_disconnect()
172 wait_event(gdev->hgcm_wq, in vbg_hgcm_disconnect()
173 hgcm_req_done(gdev, &hgcm_disconnect->header)); in vbg_hgcm_disconnect()
426 static int hgcm_cancel_call(struct vbg_dev *gdev, struct vmmdev_hgcm_call *call) in hgcm_cancel_call() argument
435 mutex_lock(&gdev->cancel_req_mutex); in hgcm_cancel_call()
436 gdev->cancel_req->phys_req_to_cancel = virt_to_phys(call); in hgcm_cancel_call()
437 rc = vbg_req_perform(gdev, gdev->cancel_req); in hgcm_cancel_call()
438 mutex_unlock(&gdev->cancel_req_mutex); in hgcm_cancel_call()
444 rc = vbg_req_perform(gdev, call); in hgcm_cancel_call()
464 static int vbg_hgcm_do_call(struct vbg_dev *gdev, struct vmmdev_hgcm_call *call, in vbg_hgcm_do_call() argument
472 rc = vbg_req_perform(gdev, call); in vbg_hgcm_do_call()
493 gdev->hgcm_wq, in vbg_hgcm_do_call()
494 hgcm_req_done(gdev, &call->header), in vbg_hgcm_do_call()
507 cancel_rc = hgcm_cancel_call(gdev, call); in vbg_hgcm_do_call()
520 timeout = wait_event_timeout(gdev->hgcm_wq, in vbg_hgcm_do_call()
521 hgcm_req_done(gdev, &call->header), in vbg_hgcm_do_call()
596 int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function, in vbg_hgcm_call() argument
627 ret = vbg_hgcm_do_call(gdev, call, timeout_ms, &leak_it); in vbg_hgcm_call()
650 struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms, in vbg_hgcm_call32() argument
692 ret = vbg_hgcm_call(gdev, client_id, function, timeout_ms, in vbg_hgcm_call32()