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 B7E3443337 for ; Wed, 15 Nov 2023 12:26:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF9C34069F; Wed, 15 Nov 2023 12:26:26 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2066.outbound.protection.outlook.com [40.107.93.66]) by mails.dpdk.org (Postfix) with ESMTP id BF2DC40285; Wed, 15 Nov 2023 12:26:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fbXyrdzAdookvUm5Q2RQVki+WMo3c9va5Q2lgQ6ENtYN+EhnpevcjBFlqxwPVkzK5OccLt/XAKff8KFU8r333u/Td3vu2DfqOkcIPxrkJ6eeFPfVNuDbHeJtlNvirx9xrwoAva4+4UcsI24pQQ7u+PrnyWH6t7QIdGBgg5sgSkWwS8tdIkWpCs734thiLNmUv039e5zDGJRz3JnvZabCAjhvHJngRxRSQ1/oCNheOCEwOFjqy64WP1qxX/8lKAOlneuCF/2ZiT/oFtrM8dOmBO16mWLOMqnhVej7gPTxb/Dp7XhvIVliTly3llIcuN18n3th14OHKh37HitEJNlxxw== 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=epL8kBGfgwRKip+sLLV5Ix1HewLS/UNhMajY/3B653M=; b=cHmL5Z0B4N/dS3+3zf+Yt4pO63sFGhVkfmtaAbtLPPb6GXoKDCQ7kxfXca1cdTFR+Aoxlan1I1lvNbXeoTgKF2LnXoS3+wFjLTw55H4cgfwMcDNKNI7YqOeb3HqJY4VaEc2qzo3Jk3GdovQ2DzZ/g1n+RwclkH8b5JfUFrIJmQsYTcMSbwulhgoOL/c8MmSebH3T92JJgdqIYCd8qxOwa4Z9UA9sUjbLNCPDsI4RAdf9sj9tQvj4awdRI2CSdo/JLjO47HlTN+/TmDAg8Ywf6y2jdW5ds2G59dq5ACCUW7y3GR+zCLSn9D/4B5wO0CSHedQQGaE0bldi7Vx0hLzjOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=epL8kBGfgwRKip+sLLV5Ix1HewLS/UNhMajY/3B653M=; b=W7WTFaUrCPs3F8XzVBkZa2a/CILfnGy0/Iy1d90lK4X1RLY1ZFjq/X6UnA+vGZeVQJO63ZMpvWmlMbbEkLexlxvGG/JiyUUts38Imiyjxzzufg+i0B3XJvUaUw7vg2sn5nDNqo9SZuNPO0BiKQnjOGuR+mDSrxKUsGAMyZ7eaeE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) by MN0PR12MB6342.namprd12.prod.outlook.com (2603:10b6:208:3c1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.20; Wed, 15 Nov 2023 11:26:21 +0000 Received: from CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::1ff1:d311:1f3a:5b42]) by CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::1ff1:d311:1f3a:5b42%7]) with mapi id 15.20.7002.015; Wed, 15 Nov 2023 11:26:21 +0000 Message-ID: <0cab9f52-b9e7-49fb-965d-6827188419b1@amd.com> Date: Wed, 15 Nov 2023 16:56:13 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6] bus/pci: fix legacy device IO port map Content-Language: en-US To: Mingjin Ye , dev@dpdk.org Cc: qiming.yang@intel.com, stable@dpdk.org, Anatoly Burakov , Chenbo Xia References: <20231024020021.116278-1-wenwux.ma@intel.com> <20231114102418.409285-1-mingjinx.ye@intel.com> From: "Gupta, Nipun" In-Reply-To: <20231114102418.409285-1-mingjinx.ye@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PR1P264CA0068.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2cc::6) To CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR12MB8308:EE_|MN0PR12MB6342:EE_ X-MS-Office365-Filtering-Correlation-Id: e0f091e5-e029-43ca-03fd-08dbe5cdb15c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5QoWf5pLgvV+jZT+p3d48nyA73TDwG5uS5ODKAdkbk7H98IOTHbcZsAl2k2TVeEmtcwEVMTqfOJX9a+JRHVCUXGRtlfJkOhcjpTQVS0dalvV4IGRJH6cNteU1uR7w7/AoDQfuz4EEQ09aVSxDjn/3YBYdexwBW3ErBjLZmfMfPZJdzkj/yQVXFaZjoLzD+wWzRwte9qLaNgI1bNZi1ieOxGJbhIMoCPXNkk6cyp+QMlbnx0vDgkj7A5HYCFxtpLooDGD0c1jiyE0IEP0g9597D3OXZV6K5Lk4W240wFJWT6HoYZRMEVNV2lIR8azc8Axr48tFK48/8ykWyCL79xMs4KXuktRxMYtkhd2M22oxGp+h3ZtvD1ZUz63gLLzyVIDiTthRIyzUlhUYEjTGGOk91qN8eW430Dd6aqEXQ2eM0WlfxnRwZvzoM6Q/GJU6ZMjIewC5NURRM5xyauFLnQwDrR9Moa/PD3/RmHL0CEa05CTXNnfQCeW8NIze1ehlSyeZuzVQSQWgbRNP8tUCnEBs7AkLIxno70pGETzJwGDHbfW4uMdobQteFYIJqDLPukVsyo5SPjjZrbPC3soy2M0b+40RkV8+28s9tvhw3GA/effeZL75M/Y5oaGX1nbC2oVizy0vFpc/EfK5K0oe3HNow== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR12MB8308.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(396003)(376002)(136003)(346002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(38100700002)(54906003)(66946007)(8676002)(4326008)(8936002)(66556008)(66476007)(31686004)(36756003)(41300700001)(26005)(31696002)(2616005)(6512007)(6506007)(53546011)(6666004)(478600001)(6486002)(2906002)(316002)(86362001)(5660300002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UlV3UnZFWGlWbks0bFVjNktqZThRNFdOWXhzTXM1aXp2Y1gxL2ZhK1FENlVH?= =?utf-8?B?dnh3VWZVVHNHZkFaMnFDQm9oTzZlSkNHK0ZBWUsvZERzNFBuT0RuMzl6cWxS?= =?utf-8?B?Zy9BS1BJZTd4OUduNE5RcUxRNWU1QXlreUU2VjU3MlhmblVVb0gyeUxJTGFG?= =?utf-8?B?R1FIWTJoQ09wTEEwdEJpVUlReWVReWk4Vmxvc1Fabkg1eTdZK3E0M1FSQnAx?= =?utf-8?B?Tlh4UER5YnpXbXEwTHpOYjBiUkNKaUxGNmJYQ1IyLzUzYTAzV1dNdldKRjJ0?= =?utf-8?B?TjBnb3J0TWRVZm40eXNKN3R6Y0c5TTJzRWdQVE1hMDh3Ykw4eHhlemVIZTZs?= =?utf-8?B?ZmJTR2ErTWtNTk0xeTZ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g: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e0f091e5-e029-43ca-03fd-08dbe5cdb15c X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8308.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2023 11:26:21.1974 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F+HpG7re2GQHQnAt1nuJ1al1NOukW6eSvuoQ4l/c+WzTJnhpv2EqoQlH0bdOEEoI X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6342 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 11/14/2023 3:54 PM, Mingjin Ye wrote: > When doing IO port mapping for legacy device in secondary process, the > region information is missing, so, we need to refill it. > > Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye > --- > v6: > - split patch > v5: > - adding checks to vfio setup > v4: > - adjusting commit log > v3: > - adjusting variable settings > v2: > - add release of device in pci_vfio_ioport_unmap > --- > drivers/bus/pci/linux/pci_vfio.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c > index 3f3201daf2..a18161c27b 100644 > --- a/drivers/bus/pci/linux/pci_vfio.c > +++ b/drivers/bus/pci/linux/pci_vfio.c > @@ -1230,6 +1230,32 @@ pci_vfio_ioport_map(struct rte_pci_device *dev, int bar, > return -1; > } > > + if (rte_eal_process_type() == RTE_PROC_SECONDARY) { Please add a comment why we are doing this in secondary only. With this change/comment incorporated Acked-by: Nipun Gupta