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 EB87243783; Mon, 25 Dec 2023 07:31:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB2BE402C7; Mon, 25 Dec 2023 07:31:01 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 367DB402C6 for ; Mon, 25 Dec 2023 07:31:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703485860; x=1735021860; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9p+mfpnsvWkXPV6YSMU+HlF4Swx9RFCbD8lUZX3i1WA=; b=eRyQXbXQ54RNoEqLZAyRtwYY1t6RLswp3tGwGWjXjlvnfQhpEuYTOoXX GsZAZLNgMUX+mqTzZ3PJFgYylbwztPzOdH72ZW+ddRsVdHAlGAV6EOhsL XqJZPEVnlJ5Z54dQYzeYvkVbqAvU7Mc1lPy/bFUqtRHto6MX6Njbane5i adpsNxFF7NRYg58tp4E7jcpJPJGos2N4QoQWe71X+Q1PEQIK5Bfq/T0n1 FFFXP582ZDd05F1vIVeTnWWqj0YoLVAUvTXlpE4rpy/LM3AMwjsbkiDly 5v/tQ51pfKC0EWmd6rKTUvJ7SrEggEOlzMynQwocoklaLhzXyiZZidhRV A==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="9790208" X-IronPort-AV: E=Sophos;i="6.04,302,1695711600"; d="scan'208";a="9790208" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2023 22:30:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="901119649" X-IronPort-AV: E=Sophos;i="6.04,302,1695711600"; d="scan'208";a="901119649" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Dec 2023 22:30:58 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.35; Sun, 24 Dec 2023 22:30:57 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 24 Dec 2023 22:30:57 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.40) 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.35; Sun, 24 Dec 2023 22:30:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLHmjNxE0eRq2+aNaLYSd2E90CiRDUjUJICQgOlWYXFVda1sS+oudz+HNc986y9pvwxDS/aUW8FLJTdzIRFoA88mW6jK2cvjyutI7RqTm7ZC4wKBDuWfvg2jErSiHTWHi6VmPOWHP0l3ZxjRHdiCefUTqhKLIMZ0rBepGthNNCa4PzU9ZoU4seSBcC+hV0ntvSp7tr1K+bs6jS3YAzwdORYjoiOLYGKpqLGh4POSzka4ypzv8QRaogUF5o47ql6cfliPeFLxANGDZlsquQARZinC7aUWv/NCM6//Jxfge4O8sXGBgE4PEju/xfaUXQjUwBgIuJYS3w0UHLqwyLD5mw== 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=LNliruW3Utf3atQobcLzXF0W/aOo9LBva193E7V1FzE=; b=gMZ8cagPQ6zScmS7+pC4Wfu/YiZPfqgU/8Lr5rssQWn621VxMLB7tc3jL6Yh72Ke9pGnf9KJYGAp15PsfxYzTcM+5Wml+0Bk5wiNEm6VhbCCsL3e2TZkONGlUK/iagR92QSTlw8ToIvMA9ZAz6fnUFf4stpVf/N+xn+R1WK2TkeeqyJLIj4gWUesl8rXh9nuspNUXVfdGyNFaAOeZ55P3xc42/b2KXZH8GHjLwOyJ1STVnUFQeilNSO6lANz3N6JckRsSQp3mp8shF96SLauVVaUdL5yP/rUrOSp70JMuRg7uH48hIxIUkLo7YOkeBAiFKlatu6IcjPOQ3IfzopOHg== 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 LV2PR11MB5997.namprd11.prod.outlook.com (2603:10b6:408:17f::10) by BL1PR11MB5368.namprd11.prod.outlook.com (2603:10b6:208:311::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.26; Mon, 25 Dec 2023 06:30:55 +0000 Received: from LV2PR11MB5997.namprd11.prod.outlook.com ([fe80::7fc4:1e1e:418e:4317]) by LV2PR11MB5997.namprd11.prod.outlook.com ([fe80::7fc4:1e1e:418e:4317%5]) with mapi id 15.20.7113.026; Mon, 25 Dec 2023 06:30:55 +0000 From: "Xing, Beilei" To: Stephen Hemminger CC: "Burakov, Anatoly" , "dev@dpdk.org" , "thomas@monjalon.net" , "ferruh.yigit@amd.com" , "Richardson, Bruce" , "chenbox@nvidia.com" , "Cao, Yahui" Subject: RE: [PATCH 2/4] vfio: add VFIO IOMMUFD support Thread-Topic: [PATCH 2/4] vfio: add VFIO IOMMUFD support Thread-Index: AQHaNMknafprzHFDlEehoWPDKO6C6rC1i8gAgAQBdCA= Date: Mon, 25 Dec 2023 06:30:55 +0000 Message-ID: References: <20231222194453.3049693-1-beilei.xing@intel.com> <20231222194453.3049693-3-beilei.xing@intel.com> <20231222091702.22645dec@hermes.local> In-Reply-To: <20231222091702.22645dec@hermes.local> Accept-Language: en-US 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: LV2PR11MB5997:EE_|BL1PR11MB5368:EE_ x-ms-office365-filtering-correlation-id: 470ff48f-7fd0-4e07-c750-08dc05130c94 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2GTgsX5NIkZMkEmtCZM6WCCs+zQ7ImapQZ74IZWYNbAGprRir9oun6PmFVhMekao5a8e+Chjk+rz0R2Sq1XU8kKj3s+hl/6Nnaahqg8uiWcK2LNKp1DYRJVl8iZhWMT4Bv2+ijuhm3FGEFYqO4JX1dDvzEspxSwyxCJI7HUPUhLyBxkJFxuxYfS9mIJK8GAnaq9w4yPNOovSGMXFd7HgUDga4Yx7HRogxpmDDWSMUpMBGs1dMeQXyGrmyIhcjJiFGK/t1n3RWmulqN7Mca0Fm4ocql/EPUnO4yQ0kjnWbnjlMrNd0SpSZWEe/QgRKeUU7sdtIkV+Qkx6rrB1uErSmq2yhgMJQw5y8kMXxwrjptSGSyN8KBQCymk0rE5NO3NsVzqfDLG8QBGvxrl0FhdFCfrzmd663OZg9Skgb/ftO7unZoNx3S/OXDlW9osRXYbCD/1n0nWzoOmPv/oS0Kn5Kvf1hs3vZMdavZ2HhwqrUM5E47C8pAi7oh32haYV9YyKdRjScYVHbCuqdzQ2hDJPvTlFZ6NYKcowQWHhgXOed2eRYrUftZ8vWNPydZL3/ngaE8++oZPUduRedfsFsncd+CCnBP6vuVokhRAFf9VeWncosMRSB0DLJWIRQzYuCMEC x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV2PR11MB5997.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(396003)(366004)(136003)(346002)(39860400002)(230922051799003)(186009)(451199024)(1800799012)(64100799003)(71200400001)(478600001)(2906002)(8936002)(8676002)(122000001)(5660300002)(7696005)(53546011)(6506007)(9686003)(6916009)(66446008)(64756008)(66476007)(66556008)(66946007)(55016003)(38070700009)(4326008)(54906003)(316002)(76116006)(52536014)(33656002)(107886003)(83380400001)(86362001)(26005)(41300700001)(82960400001)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HDU7qaumYAfDc+Mggj7FN6GTQ+ce8zJHLn+N4mofG5QSzkPYNS1RKYUJH+oB?= =?us-ascii?Q?hAB8cl6nA/aN81+h/LejPg3KtDOHv6GiB7FPNPFohfHIuIlL+byCMg55tYz3?= =?us-ascii?Q?yeKzxfcR+Zap4kqw9c0nFIsTvQLEeb4JKdvNIZOpXk2FJtuesFvB1+KlxlSK?= =?us-ascii?Q?90e9Mgk1J4wqW9SF1EHdFQA37OpNvTLr2jxDune8e4aZG/UBrwq7jTyoCofX?= =?us-ascii?Q?ZQojelMh3WAl/M6bwOUCAzASOhrJ8VKgixDoLT0t/X1Utt4z/OybER/wt/64?= =?us-ascii?Q?rIe7FUccRRLoWbnjhIJKTv+PKP0CK1umpPz5eQkQ2B7/G/ePa/mj81LEIXIu?= =?us-ascii?Q?ArN7uP8CI0uSg4XMVlshhOBA/imwm/1PhJWGYrifrLCP8ESkeSLU1EbsULcF?= =?us-ascii?Q?cB0zFf6HsMQ39Zvghhq0ZVeDQCRuuRsd0UHTIl+j14cZcpeV5ebwS4R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Fk0CxehJK7E+hDGv75gRo3wB/6ZlS?= =?us-ascii?Q?EEfWrvqppR7ZnUX9uUoTaHrro4p8cCGLQdg7tj6QqMDn/2ZBz4E89vjJX4ZZ?= =?us-ascii?Q?oV04xFXQ9LxVmWcytWhvi/JcGZq+R2SEemSlo+oULyweVwqc73gJPVFqvtBl?= =?us-ascii?Q?m7bcgkmDeAlqGghgOftm+rSW6DgoSiyZdxuYrpns2JbEbhlgmcCgN8V2k+g3?= =?us-ascii?Q?VZrFgMFijO3l8XU1Vcl81fGEIoeCahOlCLTS1xAK?= 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: LV2PR11MB5997.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 470ff48f-7fd0-4e07-c750-08dc05130c94 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Dec 2023 06:30:55.2795 (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: XaJvBYoAJBQiT0wgpSMozWraScK/dolBXADYfSzam9TA6zzoUJl5QoaLRtDuVurSw658+TK/A+ADR7P4wX4W8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5368 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: Stephen Hemminger > Sent: Saturday, December 23, 2023 1:17 AM > To: Xing, Beilei > Cc: Burakov, Anatoly ; dev@dpdk.org; > thomas@monjalon.net; ferruh.yigit@amd.com; Richardson, Bruce > ; chenbox@nvidia.com; Cao, Yahui > > Subject: Re: [PATCH 2/4] vfio: add VFIO IOMMUFD support >=20 > On Fri, 22 Dec 2023 19:44:51 +0000 > beilei.xing@intel.com wrote: >=20 > > diff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h > > index 22832afd0f..7a9b26b0f7 100644 > > --- a/lib/eal/include/rte_vfio.h > > +++ b/lib/eal/include/rte_vfio.h > > @@ -17,6 +17,8 @@ extern "C" { > > #include > > #include > > > > +#include > > + > > /* > > * determine if VFIO is present on the system > > */ > > @@ -28,6 +30,9 @@ extern "C" { > > #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(4, 0, 0) #define > > HAVE_VFIO_DEV_REQ_INTERFACE #endif /* kernel version >=3D 4.0.0 */ > > +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(6, 6, 0) #define > > +VFIO_IOMMUFD_PRESENT #endif /* kernel version >=3D 6.6.0 */ > > #endif /* RTE_EAL_VFIO */ >=20 > Depending on kernel version macro is a mistake because many enterprise > distro's backport features and do not change kernel version. Make sense. We defined VFIO_IOMMUFD_PRESENT with reference to VFIO_PRESENT. Do you have suggestion for this point? Thanks a lot. > Also, it means the build and target machine have to be same kernel versio= n.