<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/vmw_vmci_defs.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-02-08T11:15:59+00:00</updated>
<entry>
<title>VMCI: dma dg: add support for DMA datagrams sends</title>
<updated>2022-02-08T11:15:59+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=22aa5c7f323022477b70e044eb00e6bfea9498e8'/>
<id>urn:sha1:22aa5c7f323022477b70e044eb00e6bfea9498e8</id>
<content type='text'>
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 &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-8-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: dma dg: allocate send and receive buffers for DMA datagrams</title>
<updated>2022-02-08T11:15:59+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ee109828e73bbe4213c373988608d8f33e03d78'/>
<id>urn:sha1:5ee109828e73bbe4213c373988608d8f33e03d78</id>
<content type='text'>
If DMA datagrams are used, allocate send and receive buffers
in coherent DMA memory.

This is done in preparation for the send and receive datagram
operations, where the buffers are used for the exchange of data
between driver and device.

Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-7-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: dma dg: register dummy IRQ handlers for DMA datagrams</title>
<updated>2022-02-08T11:15:59+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc68f2177fcbfe2dbe5e9514789b96ba5995ec1e'/>
<id>urn:sha1:cc68f2177fcbfe2dbe5e9514789b96ba5995ec1e</id>
<content type='text'>
Register dummy interrupt handlers for DMA datagrams in preparation for
DMA datagram receive operations.

Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-6-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: dma dg: set OS page size</title>
<updated>2022-02-08T11:15:59+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8cb520bea1470ca205980fbf030ed1f472f4af2f'/>
<id>urn:sha1:8cb520bea1470ca205980fbf030ed1f472f4af2f</id>
<content type='text'>
Tell the device the page size used by the OS.

Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-5-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: dma dg: detect DMA datagram capability</title>
<updated>2022-02-08T11:15:58+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eed2298d936087a1c85e0fa6f7170028e4f4fded'/>
<id>urn:sha1:eed2298d936087a1c85e0fa6f7170028e4f4fded</id>
<content type='text'>
Detect the VMCI DMA datagram capability, and if present, ack it
to the device.

Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-4-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: dma dg: add MMIO access to registers</title>
<updated>2022-02-08T11:15:58+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e283a0e8b7ea83915e988ed059384af166b444c0'/>
<id>urn:sha1:e283a0e8b7ea83915e988ed059384af166b444c0</id>
<content type='text'>
Detect the support for MMIO access through examination of the length
of the region requested in BAR1. If it is 256KB, the VMCI device
supports MMIO access to registers.

If MMIO access is supported, map the area of the region used for
MMIO access (64KB size at offset 128KB).

Add wrapper functions for accessing 32 bit register accesses through
either MMIO or IO ports based on device configuration.

Sending and receiving datagrams through iowrite8_rep/ioread8_rep is
left unchanged for now, and will be addressed in a later change.

Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-3-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: dma dg: whitespace formatting change for vmci register defines</title>
<updated>2022-02-08T11:15:58+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2022-02-07T10:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fac608138c6136126faadafa5554cc0bbabf3c44'/>
<id>urn:sha1:fac608138c6136126faadafa5554cc0bbabf3c44</id>
<content type='text'>
Update formatting of existing register defines in preparation for
adding additional register definitions for the VMCI device.

Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/20220207102725.2742-2-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC</title>
<updated>2021-01-26T18:18:50+00:00</updated>
<author>
<name>Jorgen Hansen</name>
<email>jhansen@vmware.com</email>
</author>
<published>2021-01-20T16:33:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7eecea89e44f64e60f1410483e79a0cab18ad580'/>
<id>urn:sha1:7eecea89e44f64e60f1410483e79a0cab18ad580</id>
<content type='text'>
When create the VMCI queue pair tracking data structures on the host
side, the IOCTL for creating the VMCI queue pair didn't validate
the queue pair size parameters. This change adds checks for this.

This avoids a memory allocation issue in qp_host_alloc_queue, as
reported by nslusarek@gmx.net. The check in qp_host_alloc_queue
has also been updated to enforce the maximum queue pair size
as defined by VMCI_MAX_GUEST_QP_MEMORY.

The fix has been verified using sample code supplied by
nslusarek@gmx.net.

Reported-by: nslusarek@gmx.net
Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Signed-off-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Link: https://lore.kernel.org/r/1611160420-30573-1-git-send-email-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as __maybe_unused</title>
<updated>2020-07-10T12:55:25+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-07-08T12:57:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9f91cebbeb8ea1355e852cce6d40efbcddbfe2b'/>
<id>urn:sha1:a9f91cebbeb8ea1355e852cce6d40efbcddbfe2b</id>
<content type='text'>
vmw_vmci_defs.h is included by multiple source files.  Some of which
do not make use of 'struct vmci_handle VMCI_ANON_SRC_HANDLE' rendering
it unused.  Ensure the compiler knows that this is in fact intentional
by marking it as __maybe_unused.  This fixes the following W=1 warnings:

 In file included from drivers/misc/vmw_vmci/vmci_context.c:8:
 include/linux/vmw_vmci_defs.h:162:33: warning: ‘VMCI_ANON_SRC_HANDLE’ defined but not used [-Wunused-const-variable=]
 162 | static const struct vmci_handle VMCI_ANON_SRC_HANDLE = {
 | ^~~~~~~~~~~~~~~~~~~~
 In file included from drivers/misc/vmw_vmci/vmci_datagram.c:8:
 include/linux/vmw_vmci_defs.h:162:33: warning: ‘VMCI_ANON_SRC_HANDLE’ defined but not used [-Wunused-const-variable=]
 162 | static const struct vmci_handle VMCI_ANON_SRC_HANDLE = {
 | ^~~~~~~~~~~~~~~~~~~~

Cc: George Zhang &lt;georgezhang@vmware.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20200708125711.3443569-2-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: Fix integer overflow in VMCI handle arrays</title>
<updated>2019-06-21T14:04:05+00:00</updated>
<author>
<name>Vishnu DASA</name>
<email>vdasa@vmware.com</email>
</author>
<published>2019-05-24T15:13:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c2eb5b2853c9f513690ba6b71072d8eb65da16a'/>
<id>urn:sha1:1c2eb5b2853c9f513690ba6b71072d8eb65da16a</id>
<content type='text'>
The VMCI handle array has an integer overflow in
vmci_handle_arr_append_entry when it tries to expand the array. This can be
triggered from a guest, since the doorbell link hypercall doesn't impose a
limit on the number of doorbell handles that a VM can create in the
hypervisor, and these handles are stored in a handle array.

In this change, we introduce a mandatory max capacity for handle
arrays/lists to avoid excessive memory usage.

Signed-off-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Reviewed-by: Adit Ranadive &lt;aditr@vmware.com&gt;
Reviewed-by: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
