From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DD784A034D; Fri, 4 Feb 2022 11:43:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C94AD40687; Fri, 4 Feb 2022 11:43:51 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3DC2540140 for ; Fri, 4 Feb 2022 11:43:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643971429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bCW1hdAsgSs59dN33oNpIX73b/cRJgEHgMIkV7z1X+A=; b=XcqSndEoVouG+u4xBoEhOVKjCRUX0VYAkcasE0xZFy44t4LapX2nLTRgpn3XobFFG6QSfh sfOjLA1R0gNL76dix8vr2eBfo4NL9l283fD69mPtyO3p1u3uwdVJlEsWi5zrXg4Q3E6xci jlPSathaPMHHgW+PA12hfVJ7lXqk3H0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-571-BfSQhsNeObWjkt-D0FF4rg-1; Fri, 04 Feb 2022 05:43:48 -0500 X-MC-Unique: BfSQhsNeObWjkt-D0FF4rg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58074814243; Fri, 4 Feb 2022 10:43:47 +0000 (UTC) Received: from [10.39.208.15] (unknown [10.39.208.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB318752D0; Fri, 4 Feb 2022 10:43:45 +0000 (UTC) Message-ID: Date: Fri, 4 Feb 2022 11:43:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 2/2] vhost: fix physical address mapping To: xuan.ding@intel.com, chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, yuanx.wang@intel.com References: <20220119151016.9970-1-xuan.ding@intel.com> <20220119151016.9970-3-xuan.ding@intel.com> From: Maxime Coquelin In-Reply-To: <20220119151016.9970-3-xuan.ding@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 1/19/22 16:10, xuan.ding@intel.com wrote: > From: Xuan Ding > > 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 > Signed-off-by: Yuan Wang > --- > lib/vhost/vhost.h | 1 + > lib/vhost/vhost_user.c | 116 ++++++++++++++++++++--------------------- > 2 files changed, 57 insertions(+), 60 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime