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 9BEF9A0548; Mon, 27 Sep 2021 14:14:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57F3D410E1; Mon, 27 Sep 2021 14:14:00 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 37D96410DA for ; Mon, 27 Sep 2021 14:13:58 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10119"; a="204614859" X-IronPort-AV: E=Sophos;i="5.85,326,1624345200"; d="scan'208";a="204614859" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2021 05:13:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,326,1624345200"; d="scan'208";a="553166194" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by FMSMGA003.fm.intel.com with ESMTP; 27 Sep 2021 05:13:56 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 27 Sep 2021 05:13:56 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 27 Sep 2021 05:13:56 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 27 Sep 2021 05:13:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MgeMHc4i/RLzeWgeL+j1DyjCO9KKjkYfRD22DVpu0rA7V2lWS5lSm0RzFMBXzZAfYBBC2Mc8f3sfRTApWdnTTBWMqI1eYs7emyOsTYEtdfllItZf3FcsVP8bX6ujbLrg0ZPhQkRKYaNqLchSNdpduZw6J51ZrQ2ZCVqU5Hriaz1AFmBbH/IP3IRySdw4ztfW+tIy4uPlp2ittvle8GerYQXrWCa3oRY4MrmR94sx+qu7Lb/8hNHxXRjAo9dFWgy9e+s73s65AT4qpUHDhpfd9K5Nbyxo/tkRFi8fQ11/j+YDfCTUrz3fphpstTd4niMr3bMypF77WUYDDSfzkByOyg== 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; bh=v7SthPcmghn3i3aykKGC8RZE1iF78w64TQFSDa4GfUo=; b=dtxcklAJBKu41aAecriSZ/UZziVXkDLKVJFau3EBGsCunMsU/5l9NLgZvGGhbHnDnz/5ABVqDX/1l59C1ZOTIxOShQHQXmz8p29iXHV1QfkjloN5EzvRXGn8Wo8XFkb0D9JxwtO/CZV2+hh0kYMtswzBTE43KptJ4TfotPjCffKVCOCaH6AyrSt9qndslUXpMvPNK0BJqRw0ylSZELW8PN42S8IOKoRAqq6kSpWnT8H6/R2UPjTSi+jQubfGTelmSpziiTJr9eBbBMBprR57iSRQENjRuZXQNGxFXu0ihEOASL28uLVdq6ALE3/lA02dBdCIyE2l+lSJNwUHtjZxcQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v7SthPcmghn3i3aykKGC8RZE1iF78w64TQFSDa4GfUo=; b=nleNBZAy1murR8BzEIZFSxpGa1p6/M5pHM1sF8wRNlEA0+Du0sv8iXGxNp4OqBitu2as0G0wdwKkLgs6ScCOOpn4h/OYc7HqQhdzwV/4nPotbxyz8rZTAjKOvFM+jj4ALeuIDzhjFgJ7PSqlSfqNor4VwzWbQHKloVEhQdaBsqA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by PH0PR11MB4902.namprd11.prod.outlook.com (2603:10b6:510:37::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Mon, 27 Sep 2021 12:13:52 +0000 Received: from PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::d145:710a:1bac:7e91]) by PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::d145:710a:1bac:7e91%9]) with mapi id 15.20.4544.021; Mon, 27 Sep 2021 12:13:52 +0000 To: Xuan Ding , , , CC: , , , , , References: <20210901053044.109901-1-xuan.ding@intel.com> <20210927074806.90020-1-xuan.ding@intel.com> <20210927074806.90020-3-xuan.ding@intel.com> From: "Burakov, Anatoly" Message-ID: <534b1a11-08a0-835f-9512-5a9570cc58cd@intel.com> Date: Mon, 27 Sep 2021 13:13:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.14.0 In-Reply-To: <20210927074806.90020-3-xuan.ding@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB7PR05CA0060.eurprd05.prod.outlook.com (2603:10a6:10:2e::37) To PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) MIME-Version: 1.0 Received: from [192.168.1.10] (212.17.34.161) by DB7PR05CA0060.eurprd05.prod.outlook.com (2603:10a6:10:2e::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14 via Frontend Transport; Mon, 27 Sep 2021 12:13:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3f30a44-56d0-4744-17e2-08d981b0454e X-MS-TrafficTypeDiagnostic: PH0PR11MB4902: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 71AZ31ukuC1lr5KATXk9YLkmCRXwNxfF1JxSBZ5aNHBH2fsFdZdBCQYwhpv9NG4buWTELg0C2RfSb4tQ4jfsVBwIJEEujfY43lDuyGnPAZvAsCON22ZKG9IQ75Fke/y/+ar5N7qp20gqFqbyioM2ltIZQFt3dt5YHK5iafEWck8vR86ZyFjRprsPkG0Zc6toAysjs+zaSVBNGsN49BUh3pYMy4zfeg8XTJfNAPkTnPi17p7nV8XNqwoI//CGDL4vut33VWtTBui9gAaBncFzlT2W/HecyYkrmpJUA2zTgfr90/0lAeL7eICTi/dVHwSTMaZrHcVJSvxlvv9Xgixw+RUG8OO81CqWD/lzylou3LxqTbfvDcyvI51Jr1Dk7xpR1xpUVsvbJnOcrB2FO0YYVIOiC/t4azYs5UxQyQqSUe8jlI2ZIYW03Perk3jbYdkJgV5bWyO3et8goHygqpfIV5IW4/gOfreqGHHaaYieN2EnJjsRn/uFB4AJvPwrqMoPm6T5TcI69920fn61X9OLmaekrL3XZ+xNbaYBVVHkqlyweDn53d6NL3vAnSygK/AcSa4bJMMEOESjU4TS7Flah566WUzFSbPYeea9LgFLCNtIqZ2TY0Keg00S2dnDYnRdltE2bgpyFNaSTHuhGQiWooFqh9on2KZMnDO+paudPiLvEF02UfnyACppBbM37IHk2gh6a9kefD2YuEU5HpgNzf5jBetht9BcxK9ynEd+7eI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5093.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(4744005)(316002)(31686004)(5660300002)(53546011)(38100700002)(16576012)(26005)(8936002)(508600001)(956004)(2616005)(86362001)(6666004)(186003)(8676002)(66946007)(66476007)(66556008)(36756003)(31696002)(2906002)(6486002)(6636002)(4326008)(107886003)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?emYwMjVuYjFIdSs0NXdkbGFzSTFHeThXWWk3VFBnS0VnelhmdG5FV2c0dysz?= =?utf-8?B?TVF5MUo3SHk4SDBCa3Q5bS9qYXhRbkJ2UWVucnNiMjI5eDRTQkRtZGdnZXlT?= =?utf-8?B?OTcyNy9lU2F2c05VNVFBOGRSUk1za0RDaGFkbGtmVUFCZkdFVDJlRDdGWklo?= =?utf-8?B?NTZPYUZPaU9jNDZSQndQZXR0UUlhTlFCKzVOdjVBS1lJVjNXVzZGMC9aTzhI?= =?utf-8?B?V0UyLzhjS1VvYzNYRVMwUFJsOGREeURVOG5GV0NnM0YyR0F3cU5UV1pyNU40?= =?utf-8?B?OTRLZ0VBU3VWTGxjNFlacmFTOHMwOFB3REZSTkVIcy9KenVDNjNVTWtZOXVS?= =?utf-8?B?Y0h3QU9hc1VQTWFJWFBzR0tjOUVsb1FQTGQ4Y21IeWNMakpmSFFWMUs1cUhQ?= =?utf-8?B?alB2ZDZzNXR4WDRYMG93ejZWRW1uUForQmgwcUdIWE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zMDgvcjQyeUY0NFlUMWVjNXRlaGYwd0RoN2dI?= =?utf-8?B?SmwvWEc2MkZwNVhKaUYrRWRaaVpGbllacFJhTEltTkhydWR3YVBLbUhOb3ZO?= =?utf-8?B?ZUJ4VUMvQjRPUUZoN01iYWc0R1QvRmpLdG8vTXltMVl1VEFBVUExejJpZ0c2?= =?utf-8?B?ajVxbENPYmtHbGxic2xxU1Jua1gwb0U0bVJ5Mk51ajBCamwxMG9xb3d2MjdF?= =?utf-8?B?QXMxRzN3aTFId1hlOXlvYXY1K3RzYnR2TDZ5WFhHY1RvS0k2cDlvRzFvODNx?= =?utf-8?B?ODZVcHlTeHgwT3FmZ2RRYWVuNXc5Um00ZXZsMzBFWmo3ZU13d2Zxd1VTcGpK?= =?utf-8?B?cnRIK01STWJCRWQrWkNmV3VETllxQjRlZ3hOU21kV2lDZUE2bjdqTk9HUlZm?= =?utf-8?Q?ZN8ltzP0OmEN0VltMJusyr4+I3HqIqgyq6WHV6d?= X-MS-Exchange-CrossTenant-Network-Message-Id: f3f30a44-56d0-4744-17e2-08d981b0454e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2021 12:13:52.7853 (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: wZOVwcpJ3FZAMt3pLzHO7mM+bfX0Bs6USHXIR3X/Miz8QPIPozf/ZgyQAdOcppWLb9BdeJpoOba6COU2rXpMPcbXXACxoi//nQ2D2ihh7c4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4902 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 2/2] vhost: enable IOMMU for async vhost 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 Sender: "dev" On 27-Sep-21 8:48 AM, Xuan Ding wrote: > The use of IOMMU has many advantages, such as isolation and address > translation. This patch extends the capbility of DMA engine to use > IOMMU if the DMA engine is bound to vfio. > > When set memory table, the guest memory will be mapped > into the default container of DPDK. > > Signed-off-by: Xuan Ding > --- > /* Flush IOTLB cache as previous HVAs are now invalid */ > @@ -1329,6 +1424,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg, > goto free_guest_pages; > } > > + if (dev->async_copy) { > + dev->async_map_status = rte_zmalloc_socket("async-dma-map-status", > + sizeof(bool) * memory->nregions, 0, numa_node); Would it be useful to sanity check this to make sure we're not leaking memory? -- Thanks, Anatoly