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 0E1EA42BCC; Mon, 29 May 2023 08:52:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3FBE4111C; Mon, 29 May 2023 08:52:15 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id AE385410D7 for ; Mon, 29 May 2023 08:52:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685343133; x=1716879133; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=FgwiqRHKkVWyg8bVBIsvILT5v29pDDJne0TChTu47eU=; b=bpN7oDw7HpwAZ3bfz612LhCkQasy450w5NNyalBSQrU9DW8zpTNZQyrh UoVtgWqLULIHamjgQ2Jv4zV4kIZmAbE8cYMbujRag6v8rYAjyPM18v/Oz TiHhzepKeQGfogKYU+o9Jlm4Yy+HFzyMf8gi+ajlimdsCA0/CpQwuVwuy tnGr61JNuoNw4G3347KWQeE7+p2iSbePI4cvQNz+BsgBFF0XaBvQTyMdL xWpuhEsE68jmANmeDTqn7NgdIkKAeFulLQzwL7t+D84XltnvNiZFcqcdb iWAx8AHa03S9xKO8R5Yf5qAHAp50G0xIWJZGVr2GWwZeXPrQSE/fTHmby Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="354648919" X-IronPort-AV: E=Sophos;i="6.00,200,1681196400"; d="scan'208";a="354648919" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2023 23:52:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="656385029" X-IronPort-AV: E=Sophos;i="6.00,200,1681196400"; d="scan'208";a="656385029" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 28 May 2023 23:52:12 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sun, 28 May 2023 23:52:11 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Sun, 28 May 2023 23:52:11 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Sun, 28 May 2023 23:52:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfM+AoVT0uvmk6NvvRZciZ+qBgGdJgTA32/7a3on6kWNepqLJAripYLL8HAsRWAVfrf6JhU8RPO8N0bhGc9zKNJ1pYYJfVLNqD5uKfE+i81/oeff9KU82N4aMXv00dG3a+lifCTfGCGfI+wnY2auCxMaLgbc9+1AuVWOjX+Aev2bYIigwCH3DDfL9G4kyWp8YaWaBol2TeabYJtd0ulbSJbPGV4jTq0pxVKYcXa2gkZ5nV5cD0UXp6qfGc2mnzkcpzgE52/Hy29htv1qRRWn0nwL7CH+H2nUQ9Y3g3akdwWDwx581xDmlCz5Ace1dqvEORUfEUh8Nj5sZtDoMQSl1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EdMA/38HYkRsVyTIShe4cGxQvufOXffo9PSYN4iWe3Y=; b=mZyxe0H45xEaDIj3LkyQpnpal3AJlNa2Thd1ie/GRe/aOiCmf2z+Aq6hQvapuA6KWFF6/sLJgpkwQ+P+7C3wXseQECJO8Tl4upKjmwjFrThVujMw3tCu8WDzJTg4JRAsek2rNrHlUfO97xDZQhLrXQM+1A70/0DrvhTZqiHvCkxSqGSHlqGxxf/SBg6X0p8s41+GzmiWYoo2lWHusGCc+btBig1PP3BNkT8Snoa2JnTCxIgGZwtSfYUHW+zjz0hQq1TPGYDQHJUezexeiW6UEBQpvfHsT/A4hKVcx+StjOsqHTmAi0UFVQHb/EhhpN4NX6IpvLsBy0MLzw3WDvOE3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by MW3PR11MB4602.namprd11.prod.outlook.com (2603:10b6:303:52::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 06:52:08 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::e427:f0a6:8472:d0f6]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::e427:f0a6:8472:d0f6%7]) with mapi id 15.20.6433.020; Mon, 29 May 2023 06:52:08 +0000 From: "Xia, Chenbo" To: Maxime Coquelin , "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" , "lulu@redhat.com" Subject: RE: [PATCH v3 25/28] vhost: add support for VDUSE IOTLB update event Thread-Topic: [PATCH v3 25/28] vhost: add support for VDUSE IOTLB update event Thread-Index: AQHZjyZFiVSI3P021kSQldmrhuA8QK9w1dPw Date: Mon, 29 May 2023 06:52:07 +0000 Message-ID: References: <20230525162551.70359-1-maxime.coquelin@redhat.com> <20230525162551.70359-26-maxime.coquelin@redhat.com> In-Reply-To: <20230525162551.70359-26-maxime.coquelin@redhat.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB3504:EE_|MW3PR11MB4602:EE_ x-ms-office365-filtering-correlation-id: b56d30ab-77b0-4734-3243-08db60113869 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yYytguddoMWxjFjH96satq817bni2HFfzbZURJH9iOa5v+e1aVuB+tje9Wjqfdc58smn8x4S+vtZQSkjADjRUfGb9ibNYpuwXdpIlz1GPcSICy0Vp9EIpPjYIStj5BspMI+9UiHJ2tweyPIUdvvHj9CxRoa1FqFsFy7fXg+1iFleAk+xdtI8MXQFn/adtDk/e1Bt+4wJjg3rr4tgunwQ5zlzb5iGtiT41IGv6RMk9GRBrXN/qZ5MfkY1OnLrfRTEeuHRKb7gFDnXnjFydRDasxTCqDmYaKLC2hWlJ4EeS9cTMomGIr2ufWDPzF5redy64VSVJtyLkJ0uK5TWkEy9Kkc6URF1CQayi0l8H+prRRPowujmUnwRd+4NpRFe/MRSymdMPjsTy49oAB/PBpPSuRLjmcSlWsXtnnpF3xq6x41vnR4f1gLdgFK/+db7Gof6BO20xnc7IhqAOMgvRgrTrFUDZ4qO+yuoQ/Q5OVerVW1SC6wtZUgdVQhl+loS54XkNUH12pA81iNPPNNIrL6K0vMYRHnNgR4zYCeqYJ46jzqsjnxAOcGU9Xf3f7ECGNltEdfW7jmH/9uJh1UnTgww50b2MYAaFvctFsnC6+/7zt8BK3qHbjHDOdG1RguXz72YtbUCyYZx0KknjLe0i2z1dA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(366004)(136003)(346002)(376002)(396003)(451199021)(71200400001)(478600001)(110136005)(5660300002)(8936002)(8676002)(52536014)(7416002)(15650500001)(2906002)(38070700005)(86362001)(33656002)(66946007)(66556008)(76116006)(66476007)(66446008)(64756008)(82960400001)(316002)(921005)(122000001)(55016003)(38100700002)(41300700001)(186003)(9686003)(53546011)(26005)(6506007)(7696005)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VNaUrhN3cQjTkKOPYBux9dxGn5ZmzFUpxenWVlASLL/Kmkp8VrfFP/zrsKNn?= =?us-ascii?Q?bzBpHp6o7liJoWye16xe5lROhcfgrCMDmZYRwqasYYwFR/8dqw5yRF9Fhxhy?= =?us-ascii?Q?GOdB+4CLmaJ7nko/kddPAxA8ruiiSLcUqncT2WyrG+n1XzrBtEcEpnJXewQW?= =?us-ascii?Q?QsvgxxHs1Aj0+PqnYKaX18Mha4Gvk1znRnf40NwDf6q7cjeCGniagk+S0MYx?= =?us-ascii?Q?CsVqQ1ktF0bDi0FNxK9HpAll5xoTUIWGWS7XlyzcQivgalPFbTUh3+5EtVLs?= =?us-ascii?Q?fWS+/tdi73Lglo1LlSANWOxPsfKVtOgHYaMqL9gO5/Cr8AKfpXzlzEPs+u7+?= =?us-ascii?Q?uMR0g3luWGDDOO8RE2PTvrpJuXldZ04hvrlndxpgV4WpGqxnrwA2mpdzf9lA?= =?us-ascii?Q?pTSo0UYw30KNh+SasCp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?Q?PlOqdqDV6SYbrVMmB2RfH+CE5hNU7jlKr54f7RJWSE4Zd0tvCYUz+topVOU1?= =?us-ascii?Q?U9rl3cmnIzoXDi/ew/QdWxrX6NsmugdZV7oGHHUjYjbt8fjDb2yV6VaotaOw?= =?us-ascii?Q?Rx+0EsiCeraShX1ZN2qxNyFBg/p4cIw5P2FJ7KVGTqDaXc98bmB1uZ1bLGk7?= =?us-ascii?Q?FsW+Dpraivo7E0IBqKu/8Cbz5cniBG834/r/fNi4eg2omUPnofs6jaZ4G93f?= =?us-ascii?Q?kIySLsK2sxHeDrU2e23e+868Vg6PQEha8RiivWWj?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b56d30ab-77b0-4734-3243-08db60113869 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2023 06:52:07.9756 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: igNkmc8ciTedCa5oGX1UVbc4gmHTGjCXKwXIfaVlQ0M3rGMoKGoPBgFVb+OkoHbbjUKrFSXABelqqAkEfayS/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4602 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Maxime Coquelin > Sent: Friday, May 26, 2023 12:26 AM > To: dev@dpdk.org; Xia, Chenbo ; > david.marchand@redhat.com; mkp@redhat.com; fbl@redhat.com; > jasowang@redhat.com; Liang, Cunming ; Xie, Yongj= i > ; echaudro@redhat.com; eperezma@redhat.com; > amorenoz@redhat.com; lulu@redhat.com > Cc: Maxime Coquelin > Subject: [PATCH v3 25/28] vhost: add support for VDUSE IOTLB update event >=20 > This patch adds support for VDUSE_UPDATE_IOTLB event > handling, which consists in invaliding IOTLB entries for > the range specified in the request. >=20 > Signed-off-by: Maxime Coquelin > --- > lib/vhost/vduse.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c > index 3bf65d4b8b..110654ec68 100644 > --- a/lib/vhost/vduse.c > +++ b/lib/vhost/vduse.c > @@ -179,6 +179,13 @@ vduse_events_handler(int fd, void *arg, int *remove > __rte_unused) > dev->status =3D req.s.status; > resp.result =3D VDUSE_REQ_RESULT_OK; > break; > + case VDUSE_UPDATE_IOTLB: > + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tIOVA range: %" PRIx64 " > - %" PRIx64 "\n", > + (uint64_t)req.iova.start, (uint64_t)req.iova.last); > + vhost_user_iotlb_cache_remove(dev, req.iova.start, > + req.iova.last - req.iova.start + 1); > + resp.result =3D VDUSE_REQ_RESULT_OK; > + break; > default: > resp.result =3D VDUSE_REQ_RESULT_FAILED; > break; > -- > 2.40.1 Reviewed-by: Chenbo Xia =20