* linux-next: manual merge of the vhost tree with the dma-mapping tree
@ 2025-07-18 8:12 Stephen Rothwell
2025-07-20 9:28 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2025-07-18 8:12 UTC (permalink / raw)
To: Michael S. Tsirkin, Marek Szyprowski
Cc: Jason Wang, Leon Romanovsky, Leon Romanovsky,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]
Hi all,
Today's linux-next merge of the vhost tree got a conflict in:
drivers/virtio/virtio_ring.c
between commit:
b420b31f009f ("kmsan: convert kmsan_handle_dma to use physical addresses")
from the dma-mapping tree and commit:
d1814d4fca2c ("virtio: rename dma helpers")
from the vhost tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/virtio/virtio_ring.c
index a8421dc802d6,3f86e74dd79f..000000000000
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@@ -3143,17 -3240,17 +3240,17 @@@ EXPORT_SYMBOL_GPL(virtqueue_unmap_page_
* The caller calls this to do dma mapping in advance. The DMA address can be
* passed to this _vq when it is in pre-mapped mode.
*
- * return DMA address. Caller should check that by virtqueue_dma_mapping_error().
+ * return mapped address. Caller should check that by virtqueue_mapping_error().
*/
- dma_addr_t virtqueue_dma_map_single_attrs(struct virtqueue *_vq, void *ptr,
- size_t size,
- enum dma_data_direction dir,
- unsigned long attrs)
+ dma_addr_t virtqueue_map_single_attrs(const struct virtqueue *_vq, void *ptr,
+ size_t size,
+ enum dma_data_direction dir,
+ unsigned long attrs)
{
- struct vring_virtqueue *vq = to_vvq(_vq);
+ const struct vring_virtqueue *vq = to_vvq(_vq);
- if (!vq->use_dma_api) {
+ if (!vq->use_map_api) {
- kmsan_handle_dma(virt_to_page(ptr), offset_in_page(ptr), size, dir);
+ kmsan_handle_dma(virt_to_phys(ptr), size, dir);
return (dma_addr_t)virt_to_phys(ptr);
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linux-next: manual merge of the vhost tree with the dma-mapping tree
2025-07-18 8:12 linux-next: manual merge of the vhost tree with the dma-mapping tree Stephen Rothwell
@ 2025-07-20 9:28 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2025-07-20 9:28 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Michael S. Tsirkin, Marek Szyprowski, Jason Wang,
Linux Kernel Mailing List, Linux Next Mailing List
On Fri, Jul 18, 2025 at 06:12:26PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the vhost tree got a conflict in:
>
> drivers/virtio/virtio_ring.c
>
> between commit:
>
> b420b31f009f ("kmsan: convert kmsan_handle_dma to use physical addresses")
>
> from the dma-mapping tree and commit:
>
> d1814d4fca2c ("virtio: rename dma helpers")
>
> from the vhost tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/virtio/virtio_ring.c
> index a8421dc802d6,3f86e74dd79f..000000000000
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@@ -3143,17 -3240,17 +3240,17 @@@ EXPORT_SYMBOL_GPL(virtqueue_unmap_page_
> * The caller calls this to do dma mapping in advance. The DMA address can be
> * passed to this _vq when it is in pre-mapped mode.
> *
> - * return DMA address. Caller should check that by virtqueue_dma_mapping_error().
> + * return mapped address. Caller should check that by virtqueue_mapping_error().
> */
> - dma_addr_t virtqueue_dma_map_single_attrs(struct virtqueue *_vq, void *ptr,
> - size_t size,
> - enum dma_data_direction dir,
> - unsigned long attrs)
> + dma_addr_t virtqueue_map_single_attrs(const struct virtqueue *_vq, void *ptr,
> + size_t size,
> + enum dma_data_direction dir,
> + unsigned long attrs)
> {
> - struct vring_virtqueue *vq = to_vvq(_vq);
> + const struct vring_virtqueue *vq = to_vvq(_vq);
>
> - if (!vq->use_dma_api) {
> + if (!vq->use_map_api) {
> - kmsan_handle_dma(virt_to_page(ptr), offset_in_page(ptr), size, dir);
> + kmsan_handle_dma(virt_to_phys(ptr), size, dir);
Thanks, it looks correct to me.
> return (dma_addr_t)virt_to_phys(ptr);
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-20 9:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 8:12 linux-next: manual merge of the vhost tree with the dma-mapping tree Stephen Rothwell
2025-07-20 9:28 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).