Re: [PATCH vhost v8 01/12] virtio_ring: split: separate dma codes

2023-05-14 Thread Xuan Zhuo
On Fri, 12 May 2023 08:05:35 -0700, Christoph Hellwig wrote: > As said before, please don't try to do weird runtime checks based > on the scatterlist. What you have works for now, but there are > plans to repalce the page + offset tuple in the scatterlist with > just a phys_addr_t. And with tha

Re: [PATCH vhost v8 01/12] virtio_ring: split: separate dma codes

2023-05-14 Thread Jason Wang
On Fri, May 12, 2023 at 11:27 PM Christoph Hellwig wrote: > > As said before, please don't try to do weird runtime checks based > on the scatterlist. What you have works for now, but there are > plans to repalce the page + offset tuple in the scatterlist with > just a phys_addr_t. And with that

Re: [PATCH vhost v8 01/12] virtio_ring: split: separate dma codes

2023-05-12 Thread Christoph Hellwig
As said before, please don't try to do weird runtime checks based on the scatterlist. What you have works for now, but there are plans to repalce the page + offset tuple in the scatterlist with just a phys_addr_t. And with that your "clever" scheme will break instantly. __

[PATCH vhost v8 01/12] virtio_ring: split: separate dma codes

2023-05-09 Thread Xuan Zhuo
DMA-related logic is separated from the virtqueue_add_split() to one new function. DMA address will be saved as sg->dma_address if use_dma_api is true, then virtqueue_add_split() will use it directly. Unmap operation will be simpler. The purpose of this is to facilitate subsequent support to recei