Lines Matching defs:guest_cid
53 u32 guest_cid;
64 static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)
68 hash_for_each_possible_rcu(vhost_vsock_hash, vsock, hash, guest_cid) {
69 u32 other_cid = vsock->guest_cid;
75 if (other_cid == guest_cid)
489 if (le64_to_cpu(pkt->hdr.src_cid) == vsock->guest_cid &&
626 vsock->guest_cid = 0; /* no CID assigned yet */
691 if (vsock->guest_cid)
729 static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid)
734 if (guest_cid <= VMADDR_CID_HOST ||
735 guest_cid == U32_MAX)
739 if (guest_cid > U32_MAX)
745 if (vsock_find_cid(guest_cid))
750 other = vhost_vsock_get(guest_cid);
756 if (vsock->guest_cid)
759 vsock->guest_cid = guest_cid;
760 hash_add_rcu(vhost_vsock_hash, &vsock->hash, vsock->guest_cid);
796 u64 guest_cid;
803 if (copy_from_user(&guest_cid, argp, sizeof(guest_cid)))
805 return vhost_vsock_set_cid(vsock, guest_cid);