Displaying 8 results from an estimated 8 matches for "vmci_host_users".
2019 Oct 23
0
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
...rr = 0;
+
+ mutex_lock(&vmci_vsock_mutex);
+
+ if (vmci_vsock_transport_cb && callback) {
+ err = -EBUSY;
+ goto out;
+ }
+
+ vmci_vsock_transport_cb = callback;
+
+ if (!vmci_vsock_transport_cb)
+ goto out;
+
+ if (vmci_guest_code_active())
+ vmci_vsock_transport_cb(false);
+
+ if (vmci_host_users() > 0)
+ vmci_vsock_transport_cb(true);
+
+out:
+ mutex_unlock(&vmci_vsock_mutex);
+ return err;
+}
+EXPORT_SYMBOL_GPL(vmci_register_vsock_callback);
+
+void vmci_call_vsock_callback(bool is_host)
+{
+ mutex_lock(&vmci_vsock_mutex);
+
+ if (vmci_vsock_transport_cb)
+ vmci_vsock_transpo...
2019 Nov 11
2
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
...registers a h2g transport only does so if it is in active use?
> --- a/drivers/misc/vmw_vmci/vmci_host.c
> +++ b/drivers/misc/vmw_vmci/vmci_host.c
> @@ -108,6 +108,11 @@ bool vmci_host_code_active(void)
> atomic_read(&vmci_host_active_users) > 0);
> }
>
> +int vmci_host_users(void)
> +{
> + return atomic_read(&vmci_host_active_users);
> +}
> +
> /*
> * Called on open of /dev/vmci.
> */
> @@ -338,6 +343,8 @@ static int vmci_host_do_init_context(struct
> vmci_host_dev *vmci_host_dev,
> vmci_host_dev->ct_type = VMCIOBJ_CONTEXT;
&...
2019 Nov 11
2
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
...registers a h2g transport only does so if it is in active use?
> --- a/drivers/misc/vmw_vmci/vmci_host.c
> +++ b/drivers/misc/vmw_vmci/vmci_host.c
> @@ -108,6 +108,11 @@ bool vmci_host_code_active(void)
> atomic_read(&vmci_host_active_users) > 0);
> }
>
> +int vmci_host_users(void)
> +{
> + return atomic_read(&vmci_host_active_users);
> +}
> +
> /*
> * Called on open of /dev/vmci.
> */
> @@ -338,6 +343,8 @@ static int vmci_host_do_init_context(struct
> vmci_host_dev *vmci_host_dev,
> vmci_host_dev->ct_type = VMCIOBJ_CONTEXT;
&...
2019 Nov 12
1
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
...> > --- a/drivers/misc/vmw_vmci/vmci_host.c
> > > +++ b/drivers/misc/vmw_vmci/vmci_host.c
> > > @@ -108,6 +108,11 @@ bool vmci_host_code_active(void)
> > > atomic_read(&vmci_host_active_users) > 0);
> > > }
> > >
> > > +int vmci_host_users(void)
> > > +{
> > > + return atomic_read(&vmci_host_active_users);
> > > +}
> > > +
> > > /*
> > > * Called on open of /dev/vmci.
> > > */
> > > @@ -338,6 +343,8 @@ static int vmci_host_do_init_context(struct
> >...
2019 Nov 11
0
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
...least one active user.
>
> > --- a/drivers/misc/vmw_vmci/vmci_host.c
> > +++ b/drivers/misc/vmw_vmci/vmci_host.c
> > @@ -108,6 +108,11 @@ bool vmci_host_code_active(void)
> > atomic_read(&vmci_host_active_users) > 0);
> > }
> >
> > +int vmci_host_users(void)
> > +{
> > + return atomic_read(&vmci_host_active_users);
> > +}
> > +
> > /*
> > * Called on open of /dev/vmci.
> > */
> > @@ -338,6 +343,8 @@ static int vmci_host_do_init_context(struct
> > vmci_host_dev *vmci_host_dev,
> >...
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: