Commit Graph

6 Commits

Author SHA1 Message Date
Tao Zhang
61655f4d3c net: vmw_vsock: gunyah: Add bounds check
Validate the incoming packet size when trying to process the message
received on the transport.

Change-Id: If7ea95180a2b04be4832e771013b9e4342118b4c
Signed-off-by: Tao Zhang <quic_taozhan@quicinc.com>
2022-06-08 20:46:57 -07:00
Chris Lew
c4b058026c net: vmw_vsock: gunyah: Add wakeup support
Seeing some issues where the client is unable to read the packet before
the device suspends using vsock. Add a 500 ms wake up event after
queueing a packet to a client's socket. This should give enough time
for the client to read and process the packet. In the future clients
should take a wake lock while they are processing the packet instead
of relying on this wakesource in the gunyah transport.

Change-Id: I3149f8495c1dc11c8972252ad4ab9c8f92739aaa
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-05-04 15:32:59 -07:00
Chris Lew
70ed72188a net: vmw_vsock: gunyah: Free buf after sendmsg
Make sure to free the temporary buffer that holds the clients message
and header in the sendmsg path for gunyah vsock.

Change-Id: I398d5ec00f869b5f63e5f6daf8a609dcbbb13537
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-01-18 17:51:42 -08:00
Jay Jayanna
6b6f9a87e9 net: vmw_vsock: gunyah: Add detection between guest VMs
Master guest VM will start first and register with resource
manager to get a notification when a second guest VM is started.
It is expected that the master VM always comes up first and
then the second guest VM. When the notification that the second
guest VM is up is received by the master guest VM, this driver
will register for the msgq to communicate with the secondary VM.

Also, print error message if vsock_core_register fails.

Change-Id: Ie9951144d5b07cb74184d25a8f03e498627a1f0e
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
2021-10-26 18:07:14 -07:00
Jay Jayanna
70daeca40d net: vmw_vsock: gunyah: Add VMADDR_CID_ANY as supported cid
Allow the use of VMADDR_CID_ANY for creating AF_VSOCK family
of sockets to communicate over gunyah vsock framework.

Change-Id: I9d74e5c62b9fd13fa7697fa30a383e522655a44b
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
2021-10-21 11:01:20 -07:00
Jay Jayanna
3cdd571875 net: vmw_vsock: gunyah: Transport for vsock communication
Implementation of a new gunyah transport that allows for
communication between primary and secondary virtual machines.
This used the af_vsock framework for socket operations.

Change-Id: I0a2c911a07ba46039241f069795ee3866fc24ec8
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
2021-09-10 16:37:15 -07:00