On Wed, Mar 27, 2024 at 7:14 PM Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> wrote: > > If the premapped mode is enabled, the dma array(struct vring_desc_dma) of > virtio core will not be allocated. That is judged when find_vqs() is > called. To avoid allocating dma array in find_vqs() and releasing it > immediately by virtqueue_set_dma_premapped(). This patch introduces a > new parameter to find_vqs(). Then we can judge should we allocate the > dma array(struct vring_desc_dma) or not inside find_vqs(). > > The driver must check the premapped mode of every vq after find_vqs(). > > Signed-off-by: Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> Acked-by: Jason Wang <jasowang@xxxxxxxxxx> Thanks