diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-11-14 10:57:47 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-14 18:12:18 -0800 |
commit | b1bba80a4376aef34de2b57bfb8834bd095703ed (patch) | |
tree | b22280bc8b8e0f8789bfeb7f4013e0c670be2ca4 /drivers/misc/vmw_vmci/vmci_guest.c | |
parent | vsock: add multi-transports support (diff) | |
download | linux-dev-b1bba80a4376aef34de2b57bfb8834bd095703ed.tar.xz linux-dev-b1bba80a4376aef34de2b57bfb8834bd095703ed.zip |
vsock/vmci: register vmci_transport only when VMCI guest/host are active
To allow other transports to be loaded with vmci_transport,
we register the vmci_transport as G2H or H2G only when a VMCI guest
or host is active.
To do that, this patch adds a callback registered in the vmci driver
that will be called when the host or guest becomes active.
This callback will register the vmci_transport in the VSOCK core.
Cc: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/misc/vmw_vmci/vmci_guest.c')
-rw-r--r-- | drivers/misc/vmw_vmci/vmci_guest.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c index 7a84a48c75da..cc8eeb361fcd 100644 --- a/drivers/misc/vmw_vmci/vmci_guest.c +++ b/drivers/misc/vmw_vmci/vmci_guest.c @@ -637,6 +637,8 @@ static int vmci_guest_probe_device(struct pci_dev *pdev, vmci_dev->iobase + VMCI_CONTROL_ADDR); pci_set_drvdata(pdev, vmci_dev); + + vmci_call_vsock_callback(false); return 0; err_free_irq: |