[PATCH v2 2/2] vhost: fix physical address mapping

Maxime Coquelin maxime.coquelin at redhat.com
Fri Feb 4 11:43:44 CET 2022



On 1/19/22 16:10, xuan.ding at intel.com wrote:
> From: Xuan Ding <xuan.ding at intel.com>
> 
> When choosing IOVA as PA mode, IOVA is likely to be discontinuous,
> which requires page by page mapping for DMA devices. To be consistent,
> this patch implements page by page mapping instead of mapping at the
> region granularity for both IOVA as VA and PA mode.
> 
> Fixes: 7c61fa08b716 ("vhost: enable IOMMU for async vhost")
> 
> Signed-off-by: Xuan Ding <xuan.ding at intel.com>
> Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
> ---
>   lib/vhost/vhost.h      |   1 +
>   lib/vhost/vhost_user.c | 116 ++++++++++++++++++++---------------------
>   2 files changed, 57 insertions(+), 60 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list