Displaying 20 results from an estimated 21 matches for "vsock_transport_f_h2g".
Did you mean:
vsock_transport_f_g2h
2019 Sep 27
0
[RFC PATCH 11/13] vsock: add 'transport_hg' to handle g2h\h2g transports
...nsport_g2h;
t_dgram = transport_dgram;
@@ -2107,7 +2115,14 @@ int vsock_core_register(const struct vsock_transport *t)
* same transport. We are able to set the G2H feature only if we are
* in a VMware guest, but we are not able to do the same for the host.
*/
- if (t->features & VSOCK_TRANSPORT_F_H2G) {
+ if ((t->features & VSOCK_TRANSPORT_F_H2G) &&
+ (t->features & VSOCK_TRANSPORT_F_G2H)) {
+ if (t_hg) {
+ err = -EBUSY;
+ goto err_busy;
+ }
+ t_hg = t;
+ } else if (t->features & VSOCK_TRANSPORT_F_H2G) {
if (t_h2g) {
err = -EBUSY;
goto err_busy...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...gister_mutex);
>
> if (err)
> @@ -2139,6 +2141,7 @@ int vsock_core_register(const struct
> vsock_transport *t, int features)
> t_h2g = transport_h2g;
> t_g2h = transport_g2h;
> t_dgram = transport_dgram;
> + t_local = transport_local;
>
> if (features & VSOCK_TRANSPORT_F_H2G) {
> if (t_h2g) {
> @@ -2164,9 +2167,18 @@ int vsock_core_register(const struct
> vsock_transport *t, int features)
> t_dgram = t;
> }
>
> + if (features & VSOCK_TRANSPORT_F_LOCAL) {
> + if (t_local) {
> + err = -EBUSY;
> + goto err_busy;
> + }
&g...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...gister_mutex);
>
> if (err)
> @@ -2139,6 +2141,7 @@ int vsock_core_register(const struct
> vsock_transport *t, int features)
> t_h2g = transport_h2g;
> t_g2h = transport_g2h;
> t_dgram = transport_dgram;
> + t_local = transport_local;
>
> if (features & VSOCK_TRANSPORT_F_H2G) {
> if (t_h2g) {
> @@ -2164,9 +2167,18 @@ int vsock_core_register(const struct
> vsock_transport *t, int features)
> t_dgram = t;
> }
>
> + if (features & VSOCK_TRANSPORT_F_LOCAL) {
> + if (t_local) {
> + err = -EBUSY;
> + goto err_busy;
> + }
&g...
2019 Sep 27
0
[RFC PATCH 12/13] vsock: prevent transport modules unloading
...ivers/vhost/vsock.c
index 375af01a5b64..6d7a8fc9eb63 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -387,6 +387,7 @@ static bool vhost_vsock_more_replies(struct vhost_vsock *vsock)
static struct virtio_transport vhost_transport = {
.transport = {
.features = VSOCK_TRANSPORT_F_H2G,
+ .module = THIS_MODULE,
.get_local_cid = vhost_transport_get_local_cid,
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
index 2a081d19e20d..f10fa918bf23 100644
--- a/include/net/af_vsock.h
+++ b/include/net/af_vsock.h
@@ -100,6 +100,7 @@ struct vs...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...sock_core_register(const struct
> > > vsock_transport *t, int features)
> > > t_h2g = transport_h2g;
> > > t_g2h = transport_g2h;
> > > t_dgram = transport_dgram;
> > > + t_local = transport_local;
> > >
> > > if (features & VSOCK_TRANSPORT_F_H2G) {
> > > if (t_h2g) {
> > > @@ -2164,9 +2167,18 @@ int vsock_core_register(const struct
> > > vsock_transport *t, int features)
> > > t_dgram = t;
> > > }
> > >
> > > + if (features & VSOCK_TRANSPORT_F_LOCAL) {
> > >...
2019 Nov 21
2
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...sock_core_register(const struct
> > > vsock_transport *t, int features)
> > > t_h2g = transport_h2g;
> > > t_g2h = transport_g2h;
> > > t_dgram = transport_dgram;
> > > + t_local = transport_local;
> > >
> > > if (features & VSOCK_TRANSPORT_F_H2G) {
> > > if (t_h2g) {
> > > @@ -2164,9 +2167,18 @@ int vsock_core_register(const struct
> > > vsock_transport *t, int features)
> > > t_dgram = t;
> > > }
> > >
> > > + if (features & VSOCK_TRANSPORT_F_LOCAL) {
> > >...
2019 Oct 09
1
[RFC PATCH 10/13] vsock: add multi-transports support
...include/net/af_vsock.h b/include/net/af_vsock.h
> index 86f8f463e01a..2a081d19e20d 100644
> --- a/include/net/af_vsock.h
> +++ b/include/net/af_vsock.h
> @@ -94,7 +94,13 @@ struct vsock_transport_send_notify_data {
> u64 data2; /* Transport-defined. */
> };
>
> +#define VSOCK_TRANSPORT_F_H2G 0x00000001
> +#define VSOCK_TRANSPORT_F_G2H 0x00000002
> +#define VSOCK_TRANSPORT_F_DGRAM 0x00000004
Documentation comments, please.
> +void vsock_core_unregister(const struct vsock_transport *t)
> +{
> + mutex_lock(&vsock_register_mutex);
> +
> + /* RFC-TODO: maybe we...
2019 Oct 23
0
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
.../vmw_vsock/vmci_transport.c
@@ -2053,19 +2053,22 @@ static bool vmci_check_transport(struct vsock_sock *vsk)
return vsk->transport == &vmci_transport;
}
-static int __init vmci_transport_init(void)
+void vmci_vsock_transport_cb(bool is_host)
{
- int features = VSOCK_TRANSPORT_F_DGRAM | VSOCK_TRANSPORT_F_H2G;
- int cid;
- int err;
+ int features;
- cid = vmci_get_context_id();
+ if (is_host)
+ features = VSOCK_TRANSPORT_F_H2G;
+ else
+ features = VSOCK_TRANSPORT_F_G2H;
- if (cid == VMCI_INVALID_ID)
- return -EINVAL;
+ vsock_core_register(&vmci_transport, features);
+}
- if (cid != VMCI_HOS...
2019 Oct 23
0
[PATCH net-next 11/14] vsock: add multi-transports support
....c
index 6d7e4f022748..b235f4bbe8ea 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -831,7 +831,8 @@ static int __init vhost_vsock_init(void)
{
int ret;
- ret = vsock_core_init(&vhost_transport.transport);
+ ret = vsock_core_register(&vhost_transport.transport,
+ VSOCK_TRANSPORT_F_H2G);
if (ret < 0)
return ret;
return misc_register(&vhost_vsock_misc);
@@ -840,7 +841,7 @@ static int __init vhost_vsock_init(void)
static void __exit vhost_vsock_exit(void)
{
misc_deregister(&vhost_vsock_misc);
- vsock_core_exit();
+ vsock_core_unregister(&vhost_transport.tr...
2019 Sep 27
0
[RFC PATCH 10/13] vsock: add multi-transports support
...ers/vhost/vsock.c
index 6d7e4f022748..375af01a5b64 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -386,6 +386,8 @@ static bool vhost_vsock_more_replies(struct vhost_vsock *vsock)
static struct virtio_transport vhost_transport = {
.transport = {
+ .features = VSOCK_TRANSPORT_F_H2G,
+
.get_local_cid = vhost_transport_get_local_cid,
.init = virtio_transport_do_socket_init,
@@ -831,7 +833,7 @@ static int __init vhost_vsock_init(void)
{
int ret;
- ret = vsock_core_init(&vhost_transport.transport);
+ ret = vsock_core_register(&v...
2023 Aug 04
0
[PATCH RFC net-next v5 03/14] af_vsock: support multi-transport datagrams
...;> > > > > @@ -96,13 +96,13 @@ struct vsock_transport_send_notify_data {
>> > > > >
>> > > > > /* Transport features flags */
>> > > > > /* Transport provides host->guest communication */
>> > > > > -#define VSOCK_TRANSPORT_F_H2G 0x00000001
>> > > > > +#define VSOCK_TRANSPORT_F_H2G 0x00000001
>> > > > > /* Transport provides guest->host communication */
>> > > > > -#define VSOCK_TRANSPORT_F_G2H 0x00000002
>> > > > > -/* Transport provides DGRAM...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...rivers/vhost/vsock.c
> @@ -831,7 +831,8 @@ static int __init vhost_vsock_init(void)
> {
> int ret;
>
> - ret = vsock_core_init(&vhost_transport.transport);
> + ret = vsock_core_register(&vhost_transport.transport,
> + VSOCK_TRANSPORT_F_H2G);
> if (ret < 0)
> return ret;
> return misc_register(&vhost_vsock_misc);
> @@ -840,7 +841,7 @@ static int __init vhost_vsock_init(void)
> static void __exit vhost_vsock_exit(void)
> {
> misc_deregister(&vhost_vsock_misc);
&g...
2019 Oct 23
2
[PATCH net-next 11/14] vsock: add multi-transports support
...rivers/vhost/vsock.c
> @@ -831,7 +831,8 @@ static int __init vhost_vsock_init(void)
> {
> int ret;
>
> - ret = vsock_core_init(&vhost_transport.transport);
> + ret = vsock_core_register(&vhost_transport.transport,
> + VSOCK_TRANSPORT_F_H2G);
> if (ret < 0)
> return ret;
> return misc_register(&vhost_vsock_misc);
> @@ -840,7 +841,7 @@ static int __init vhost_vsock_init(void)
> static void __exit vhost_vsock_exit(void)
> {
> misc_deregister(&vhost_vsock_misc);
&g...
2019 Nov 21
0
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...; > @@ -2139,6 +2141,7 @@ int vsock_core_register(const struct
> > vsock_transport *t, int features)
> > t_h2g = transport_h2g;
> > t_g2h = transport_g2h;
> > t_dgram = transport_dgram;
> > + t_local = transport_local;
> >
> > if (features & VSOCK_TRANSPORT_F_H2G) {
> > if (t_h2g) {
> > @@ -2164,9 +2167,18 @@ int vsock_core_register(const struct
> > vsock_transport *t, int features)
> > t_dgram = t;
> > }
> >
> > + if (features & VSOCK_TRANSPORT_F_LOCAL) {
> > + if (t_local) {
> > + err =...
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all,
this series adds the multi-transports support to vsock, following
this proposal:
https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use vsock with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all,
this series adds the multi-transports support to vsock, following
this proposal:
https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use vsock with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using
2019 Nov 21
0
[PATCH net-next 3/6] vsock: add local transport support in the vsock core
...; > > > vsock_transport *t, int features)
> > > > t_h2g = transport_h2g;
> > > > t_g2h = transport_g2h;
> > > > t_dgram = transport_dgram;
> > > > + t_local = transport_local;
> > > >
> > > > if (features & VSOCK_TRANSPORT_F_H2G) {
> > > > if (t_h2g) {
> > > > @@ -2164,9 +2167,18 @@ int vsock_core_register(const struct
> > > > vsock_transport *t, int features)
> > > > t_dgram = t;
> > > > }
> > > >
> > > > + if (features & VSOCK...
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
This series adds the multi-transports support to vsock, following
this proposal: https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use VSOCK with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using VMware
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
This series adds the multi-transports support to vsock, following
this proposal: https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use VSOCK with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using VMware
2019 Nov 14
15
[PATCH net-next v2 00/15] vsock: add multi-transports support
Most of the patches are reviewed by Dexuan, Stefan, and Jorgen.
The following patches need reviews:
- [11/15] vsock: add multi-transports support
- [12/15] vsock/vmci: register vmci_transport only when VMCI guest/host
are active
- [15/15] vhost/vsock: refuse CID assigned to the guest->host transport
RFC: https://patchwork.ozlabs.org/cover/1168442/
v1: