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 D006C42BCC; Mon, 29 May 2023 08:31:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C151A410ED; Mon, 29 May 2023 08:31:57 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id A12EF40A4B for ; Mon, 29 May 2023 08:31:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685341915; x=1716877915; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=gjErllM6gLmIEip5BPuxPeUH8hqGvNo5ddSK/7nSEw4=; b=dBb3sCqGaoJejygByot6j3ZdNTn53lpsfRBZFj1SHZNVsY2AipZND9vk kcr52VpiAbQ+am1oux3LrQpA4myp1S6OAsfsarJW74QilrhJByVq8sA1j lj0U01BPkI1sp9v3sbmJTt8zEj6sCVH0GpfLiwzxc/iiZg+adZ1ByjXCc 1HJcHZ0NZNK8Ctoyl41f4gMPrtJrKk0+tkJXciwlbspiX+zMEc/0m+qy2 OaACPlvxVW4uz8Dch1e97CeB8pJ7yifYv+m5IHeEnfoGBRyqQgvehR7mF 7WZkUclp1cwrvSkyqrHrwUiOw78G6XM/GhhZ+eWd+mvcu1UzZOphlx8Up A==; X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="420391851" X-IronPort-AV: E=Sophos;i="6.00,200,1681196400"; d="scan'208";a="420391851" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2023 23:31:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10724"; a="775816706" X-IronPort-AV: E=Sophos;i="6.00,200,1681196400"; d="scan'208";a="775816706" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP; 28 May 2023 23:31:54 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) 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:31:53 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2507.23 via Frontend Transport; Sun, 28 May 2023 23:31:53 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (134.134.137.102) 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:31:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dG3Q6B9LOYUTREdDbio8e00xMjA5PQqih4g8y1m8nvh1za3DMzYl4CXWxmgAtci3Ux2s8tRFoTGut4qoO07YVC5Kdqrflq2uutqyOvTpvlYh5ems6ELtZ75gNZ/IZxQh6p31vgAbu7WHlPFPem4PPw9SL4kZqTQ8xgqEzfkrTkgFoVZrQqBNG/9GozakJCyR4m4MIydyHW5xpEPBf0W34WkTGxf67abEDEHaZFdJqE7/Or5MlUir79gyk5zeDv7tklX3a0rsY2u6T47+Avk3QNHILPMxy0AP2zmd+cdJ0L9HoZK6gUDGNWkYZ2P0NRXulwdrTW8xNQZZzfVelfUUQw== 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=r4guMhAqmyQdEmPWI94ESyO8Am0tLI4TcF1q6jWQ7kM=; b=lr7eQC7VZ18Dr0bQU24a2gcFXWgqARXgpOv68LfcOgDFbM2o7G8NZ1iURTtsrPh67l3TQO/Zor+r2AndN1cLbLHYCRIwJzy+xUfH+u7eNjvnj7SHmh3kacqyEflogUigwnb23J7nH3tCOoU8OEDcD0PwcNsJq1TxU+/f1sTlB8Gev0fZ77fioEqLo1Ur6Ak4nS6w/1snVtoajKgALzjITc2g8cEtPP9z9tg7+/EqWvWK7Bvih859eOW4luJj4+a9tgFOgGB/kyUnRKGQjS92ieMSVGe6fEDbGGwD3WzVVEC/2//QNkOPP5PMPBsr+RcP/YQsIhdoAq6WgQwEs/X4NA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from IA0PR11MB7838.namprd11.prod.outlook.com (2603:10b6:208:402::12) by CH3PR11MB7204.namprd11.prod.outlook.com (2603:10b6:610:146::21) 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:31:52 +0000 Received: from IA0PR11MB7838.namprd11.prod.outlook.com ([fe80::25bd:1586:f523:bb3]) by IA0PR11MB7838.namprd11.prod.outlook.com ([fe80::25bd:1586:f523:bb3%6]) with mapi id 15.20.6433.022; Mon, 29 May 2023 06:31:52 +0000 Message-ID: <0b77c594-ebba-8ae0-e8da-f48ad631bf33@intel.com> Date: Mon, 29 May 2023 14:31:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH v3 3/4] bus/pci: introduce helper for MMIO read and write Content-Language: en-US To: Miao Li , CC: , , , , , Anatoly Burakov References: <20230515094124.722431-1-miao.li@intel.com> <20230525163116.682000-1-miao.li@intel.com> <20230525163116.682000-4-miao.li@intel.com> From: "Cao, Yahui" In-Reply-To: <20230525163116.682000-4-miao.li@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR02CA0043.apcprd02.prod.outlook.com (2603:1096:3:18::31) To IA0PR11MB7838.namprd11.prod.outlook.com (2603:10b6:208:402::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA0PR11MB7838:EE_|CH3PR11MB7204:EE_ X-MS-Office365-Filtering-Correlation-Id: 865223c0-51f8-4ca3-8ebf-08db600e6389 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TRv3U6/9Wpgqq3iNwNkr9xPyWywddVnfybyK8u2Fpylovm11BFZdPicwt5eMjMIdGqCxyae6n4elcPR2c2KVpo4ZG8fZp7r2DEuY223Z0HIYsNphGsefp8CqWbnn6Feq4PttnwEH4jSKnLjltZatF+TmP730Z2MzyDdPwi5VB/kyK7AQ/tyLKsK6wXDmwoPpGhh5S7ImjuSBY9XfH0axq/aAxf31BPE7c9c5LM5tr6Eg1PRBciHgXBIZdd+frPuAyxXaYgaZkLeO3JMHOHW5b0so7AmMmZXbNZnyODCr8XmGhLEobheWBhGUA840AimRIb6nBg37OqBWLQeWJBwVQY0wnoK8hj3mbaHxJqhdtoT1rItelgeIkIB986qbWF8ZTOK0brwdihXJbsS+VZ8j6fboLQZVKBRbxoTuagjdeZFEup08oM/MRpZSVWfrfFzh/bYK4xcr0LeEOeRa4TylWABUqEKQkBTWujlzP4BujI/7D+GQYPHDwFuoz5JJhhKU+9vzsYe3/aQhHvH6VcHqVeZkQENEZIBS1JxvcShutSmCBVzgdosdEzKvNjT8frtI7xxU/Vxuinoy9NLHYXwAlt3JBtQbBh9jV/BDd3Or8sqrS1I6k/sALxk/ukodllcY9XQVH4fhavXxtcLimDY9kA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA0PR11MB7838.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(396003)(376002)(39860400002)(346002)(136003)(366004)(451199021)(31686004)(82960400001)(478600001)(38100700002)(86362001)(66946007)(66476007)(83380400001)(2616005)(66556008)(31696002)(4326008)(4744005)(2906002)(6666004)(6512007)(6506007)(53546011)(6486002)(186003)(26005)(316002)(41300700001)(36756003)(5660300002)(107886003)(8936002)(8676002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VStWeDJ2aGt5VElVaTk5VjBzOEtUMWFIaFJwU1o1WExwbkhpSE5IRVNpejdj?= =?utf-8?B?UllGOW1kblJZb3MydVBPcDIrVFRvUEhtQ3lTdnNsNGdwY1RoZUxjZ3FFeDFH?= =?utf-8?B?S3h1RUE5RmFUUmsrYUEweUlnVWdqQTYvdjVzWWlBbHo0R2FSQ1JENFVGbjND?= =?utf-8?B?Y2J3ckJNU0NWN25BVVBUbmFEZ1dUSHd6WWtzOHR2MGFuYnhHb01wYjhGeFdQ?= =?utf-8?B?ZUNsUVB3QlBRMXgzZUQ0bXp5cStGUTcxZ3VUTFdpYnB4NW02MG1xcjhsc1lC?= =?utf-8?B?R3dyYzhGQitkZGlDb3VSZGRPeHBTN0RkOEhQRGdyTmlQSzBHYjdwVmp5c1dI?= =?utf-8?B?dXdPdU82OEowaDhhc2ZOdThUdGdJc2U0cFJpb0pscDc1Z0w0S2s3SHRZSUIy?= =?utf-8?B?TXpkaCtJSTlPckNMbDlOR1cxVUttRlp0ZU92NU13NUZhSD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azVSME5GeCtkS1BZcmNu?= =?utf-8?B?K09XK0RHS2F4OTNRU09MWTdmQUQrVU9KVWNRNVlHMVdVcHhMR2d1TURTZ3Fz?= =?utf-8?B?OTR6Q1VQdEJOR1R5ZldVbG4yY0ZxS1hKcHBIOFNJZmg2aHUra2ZPaHpINXdi?= =?utf-8?B?b3dRUTFOaWZPZSsvTU8ra3NtalVHaVdMMlkwL2JHSFVGcmUrcVFQK3NxQ2RB?= =?utf-8?B?RE05V2VOdXM4bCtENGJVY000bE1uQTJJbHh4Vi9uMlZick1oSWthSHNXYWk0?= =?utf-8?B?VXB6OUpvN3V0RmNBMWJiYkhITzRlTGpqNVdvVXJSVitMZ25GaFNEQ3J3U0xT?= =?utf-8?B?N2YyME9SbGR5ZHhyN1pKZ2U5VDJTYkxvajZkQXIzRVlzRExva0d1QTN3VG1S?= =?utf-8?B?Ui81ZDl1T05NZHBlZGJLS3hJVE9IMDFnL3FaTHkyN1lhekhjYWN5MjJFdzJt?= =?utf-8?B?TExZU1hMZEZMUUdYMzhaaVdBa1VyT2M5b1lhOFRIaU9RTXc4UVMrTFNyMjJh?= =?utf-8?B?bTZGSGtib0dlZ2VtNEEvemRaSzZoWHY3OGkrSGZZRDdBTmFUUmJkSlg2WUhv?= =?utf-8?B?TzNVWjFkb01SR2NFcndOWElUbTNvVTFaNzNjQ2orZktySFFIUVFCbkhHZHdN?= =?utf-8?B?Y0Fha1NrREt3NjQybnZoZFNHeDNFYWRReFdPUk83Qm9wR1FrSW5qWDdQUXN6?= =?utf-8?B?TXRVeDVQclJjRS9peEtHS2RwendWMVBvVlZWMTR4Q1ZLMFhDS3hEaFFuUkQy?= =?utf-8?Q?kygAqNwPEG6p0NFSdK/D9evwT?= X-MS-Exchange-CrossTenant-Network-Message-Id: 865223c0-51f8-4ca3-8ebf-08db600e6389 X-MS-Exchange-CrossTenant-AuthSource: IA0PR11MB7838.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 06:31:52.2598 (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: 5AWnebK2ZbbSgEn4G4XsX5D+anzy7WC9H7ntW04AfijhuJsG/PQMcjATNL4V393jQdjjXbG1EdBHQPW0leLOYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7204 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 On 5/26/2023 12:31 AM, Miao Li wrote: > From: Chenbo Xia > > The MMIO regions may not be mmap-able for VFIO-PCI devices. > In this case, the driver should explicitly do read and write > to access these regions. > > Signed-off-by: Chenbo Xia > --- > drivers/bus/pci/bsd/pci.c | 22 +++++++++++++++ > drivers/bus/pci/linux/pci.c | 46 ++++++++++++++++++++++++++++++ > drivers/bus/pci/linux/pci_init.h | 10 +++++++ > drivers/bus/pci/linux/pci_uio.c | 22 +++++++++++++++ > drivers/bus/pci/linux/pci_vfio.c | 36 ++++++++++++++++++++++++ > drivers/bus/pci/rte_bus_pci.h | 48 ++++++++++++++++++++++++++++++++ > drivers/bus/pci/version.map | 3 ++ > 7 files changed, 187 insertions(+) > Acked-by: Yahui Cao