Lines Matching refs:guest_cid
59 u32 guest_cid; member
71 static struct vhost_vsock *vhost_vsock_get(u32 guest_cid) in vhost_vsock_get() argument
75 hash_for_each_possible_rcu(vhost_vsock_hash, vsock, hash, guest_cid) { in vhost_vsock_get()
76 u32 other_cid = vsock->guest_cid; in vhost_vsock_get()
82 if (other_cid == guest_cid) in vhost_vsock_get()
547 if (le64_to_cpu(pkt->hdr.src_cid) == vsock->guest_cid && in vhost_vsock_handle_tx_kick()
682 vsock->guest_cid = 0; /* no CID assigned yet */ in vhost_vsock_dev_open()
742 if (vsock->guest_cid) in vhost_vsock_dev_release()
780 static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) in vhost_vsock_set_cid() argument
785 if (guest_cid <= VMADDR_CID_HOST || in vhost_vsock_set_cid()
786 guest_cid == U32_MAX) in vhost_vsock_set_cid()
790 if (guest_cid > U32_MAX) in vhost_vsock_set_cid()
796 if (vsock_find_cid(guest_cid)) in vhost_vsock_set_cid()
801 other = vhost_vsock_get(guest_cid); in vhost_vsock_set_cid()
807 if (vsock->guest_cid) in vhost_vsock_set_cid()
810 vsock->guest_cid = guest_cid; in vhost_vsock_set_cid()
811 hash_add_rcu(vhost_vsock_hash, &vsock->hash, vsock->guest_cid); in vhost_vsock_set_cid()
858 u64 guest_cid; in vhost_vsock_dev_ioctl() local
865 if (copy_from_user(&guest_cid, argp, sizeof(guest_cid))) in vhost_vsock_dev_ioctl()
867 return vhost_vsock_set_cid(vsock, guest_cid); in vhost_vsock_dev_ioctl()