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 E1A0742C55; Thu, 8 Jun 2023 03:33:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85677410D3; Thu, 8 Jun 2023 03:33:32 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id BDE1D40042 for ; Thu, 8 Jun 2023 03:33:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686188011; x=1717724011; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0HQYPuxPe8a9PR5AquaB/f6UM1nLkwbD1Rnd5+rm3Uo=; b=hdRuMWtZltRFgzEWnWNeh3UJBSr4Vy2V/v6v/tQWo7KFO8w233axq9SZ bYAbsOftvK9kln3L8vnbDKfLbRfUiIxj3oojW8w/LFQGcSM66uD15zmSC kRrlSmiUnAuuObfthOD2EMWRZqmBdJhHk8vwQaUgnSeCZnwdsCnNmerfq jEa8K8hbve5g2UKo8kjrrJLVH8NakJhHKtZ3U5PlwjPA7TfVJ5FRqhimq XPVHDdnEDIj5X+hY6Jyg1l4sbDd0XSsF6FPskkhnT93tLH/wQvZp7mwdm O05cfQd/QbLNW/IgOpfQ1zZDo9+2c8iSqn5d4H2d3jBxG1dlXkmT7c8AK w==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="346777950" X-IronPort-AV: E=Sophos;i="6.00,225,1681196400"; d="scan'208";a="346777950" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2023 18:33:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="739508352" X-IronPort-AV: E=Sophos;i="6.00,225,1681196400"; d="scan'208";a="739508352" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga008.jf.intel.com with ESMTP; 07 Jun 2023 18:33:29 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 7 Jun 2023 18:33:28 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 7 Jun 2023 18:33:28 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 7 Jun 2023 18:33:28 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.42) 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; Wed, 7 Jun 2023 18:33:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O0R1BVCkulZQUW6FK1bJAyIttku/oql6rmLIxUzEtPjLgHjbY2LGzrvz2tZoZAtZLQ/ou/TZbxW9sm0lBqizc0Nr5uW7xGCg8UaZC0CNtcba6tLaROVhnZwbW6L5xFWSh0NudYnT7shvRjd9xAbALCXwt8ZzSg9bW7fA6fTL7uHWqhE3xDYHcu6hpyb4AZUEIkWInCyKvQfiOjCFJpkrgR0ciksfc40NMcJwvPFMdkukuq9VBCvchZ4c5NQ5QKSZfdW0Tblcwo97XpqrscPRnsqfAI+UIX1QAlfDu/LltRUTjrF5xww1txI0y0eswgjXbdB3rzIdxlEfu009wwwYkA== 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=+pu6AhnWyJmqD4IyLnM3K9/oddpmEY30XCUrhBXwiIk=; b=B49Z1KEU1ERNPPLmprug+ovQwrnmnCYmU7w2q6egz6GPh+EIkX0SSiBIxYuGRpCZO+bI+8cq+9pZCFRPrbHMQ7clVzKC5bIVWozz8p485Fl2yenJ8Mn3MKBEj1xZFCds1NuhEzdugU5+TPer1FRr3PuUs8IncH1riQRRyW70OYozQC4GAnkXZvgYh0Uf2hwl4zFy/7vZz1Kk3+tQSZwyvRBlraqjfYV9edA9lXitnwe6LwPOxsVr81BacjspCFvwxG+KxPgVKl6IBJ9fJBIJTDT+/rekpPnlRUaWtn4GG8IgNtqJXnbvqETFafrrDqtW49VFlXOH3URZSyh9XvdOuQ== 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 MW5PR11MB5786.namprd11.prod.outlook.com (2603:10b6:303:191::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Thu, 8 Jun 2023 01:33:24 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::e508:44ff:3d34:60bc]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::e508:44ff:3d34:60bc%4]) with mapi id 15.20.6455.030; Thu, 8 Jun 2023 01:33:24 +0000 From: "Xia, Chenbo" To: Thomas Monjalon , "Li, Miao" CC: "dev@dpdk.org" , "skori@marvell.com" , "david.marchand@redhat.com" , "ferruh.yigit@amd.com" , "Cao, Yahui" Subject: RE: [PATCH v4 0/4] Support VFIO sparse mmap in PCI bus Thread-Topic: [PATCH v4 0/4] Support VFIO sparse mmap in PCI bus Thread-Index: AQHZk4IOhKn48ohd6Um0RMLPVQnjRK9/k9uAgACXDsA= Date: Thu, 8 Jun 2023 01:33:24 +0000 Message-ID: References: <20230525163116.682000-1-miao.li@intel.com> <20230531053743.129442-1-miao.li@intel.com> <3692203.tiCG3LdiiZ@thomas> In-Reply-To: <3692203.tiCG3LdiiZ@thomas> 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_|MW5PR11MB5786:EE_ x-ms-office365-filtering-correlation-id: 789f5973-2dc1-47a1-8d33-08db67c059e3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5itvxuM9vjpWWrOJKG7QPYJQfyHoG9d+FSX80y66uFLVfk+hdac3hK+szS8j0QPJi4nFHdZO52l69s3RfZYuVC9/coonXJfn+ERAxtFbSTQOs5DUUhD98cpkcj9Yvl3xVv+We6W19Gr0D2Z6bRFONJrSGqctbEw6C48Y7eLCXelHsXTorz75mgpGtVsUhU2kG8sjv0cD2K/J0MpSZsYHif5Ns3wMKzzDtR1nkz3ykivGBXtvbu7SNqQveLOONoJsITrt0p2+sPvtIBnlS2oDIX78HPvjWYEAtoyVLNlCL6O/zxqirwFoJvvK4gw/p5rvCrU4v0Nq8W1BnnN0Q4EezDJcws+lpWEGlNTgQsdqkBFHgK6wGttc4n9tJJMgUABtkskkeFEQ1KeYxClPm+lo7jl+51PRs82Znpz9NvFQdV0/iBTD6eNnOaCAhOkfSZq//m153AxjxKlc3vgr9IZOQjv7S3b/fcljDJBk5V2BsHfSNU9vXn2ORP04m7SoDYY2lgG2gPWYHfiY+kF76F/g79zZjrY7ofMUr1XnzMocIgSP0vKy07nKeDQoFmJItXai1wjbtKb32fdKJjNgA+iLRQOxdrV989G4TFzi3F4CqXtK9yQ+vPMWyEnP72F+2HoN 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)(366004)(376002)(39860400002)(136003)(396003)(346002)(451199021)(66476007)(76116006)(478600001)(66446008)(66946007)(6636002)(316002)(2906002)(64756008)(8936002)(41300700001)(4326008)(8676002)(110136005)(54906003)(66556008)(5660300002)(52536014)(7696005)(71200400001)(26005)(107886003)(6506007)(9686003)(53546011)(82960400001)(38100700002)(55016003)(83380400001)(186003)(86362001)(38070700005)(33656002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?X1Y/MDh7eYkyjboS8sJHRglIKFnwqI62HvMps0//kyDr9VdgzXnawi7lZmSI?= =?us-ascii?Q?HcgoCbiP3R0xeMT4HwEtsXtnkNwTIPIUk5uS+VUoXvehc4Xi0ojKHG6cI6MO?= =?us-ascii?Q?XpbInc8NNwrbynEpWtTy2iQOLzGqP/1jmZa/Ry27mv/vfK9GHUOE8nVxv9ud?= =?us-ascii?Q?UH808+leAS3IRGCOBb0O3SbNQHtTmtizegh7HcGjFbLU1gfCeB6tF2fwXCZn?= =?us-ascii?Q?ItOoI57+Vhzyu8lcKFh0dJgZMz46jzYivzlq+fdIN1JVGPsi9CO16vMqCsU+?= =?us-ascii?Q?58gc+8sP7UNHtAXSviPtC5pEgVIBY5SSa6HOEHUfaB8pLA89mvjOBxoI2Ryt?= =?us-ascii?Q?qZa557ZIePvIbPsbALkWrX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ascii?Q?pbuajB4LK5Xjnc4hkD1E9UP8hpbvFxqFqG25aYl6utU37mqJeUQUry9TojP+?= =?us-ascii?Q?CUb36uQUzvVLSIpFnBaOnci3bDCzbOZifue8p93JeujYyHMdLhG/muj0RDmk?= =?us-ascii?Q?usueWqLZySi7ilzL5RGA+w7Y+BIwRr3/XzVZYjvVOgVtVRJr+yzLXIyVzXSA?= =?us-ascii?Q?HAA7ROwv/8hlfLIT0q9yujM2ptc2KaS9aB4YSEK4BujM0ywUxMU4i3+uZ1gs?= =?us-ascii?Q?kJFWLl8U4GJs+mPrsmRGpV7UUMztCTiVg8oFmY9gU39EZjTSONarKzRobZ7+?= =?us-ascii?Q?S0z9u7WcPwN1WdnMWP3TaKOSSwPcftWDUnnYdg7F?= 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: 789f5973-2dc1-47a1-8d33-08db67c059e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2023 01:33:24.2007 (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: vHRJFEOKv+w+rh5eAV82ApE4rYJZKQXvUGnYn0RVa9X32BzsMOncEJo82KJN8OHO5fBLtrxQZxo0cG9vYMXvFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5786 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 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, June 8, 2023 12:31 AM > To: Li, Miao > Cc: dev@dpdk.org; skori@marvell.com; david.marchand@redhat.com; > ferruh.yigit@amd.com; Xia, Chenbo ; Cao, Yahui > > Subject: Re: [PATCH v4 0/4] Support VFIO sparse mmap in PCI bus >=20 > 31/05/2023 07:37, Miao Li: > > This series introduces a VFIO standard capability, called sparse > > mmap to PCI bus. In linux kernel, it's defined as > > VFIO_REGION_INFO_CAP_SPARSE_MMAP. Sparse mmap means instead of > > mmap whole BAR region into DPDK process, only mmap part of the > > BAR region after getting sparse mmap information from kernel. > > For the rest of BAR region that is not mmap-ed, DPDK process > > can use pread/pwrite system calls to access. Sparse mmap is > > useful when kernel does not want userspace to mmap whole BAR > > region, or kernel wants to control over access to specific BAR > > region. Vendors can choose to enable this feature or not for > > their devices in their specific kernel modules. > > > > In this patchset: > > > > Patch 1-3 is mainly for introducing BAR access APIs so that > > driver could use them to access specific BAR using pread/pwrite > > system calls when part of the BAR is not mmap-able. Patch 4 > > adds the VFIO sparse mmap support finally. > > > > v4: > > 1. add sparse mmap information allocation and release > > 2. add release note for BAR access APIs > > > > v3: > > fix variable 'pdev' and 'info' uninitialized error > > > > v2: > > 1. add PCI device internal structure in bus/pci/windows/pci.c > > 2. fix parameter type error > > > > Chenbo Xia (3): > > bus/pci: introduce an internal representation of PCI device > > bus/pci: avoid depending on private value in kernel source > > bus/pci: introduce helper for MMIO read and write > > > > Miao Li (1): > > bus/pci: add VFIO sparse mmap support >=20 > Applied, thanks. >=20 > Is there some drivers which may reuse the new MMIO helpers? Yes, we will send patches to let Intel drivers use them soon. Other drivers could start to use when they want to support sparse mmap. Thanks, Chenbo=20 >=20