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 B8D3742B9A; Thu, 25 May 2023 13:35:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D92C40DF8; Thu, 25 May 2023 13:35:23 +0200 (CEST) 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 77C7540DDB for ; Thu, 25 May 2023 13:35:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685014520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nnq/HtYceb0kmEQF6M1QO3FzByrgGTkdltHesJx3zNA=; b=UBJABYZ8dYZHMk00CViDYM6QiPaSPkgoQXBUTwFN4GSsjMvz1LgZI4Ge2wlnhZLGpGoa2o qqN4NRqwHsoWOIawD71mtECAPajMp/Oof0cX688Wxi5vOm4Adt+EKzkpHEOP+4L6Bfh11t 8dw7r5Hh/e21/+Ualb02mhirVabuFnU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-577-giLgx5LROFyz1mshx_O2FA-1; Thu, 25 May 2023 07:35:19 -0400 X-MC-Unique: giLgx5LROFyz1mshx_O2FA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3374238117EC; Thu, 25 May 2023 11:35:19 +0000 (UTC) Received: from [10.39.208.23] (unknown [10.39.208.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0867620296C6; Thu, 25 May 2023 11:35:16 +0000 (UTC) Message-ID: <17624421-dc0f-3e44-94a2-d682f8914937@redhat.com> Date: Thu, 25 May 2023 13:35:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [RFC 20/27] vhost: add VDUSE callback for IOTLB entry removal To: "Xia, Chenbo" , "dev@dpdk.org" , "david.marchand@redhat.com" , "mkp@redhat.com" , "fbl@redhat.com" , "jasowang@redhat.com" , "Liang, Cunming" , "Xie, Yongji" , "echaudro@redhat.com" , "eperezma@redhat.com" , "amorenoz@redhat.com" References: <20230331154259.1447831-1-maxime.coquelin@redhat.com> <20230331154259.1447831-21-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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 5/9/23 07:32, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Friday, March 31, 2023 11:43 PM >> To: dev@dpdk.org; david.marchand@redhat.com; Xia, Chenbo >> ; mkp@redhat.com; fbl@redhat.com; >> jasowang@redhat.com; Liang, Cunming ; Xie, Yongji >> ; echaudro@redhat.com; eperezma@redhat.com; >> amorenoz@redhat.com >> Cc: Maxime Coquelin >> Subject: [RFC 20/27] vhost: add VDUSE callback for IOTLB entry removal >> >> This patch implements the VDUSE callback for IOTLB misses, > > for IOTLB entry removal? This commit messages seems the same as patch 19. > You may want to change it :) I indeed need to rework both patches 19 & 20 commit messages. Thanks for the review, Maxime > Thanks, > Chenbo > >> where it unmaps the pages from the invalidated IOTLB entry >> >> Signed-off-by: Maxime Coquelin >> --- >> lib/vhost/vduse.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c >> index f46823f589..ff4c9e72f1 100644 >> --- a/lib/vhost/vduse.c >> +++ b/lib/vhost/vduse.c >> @@ -32,6 +32,12 @@ >> (1ULL << VIRTIO_F_IN_ORDER) | \ >> (1ULL << VIRTIO_F_IOMMU_PLATFORM)) >> >> +static void >> +vduse_iotlb_remove_notify(uint64_t addr, uint64_t offset, uint64_t size) >> +{ >> + munmap((void *)(uintptr_t)addr, offset + size); >> +} >> + >> static int >> vduse_iotlb_miss(struct virtio_net *dev, uint64_t iova, uint8_t perm >> __rte_unused) >> { >> @@ -89,6 +95,7 @@ vduse_iotlb_miss(struct virtio_net *dev, uint64_t iova, >> uint8_t perm __rte_unuse >> >> static struct vhost_backend_ops vduse_backend_ops = { >> .iotlb_miss = vduse_iotlb_miss, >> + .iotlb_remove_notify = vduse_iotlb_remove_notify, >> }; >> >> int >> -- >> 2.39.2 >