Lines Matching defs:guest_cid
58 u32 guest_cid;
70 static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)
74 hash_for_each_possible_rcu(vhost_vsock_hash, vsock, hash, guest_cid) {
75 u32 other_cid = vsock->guest_cid;
81 if (other_cid == guest_cid)
523 if (le64_to_cpu(hdr->src_cid) == vsock->guest_cid &&
658 vsock->guest_cid = 0; /* no CID assigned yet */
717 if (vsock->guest_cid)
746 static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid)
751 if (guest_cid <= VMADDR_CID_HOST ||
752 guest_cid == U32_MAX)
756 if (guest_cid > U32_MAX)
762 if (vsock_find_cid(guest_cid))
767 other = vhost_vsock_get(guest_cid);
773 if (vsock->guest_cid)
776 vsock->guest_cid = guest_cid;
777 hash_add_rcu(vhost_vsock_hash, &vsock->hash, vsock->guest_cid);
824 u64 guest_cid;
831 if (copy_from_user(&guest_cid, argp, sizeof(guest_cid)))
833 return vhost_vsock_set_cid(vsock, guest_cid);