VMCI: dma dg: add support for DMA datagrams sends
authorJorgen Hansen <jhansen@vmware.com>
Mon, 7 Feb 2022 10:27:24 +0000 (02:27 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 11:15:59 +0000 (12:15 +0100)
commit22aa5c7f323022477b70e044eb00e6bfea9498e8
tree9770b608576f2f8669badc76cfd21461548660de
parent5ee109828e73bbe4213c373988608d8f33e03d78
VMCI: dma dg: add support for DMA datagrams sends

Use DMA based send operation from the transmit buffer instead of the
iowrite8_rep based datagram send when DMA datagrams are supported.

The outgoing datagram is sent as inline data in the VMCI transmit
buffer. Once the header has been configured, the send is initiated
by writing the lower 32 bit of the buffer base address to the
VMCI_DATA_OUT_LOW_ADDR register. Only then will the device process
the header and the datagram itself. Following that, the driver busy
waits (it isn't possible to sleep on the send path) for the header
busy flag to change - indicating that the send is complete.

Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Link: https://lore.kernel.org/r/20220207102725.2742-8-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_vmci/vmci_guest.c
include/linux/vmw_vmci_defs.h