search for: vhost_vsock_set_cid

Displaying 20 results from an estimated 34 matches for "vhost_vsock_set_cid".

2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...his break the loopback in the guest. As a fix, we should use 'transport_g2h' when remote_cid <= VMADDR_CID_HOST or remote_cid is the id of 'transport_g2h'. To do that we also need to avoid that L2 guests can have the same CID of L1. For vhost_vsock I can call vsock_find_cid() in vhost_vsock_set_cid() @Jorgen: for vmci we need to do the same? or it is guaranteed, since it's already support nested VMs, that a L2 guests cannot have the same CID as the L1. I'll send a v2 with this fix, but I'll wait a bit for other comments. Thanks, Stefano
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...his break the loopback in the guest. As a fix, we should use 'transport_g2h' when remote_cid <= VMADDR_CID_HOST or remote_cid is the id of 'transport_g2h'. To do that we also need to avoid that L2 guests can have the same CID of L1. For vhost_vsock I can call vsock_find_cid() in vhost_vsock_set_cid() @Jorgen: for vmci we need to do the same? or it is guaranteed, since it's already support nested VMs, that a L2 guests cannot have the same CID as the L1. I'll send a v2 with this fix, but I'll wait a bit for other comments. Thanks, Stefano
2013 Jun 27
2
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...sock->list); > + mutex_unlock(&vhost_vsock_mutex); > + > + vhost_dev_stop(&vsock->dev); > + vhost_vsock_flush(vsock); > + vhost_dev_cleanup(&vsock->dev, false); > + kfree(vsock->dev.vqs); > + kfree(vsock); > + return 0; > +} > + > +static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) > +{ > + mutex_lock(&vhost_vsock_mutex); > + vsock->guest_cid = guest_cid; > + pr_debug("%s:guest_cid=%d\n", __func__, guest_cid); > + mutex_unlock(&vhost_vsock_mutex); > + > + return 0; > +} > + > +static...
2013 Jun 27
2
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...sock->list); > + mutex_unlock(&vhost_vsock_mutex); > + > + vhost_dev_stop(&vsock->dev); > + vhost_vsock_flush(vsock); > + vhost_dev_cleanup(&vsock->dev, false); > + kfree(vsock->dev.vqs); > + kfree(vsock); > + return 0; > +} > + > +static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) > +{ > + mutex_lock(&vhost_vsock_mutex); > + vsock->guest_cid = guest_cid; > + pr_debug("%s:guest_cid=%d\n", __func__, guest_cid); > + mutex_unlock(&vhost_vsock_mutex); > + > + return 0; > +} > + > +static...
2013 Jun 27
0
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...+ mutex_lock(&vhost_vsock_mutex); + list_del(&vsock->list); + mutex_unlock(&vhost_vsock_mutex); + + vhost_dev_stop(&vsock->dev); + vhost_vsock_flush(vsock); + vhost_dev_cleanup(&vsock->dev, false); + kfree(vsock->dev.vqs); + kfree(vsock); + return 0; +} + +static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) +{ + mutex_lock(&vhost_vsock_mutex); + vsock->guest_cid = guest_cid; + pr_debug("%s:guest_cid=%d\n", __func__, guest_cid); + mutex_unlock(&vhost_vsock_mutex); + + return 0; +} + +static long vhost_vsock_dev_ioctl(struct file *f, unsigne...
2019 Oct 30
0
[PATCH net-next 11/14] vsock: add multi-transports support
...the guest. > As a fix, we should use 'transport_g2h' when remote_cid <= > VMADDR_CID_HOST or remote_cid is the id of 'transport_g2h'. > > To do that we also need to avoid that L2 guests can have the same CID of L1. > For vhost_vsock I can call vsock_find_cid() in vhost_vsock_set_cid() > > @Jorgen: for vmci we need to do the same? or it is guaranteed, since it's > already support nested VMs, that a L2 guests cannot have the same CID as > the L1. As far as I can tell, we have the same issue with the current support for nested VMs in VMCI. If we have an L2 guest...
2015 Dec 09
0
[PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko
...+ mutex_lock(&vhost_vsock_mutex); + list_del(&vsock->list); + mutex_unlock(&vhost_vsock_mutex); + + vhost_dev_stop(&vsock->dev); + vhost_vsock_flush(vsock); + vhost_dev_cleanup(&vsock->dev, false); + kfree(vsock->dev.vqs); + kfree(vsock); + return 0; +} + +static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) +{ + struct vhost_vsock *other; + + /* Refuse reserved CIDs */ + if (guest_cid <= VMADDR_CID_HOST) { + return -EINVAL; + } + + /* Refuse if CID is already in use */ + other = vhost_vsock_get(guest_cid); + if (other && other != vsock) { + return...
2015 Dec 11
1
[PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko
...sock->list); > + mutex_unlock(&vhost_vsock_mutex); > + > + vhost_dev_stop(&vsock->dev); > + vhost_vsock_flush(vsock); > + vhost_dev_cleanup(&vsock->dev, false); > + kfree(vsock->dev.vqs); > + kfree(vsock); > + return 0; > +} > + > +static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) > +{ > + struct vhost_vsock *other; > + > + /* Refuse reserved CIDs */ > + if (guest_cid <= VMADDR_CID_HOST) { > + return -EINVAL; > + } > + > + /* Refuse if CID is already in use */ > + other = vhost_vsock_get(guest_cid);...
2015 Dec 11
1
[PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko
...sock->list); > + mutex_unlock(&vhost_vsock_mutex); > + > + vhost_dev_stop(&vsock->dev); > + vhost_vsock_flush(vsock); > + vhost_dev_cleanup(&vsock->dev, false); > + kfree(vsock->dev.vqs); > + kfree(vsock); > + return 0; > +} > + > +static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) > +{ > + struct vhost_vsock *other; > + > + /* Refuse reserved CIDs */ > + if (guest_cid <= VMADDR_CID_HOST) { > + return -EINVAL; > + } > + > + /* Refuse if CID is already in use */ > + other = vhost_vsock_get(guest_cid);...
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not yet finalized. Please review this code but don't merge until I send an update when the spec is finalized. Thanks! v3: * Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead of REQUEST/RESPONSE/ACK * Remove SOCK_DGRAM support and focus on SOCK_STREAM first (also drop v2 Patch 1, it's
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not yet finalized. Please review this code but don't merge until I send an update when the spec is finalized. Thanks! v3: * Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead of REQUEST/RESPONSE/ACK * Remove SOCK_DGRAM support and focus on SOCK_STREAM first (also drop v2 Patch 1, it's
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
Hello guys, In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM Sockets support. VM Sockets allows communication between virtual machines and the hypervisor. VM Sockets is able to use different hyervisor neutral transport to transfer data. Currently, only VMware VMCI transport is supported. This series introduces virtio transport for VM Sockets. Any comments are
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
Hello guys, In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM Sockets support. VM Sockets allows communication between virtual machines and the hypervisor. VM Sockets is able to use different hyervisor neutral transport to transfer data. Currently, only VMware VMCI transport is supported. This series introduces virtio transport for VM Sockets. Any comments are
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...- mutex_lock(&vhost_vsock_mutex); - list_del(&vsock->list); - mutex_unlock(&vhost_vsock_mutex); - - vhost_dev_stop(&vsock->dev); - vhost_vsock_flush(vsock); - vhost_dev_cleanup(&vsock->dev, false); - kfree(vsock->dev.vqs); - kfree(vsock); - return 0; -} - -static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) -{ - struct vhost_vsock *other; - - /* Refuse reserved CIDs */ - if (guest_cid <= VMADDR_CID_HOST) { - return -EINVAL; - } - - /* Refuse if CID is already in use */ - other = vhost_vsock_get(guest_cid); - if (other && other != vsock) { - return...
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...- mutex_lock(&vhost_vsock_mutex); - list_del(&vsock->list); - mutex_unlock(&vhost_vsock_mutex); - - vhost_dev_stop(&vsock->dev); - vhost_vsock_flush(vsock); - vhost_dev_cleanup(&vsock->dev, false); - kfree(vsock->dev.vqs); - kfree(vsock); - return 0; -} - -static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid) -{ - struct vhost_vsock *other; - - /* Refuse reserved CIDs */ - if (guest_cid <= VMADDR_CID_HOST) { - return -EINVAL; - } - - /* Refuse if CID is already in use */ - other = vhost_vsock_get(guest_cid); - if (other && other != vsock) { - return...
2015 Dec 08
8
[PATCH 0/6] VSOCK: revert virtio-vsock until device spec is finalized
The virtio-vsock device specification is not finalized yet. Michael Tsirkin voiced concerned about merging this code when the hardware interface (and possibly the userspace interface) could still change. Please revert for now. I am working to finalize the virtio-vsock device specification and at that point the interfaces will be stable. Stefan Hajnoczi (6): Revert "VSOCK: fix
2015 Dec 08
8
[PATCH 0/6] VSOCK: revert virtio-vsock until device spec is finalized
The virtio-vsock device specification is not finalized yet. Michael Tsirkin voiced concerned about merging this code when the hardware interface (and possibly the userspace interface) could still change. Please revert for now. I am working to finalize the virtio-vsock device specification and at that point the interfaces will be stable. Stefan Hajnoczi (6): Revert "VSOCK: fix
2015 May 27
6
[RFC 0/6] Add virtio transport for AF_VSOCK
This patch series adds a virtio transport for AF_VSOCK (net/vmw_vsock/). AF_VSOCK is designed for communication between virtual machines and hypervisors. It is currently only implemented for VMware's VMCI transport. This series implements the proposed virtio-vsock device specification from here: http://comments.gmane.org/gmane.comp.emulators.virtio.devel/855 Most of the work was done by