<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/s390/virtio, branch vsnprintf</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>s390/virtio_ccw: Fix dma_parm pointer not set up</title>
<updated>2024-10-10T13:32:43+00:00</updated>
<author>
<name>Halil Pasic</name>
<email>pasic@linux.ibm.com</email>
</author>
<published>2024-10-07T20:10:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=14c7579376279e507e52bf022192b46097a55377'/>
<id>14c7579376279e507e52bf022192b46097a55377</id>
<content type='text'>
At least since commit 334304ac2bac ("dma-mapping: don't return errors
from dma_set_max_seg_size") setting up device.dma_parms is basically
mandated by the DMA API. As of now Channel (CCW) I/O in general does not
utilize the DMA API, except for virtio. For virtio-ccw however the
common virtio DMA infrastructure is such that most of the DMA stuff
hinges on the virtio parent device, which is a CCW device.

So lets set up the dma_parms pointer for the CCW parent device and hope
for the best!

Fixes: 334304ac2bac ("dma-mapping: don't return errors from dma_set_max_seg_size")
Reported-by: Marc Hartmayer &lt;mhartmay@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Tested-by: Marc Hartmayer &lt;mhartmay@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20241007201030.204028-1-pasic@linux.ibm.com
Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At least since commit 334304ac2bac ("dma-mapping: don't return errors
from dma_set_max_seg_size") setting up device.dma_parms is basically
mandated by the DMA API. As of now Channel (CCW) I/O in general does not
utilize the DMA API, except for virtio. For virtio-ccw however the
common virtio DMA infrastructure is such that most of the DMA stuff
hinges on the virtio parent device, which is a CCW device.

So lets set up the dma_parms pointer for the CCW parent device and hope
for the best!

Fixes: 334304ac2bac ("dma-mapping: don't return errors from dma_set_max_seg_size")
Reported-by: Marc Hartmayer &lt;mhartmay@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Tested-by: Marc Hartmayer &lt;mhartmay@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20241007201030.204028-1-pasic@linux.ibm.com
Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: rename find_vqs_info() op to find_vqs()</title>
<updated>2024-07-17T09:20:57+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2024-07-08T07:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b49503eaf9c74c3d0efd1e8331aba37ce3c1fd68'/>
<id>b49503eaf9c74c3d0efd1e8331aba37ce3c1fd68</id>
<content type='text'>
Since the original find_vqs() is no longer present, rename
find_vqs_info() back to find_vqs().

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Message-Id: &lt;20240708074814.1739223-10-jiri@resnulli.us&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the original find_vqs() is no longer present, rename
find_vqs_info() back to find_vqs().

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Message-Id: &lt;20240708074814.1739223-10-jiri@resnulli.us&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: convert find_vqs() op implementations to find_vqs_info()</title>
<updated>2024-07-17T09:20:57+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2024-07-08T07:48:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3c93b576e038577490e8b906025e38b6fd7241b3'/>
<id>3c93b576e038577490e8b906025e38b6fd7241b3</id>
<content type='text'>
Convert existing find_vqs() transport implementations
to use find_vqs_info() config op.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Message-Id: &lt;20240708074814.1739223-7-jiri@resnulli.us&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert existing find_vqs() transport implementations
to use find_vqs_info() config op.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Message-Id: &lt;20240708074814.1739223-7-jiri@resnulli.us&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/virtio_ccw: Fix config change notifications</title>
<updated>2024-06-17T19:49:01+00:00</updated>
<author>
<name>Halil Pasic</name>
<email>pasic@linux.ibm.com</email>
</author>
<published>2024-06-11T21:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d8354a1de2c4cc693812f6130fc922537a59217d'/>
<id>d8354a1de2c4cc693812f6130fc922537a59217d</id>
<content type='text'>
Commit e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API")
broke configuration change notifications for virtio-ccw by putting the
DMA address of *indicatorp directly into ccw-&gt;cda disregarding the fact
that if !!(vcdev-&gt;is_thinint) then the function
virtio_ccw_register_adapter_ind() will overwrite that ccw-&gt;cda value
with the address of the virtio_thinint_area so it can actually set up
the adapter interrupts via CCW_CMD_SET_IND_ADAPTER.  Thus we end up
pointing to the wrong object for both CCW_CMD_SET_IND if setting up the
adapter interrupts fails, and for CCW_CMD_SET_CONF_IND regardless
whether it succeeds or fails.

To fix this, let us save away the dma address of *indicatorp in a local
variable, and copy it to ccw-&gt;cda after the "vcdev-&gt;is_thinint" branch.

Fixes: e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API")
Reported-by: Boqiao Fu &lt;bfu@redhat.com&gt;
Reported-by: Sebastian Mitterle &lt;smitterl@redhat.com&gt;
Closes: https://issues.redhat.com/browse/RHEL-39983
Tested-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20240611214716.1002781-1-pasic@linux.ibm.com
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API")
broke configuration change notifications for virtio-ccw by putting the
DMA address of *indicatorp directly into ccw-&gt;cda disregarding the fact
that if !!(vcdev-&gt;is_thinint) then the function
virtio_ccw_register_adapter_ind() will overwrite that ccw-&gt;cda value
with the address of the virtio_thinint_area so it can actually set up
the adapter interrupts via CCW_CMD_SET_IND_ADAPTER.  Thus we end up
pointing to the wrong object for both CCW_CMD_SET_IND if setting up the
adapter interrupts fails, and for CCW_CMD_SET_CONF_IND regardless
whether it succeeds or fails.

To fix this, let us save away the dma address of *indicatorp in a local
variable, and copy it to ccw-&gt;cda after the "vcdev-&gt;is_thinint" branch.

Fixes: e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API")
Reported-by: Boqiao Fu &lt;bfu@redhat.com&gt;
Reported-by: Sebastian Mitterle &lt;smitterl@redhat.com&gt;
Closes: https://issues.redhat.com/browse/RHEL-39983
Tested-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20240611214716.1002781-1-pasic@linux.ibm.com
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/virtio_ccw: avoid converting dma addresses / handles</title>
<updated>2024-03-13T08:23:46+00:00</updated>
<author>
<name>Halil Pasic</name>
<email>pasic@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8adc56b074322a0cd03a61418295969f19e5fb0e'/>
<id>8adc56b074322a0cd03a61418295969f19e5fb0e</id>
<content type='text'>
Instead of converting virtual to physical addresses with the virt_to_dma*()
functions, use dma addresses as provided by DMA API and only add offsets to
these addresses. This makes sure that address conversion is only done by
the DMA API.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of converting virtual to physical addresses with the virt_to_dma*()
functions, use dma addresses as provided by DMA API and only add offsets to
these addresses. This makes sure that address conversion is only done by
the DMA API.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/virtio_ccw: use DMA handle from DMA API</title>
<updated>2024-03-13T08:23:46+00:00</updated>
<author>
<name>Halil Pasic</name>
<email>pasic@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e3e9bda38e6d9f2af50b521741071d6406b40152'/>
<id>e3e9bda38e6d9f2af50b521741071d6406b40152</id>
<content type='text'>
Change and use ccw_device_dma_zalloc() so it returns a virtual address like
before, which can be used to access data. However also pass a new dma32_t
pointer type handle, which correlates to the returned virtual address.
This pointer is used to directly pass/set the DMA handle as returned by the
DMA API.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change and use ccw_device_dma_zalloc() so it returns a virtual address like
before, which can be used to access data. However also pass a new dma32_t
pointer type handle, which correlates to the returned virtual address.
This pointer is used to directly pass/set the DMA handle as returned by the
DMA API.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/virtio_ccw: fix virtual vs physical address confusion</title>
<updated>2024-03-13T08:23:46+00:00</updated>
<author>
<name>Halil Pasic</name>
<email>pasic@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d5cc41686990fa522ce573e5c6c7a619f10c3fd1'/>
<id>d5cc41686990fa522ce573e5c6c7a619f10c3fd1</id>
<content type='text'>
Fix virtual vs physical address confusion and use new dma types and helper
functions to allow for type checking. This does not fix a bug since virtual
and physical address spaces are currently the same.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix virtual vs physical address confusion and use new dma types and helper
functions to allow for type checking. This does not fix a bug since virtual
and physical address spaces are currently the same.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/airq: remove lsi_mask from airq_struct</title>
<updated>2023-08-30T09:03:28+00:00</updated>
<author>
<name>Benjamin Block</name>
<email>bblock@linux.ibm.com</email>
</author>
<published>2023-08-17T17:18:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=acf00b5ef9f83069ddbea274ab32931f8573e98b'/>
<id>acf00b5ef9f83069ddbea274ab32931f8573e98b</id>
<content type='text'>
Remove the field `lsi_mask` from `struct airq_struct` as it is not
utilized for any adapter interrupt, other than setting it to the default
value of 0xff.

Because nobody is using this functionality, all it does is cost a little
bit of time with each delivered adapter interrupt.

Reviewed-by: Michael Mueller &lt;mimu@linux.ibm.com&gt;
Tested-by: Michael Mueller &lt;mimu@linux.ibm.com&gt;
Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Benjamin Block &lt;bblock@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the field `lsi_mask` from `struct airq_struct` as it is not
utilized for any adapter interrupt, other than setting it to the default
value of 0xff.

Because nobody is using this functionality, all it does is cost a little
bit of time with each delivered adapter interrupt.

Reviewed-by: Michael Mueller &lt;mimu@linux.ibm.com&gt;
Tested-by: Michael Mueller &lt;mimu@linux.ibm.com&gt;
Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Benjamin Block &lt;bblock@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio: add VIRTIO_F_NOTIFICATION_DATA feature support</title>
<updated>2023-04-21T07:02:35+00:00</updated>
<author>
<name>Viktor Prutyanov</name>
<email>viktor@daynix.com</email>
</author>
<published>2023-04-13T08:18:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=af8ececda185078c096852edb4e1d7a2349e6856'/>
<id>af8ececda185078c096852edb4e1d7a2349e6856</id>
<content type='text'>
According to VirtIO spec v1.2, VIRTIO_F_NOTIFICATION_DATA feature
indicates that the driver passes extra data along with the queue
notifications.

In a split queue case, the extra data is 16-bit available index. In a
packed queue case, the extra data is 1-bit wrap counter and 15-bit
available index.

Add support for this feature for MMIO, channel I/O and modern PCI
transports.

Signed-off-by: Viktor Prutyanov &lt;viktor@daynix.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Message-Id: &lt;20230413081855.36643-2-alvaro.karsz@solid-run.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to VirtIO spec v1.2, VIRTIO_F_NOTIFICATION_DATA feature
indicates that the driver passes extra data along with the queue
notifications.

In a split queue case, the extra data is 16-bit available index. In a
packed queue case, the extra data is 1-bit wrap counter and 15-bit
available index.

Add support for this feature for MMIO, channel I/O and modern PCI
transports.

Signed-off-by: Viktor Prutyanov &lt;viktor@daynix.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Reviewed-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Message-Id: &lt;20230413081855.36643-2-alvaro.karsz@solid-run.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/virtio: sort out physical vs virtual pointers usage</title>
<updated>2023-02-08T08:59:46+00:00</updated>
<author>
<name>Alexander Gordeev</name>
<email>agordeev@linux.ibm.com</email>
</author>
<published>2021-01-29T11:29:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5fc5b94a273655128159186c87662105db8afeb5'/>
<id>5fc5b94a273655128159186c87662105db8afeb5</id>
<content type='text'>
This does not fix a real bug, since virtual addresses
are currently indentical to physical ones.

Reviewed-by: Nico Boehr &lt;nrb@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Signed-off-by: Janosch Frank &lt;frankja@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This does not fix a real bug, since virtual addresses
are currently indentical to physical ones.

Reviewed-by: Nico Boehr &lt;nrb@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Signed-off-by: Janosch Frank &lt;frankja@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
