Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3574383rdh; Mon, 27 Nov 2023 19:04:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjfuTEJGs+nJKTNBuymrNsnlerZjK/NCEI2BlvkxaWq94l99jxeLcPDitH/Pm4RcgPSLOy X-Received: by 2002:a17:90b:3507:b0:285:ada4:e170 with SMTP id ls7-20020a17090b350700b00285ada4e170mr8625023pjb.16.1701140685712; Mon, 27 Nov 2023 19:04:45 -0800 (PST) Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id s24-20020a17090aad9800b00285bd5232d2si4384526pjq.143.2023.11.27.19.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 19:04:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dNx3g8qP; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DC1D681A3299; Mon, 27 Nov 2023 19:04:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234510AbjK1DE0 (ORCPT + 99 others); Mon, 27 Nov 2023 22:04:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234501AbjK1DEY (ORCPT ); Mon, 27 Nov 2023 22:04:24 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3744191; Mon, 27 Nov 2023 19:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701140670; x=1732676670; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=WWC1xVSRh8QXNL1QpFap1maC+W1IqtK+aBXuXXxqbHI=; b=dNx3g8qPP0AGiQbzBsVG0XMHVnFkWBOEFPDjPC3u29Jw+b07F6WCusV1 HXxFM1IouQR525MZh92AfJFgGGTfsuBEudp4wz1v0T6aTnnciiFeUx8bp l2cdZO5OvUbr1I0WSd/v1yAIN4MwQOnClSCNiE1S7cV0J+Ji4nC3gFsX3 bA+c4I8rEKOgyO0XRm0FfVF7P6g3O95C8ILYUIa8p0rs5Ljx4eb3Mq3GF E7ev+DREmCPqxMLuPimXwnfrFFSEhzzysWAoFS/AYZq2ruS5m0hAVUXyw aey24QScO5gJx/dPzLyPQQkZrYJsrH0m8yzuSsGjJt+Fzvn7UOPTqp2GN w==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="396739972" X-IronPort-AV: E=Sophos;i="6.04,232,1695711600"; d="scan'208";a="396739972" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 19:04:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="834521897" X-IronPort-AV: E=Sophos;i="6.04,232,1695711600"; d="scan'208";a="834521897" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Nov 2023 19:04:28 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 19:04:29 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 19:04:29 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.34 via Frontend Transport; Mon, 27 Nov 2023 19:04:29 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 27 Nov 2023 19:04:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bj4GkgdsL96fdo+3fGGVjUcE0IIgxJntueBBDu3X1zJuwJYZkIddaVi2VlLqtjeKRgNlks4U0lMLy5/eGoCsg0XhlLk2LTXDasxUE5xg1wLWgk5pajgtXDou+WWs7qPK7molSRC+eByJHdF3tp+HCS7sTRI1Jjx2pS9GhdbKMXn5xocj+/FGxFFQxViKWgVCyFXnqHL+jOYl6/hrBK4gExvjigUHpvDBRDUuL1Y7HoTl2r7ZYGMRJt7hX5hq9ktCowbB5w6+lQ1/i2xL7BfDav83Hxaxl9VhsixVaQ5HTWelOHrz/hW/+KkGI7kWrTRUI97B3J6Ij3wWwgWA1JMa0A== 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=NT/wDMD+qg7aiUZbSrdIEg/8Dt3/Dwb4M/bU4B5rwSM=; b=NbCmDQfrFp63/dzuBXIxlNLqUr8Bq/i7BB6Kfrm8kBSoPE+TKY4aIRV2dflDlkZ9u03nz+hrWmjeJMrl50LpAFJOCuFMQUacldG5qm7ZHs+NVGfmwvTJF6d6+oXFjLwZlpolojH6g2dNfVrMtMhGKJMHl/YUmn3MQJSru9YrCZuzb5O51YfUZWs0fVv1imgfw+wFeHDZiFbINakM4MIp+1eCzTNZywHJ3fQ5E1meEkWKpmkfnXIW9/GfkFSKApYBtmV+M1hpxmCN8a7rI+87tdUDenbbXx8flqRR/whG4vGIlx//XDh/974aEYJNZwj2LGWRQkdtFQjTABsdo+3D3w== 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 DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) by SJ2PR11MB8587.namprd11.prod.outlook.com (2603:10b6:a03:568::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Tue, 28 Nov 2023 03:04:26 +0000 Received: from DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::e4ae:3948:1f55:547d]) by DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::e4ae:3948:1f55:547d%5]) with mapi id 15.20.7025.022; Tue, 28 Nov 2023 03:04:26 +0000 Message-ID: <90c4bc5d-fd09-46ba-87af-6763a46c2276@intel.com> Date: Tue, 28 Nov 2023 11:06:52 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT Content-Language: en-US To: "Duan, Zhenzhong" , "joro@8bytes.org" , "alex.williamson@redhat.com" , "jgg@nvidia.com" , "Tian, Kevin" , "robin.murphy@arm.com" , "baolu.lu@linux.intel.com" CC: "cohuck@redhat.com" , "eric.auger@redhat.com" , "nicolinc@nvidia.com" , "kvm@vger.kernel.org" , "mjrosato@linux.ibm.com" , "chao.p.peng@linux.intel.com" , "yi.y.sun@linux.intel.com" , "peterx@redhat.com" , "jasowang@redhat.com" , "shameerali.kolothum.thodi@huawei.com" , "lulu@redhat.com" , "suravee.suthikulpanit@amd.com" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "joao.m.martins@oracle.com" , "Zeng, Xin" , "Zhao, Yan Y" References: <20231127063909.129153-1-yi.l.liu@intel.com> <20231127063909.129153-3-yi.l.liu@intel.com> From: Yi Liu In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR01CA0161.apcprd01.prod.exchangelabs.com (2603:1096:4:28::17) To DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7529:EE_|SJ2PR11MB8587:EE_ X-MS-Office365-Filtering-Correlation-Id: 927cbaa6-3037-4a57-cb8b-08dbefbeb9c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ewSM6pnp1B5petKXuIB/mds0faLwb8mOmuQ8LQLVnywHQWkwWFaEwKhYzLQ+UxjoK2/ibmBbEeOA9IlME9eiHK9teKSQJoXYirJUL792oVKYHydhZ5mseOrILlRpU1VfWNMWxoVa8VEeyD1lpyKtQYA4U2pVtgBcZ/I/HE75xXdQ6vXJva5XY1nTdkW/axiUJ1uroxYJLgyWB+tWuO52xQYRRqiojbWHFJRHJ/niwgzKAACp8Y/cTPwUAgb0pA3HX4AuGD6rGGLvXrqRsuMtNgOfWNJf5yoX/ugNJinh4sbN2wDUTyGPj7DXLvX3k+2mLfUFJdoygYb0TpfzKWcSvaB62+C025dEqZOPlnhWj9QS9aBExX0eofxMSoF733au94w8i3opJ1xYIkP4otuDzOlvhVruR2+sgUwUaUjHAbrk9rosPkjHM6rusWqT4djENhLYoHNN3XI4mO6Cu6IEeGlIynqxGhNFg1JRBaQSyORf1s7P33ROzSofRRN8yMpXkBRsbTUOfxeElDdaiCRxkFM/ugxpZdMuxAHMSnvHJMXrY8+r0BD85o2AlBhuPN5uIRofrs0OK2gePx3RWDMkvbuoGpvisS2rEKJv3ol6YE7UMqM5tdm9i803GBQW4JyFjsRGl45dqfTY53ap8/Z1/c4RGN/5hhYj2IyoUobrHp4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB7529.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(346002)(366004)(136003)(39860400002)(376002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(4326008)(41300700001)(2906002)(8936002)(8676002)(66946007)(66476007)(54906003)(2616005)(478600001)(7416002)(53546011)(5660300002)(6486002)(6666004)(6506007)(6512007)(31686004)(26005)(83380400001)(316002)(110136005)(66556008)(38100700002)(31696002)(86362001)(82960400001)(36756003)(83133001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L2duRkFlbDNJbEttemM1V3BQMVVYTGtVOVpobUZCTG1FV1ZZR2k4alVZbTdE?= =?utf-8?B?T3NJZVpoVkZjeWUzVjFRSXNxOVlwaFV5UEtaV1E3ZEFmSm16aGlWcXQ0WTNo?= =?utf-8?B?bkJCaExUbEQwRG9oQitFT0ZweHZ2ZU4zRUZWYlovdFZRNlBkTD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HpxMGF1eUlZMnhDNnlUZmVLa2Q5VXVlVkMrSnRraVJla3lwZ01tRXJT?= =?utf-8?B?Uzc1SitxU2lnWTI5K2lwZmVXV3pmZVdSdWMxRGxyaDNaWXp6YnczK3dwUERE?= =?utf-8?B?OERCbjNsQlpYZ2Z4enNCVTErWTU4alNZNFlzRU1sMTh1YzRSc2hpZzIzNnd4?= =?utf-8?Q?FesqWYCTADHSq5InkPT7RwrKI?= X-MS-Exchange-CrossTenant-Network-Message-Id: 927cbaa6-3037-4a57-cb8b-08dbefbeb9c0 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7529.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 03:04:25.3041 (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: JopuHqu95AAV4m1Q4gbEFYpj9ZmzuZAB6X0Iv0bW4EHmn8rTG0K2sk2WES9kctxdY9YaZ6qea94c6VYy4CaA5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8587 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 19:04:41 -0800 (PST) On 2023/11/27 14:50, Duan, Zhenzhong wrote: > > >> -----Original Message----- >> From: Liu, Yi L >> Sent: Monday, November 27, 2023 2:39 PM >> Subject: [PATCH 2/3] vfio: Add >> VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT >> >> This adds ioctls for the userspace to attach a given pasid of a vfio >> device to/from an IOAS/HWPT. >> >> Signed-off-by: Yi Liu >> --- >> drivers/vfio/device_cdev.c | 45 +++++++++++++++++++++++++++++++ >> drivers/vfio/vfio.h | 4 +++ >> drivers/vfio/vfio_main.c | 8 ++++++ >> include/uapi/linux/vfio.h | 55 ++++++++++++++++++++++++++++++++++++++ >> 4 files changed, 112 insertions(+) >> >> diff --git a/drivers/vfio/device_cdev.c b/drivers/vfio/device_cdev.c >> index e75da0a70d1f..c2ac7ed44537 100644 >> --- a/drivers/vfio/device_cdev.c >> +++ b/drivers/vfio/device_cdev.c >> @@ -210,6 +210,51 @@ int vfio_df_ioctl_detach_pt(struct vfio_device_file *df, >> return 0; >> } >> >> +int vfio_df_ioctl_pasid_attach_pt(struct vfio_device_file *df, >> + struct vfio_device_pasid_attach_iommufd_pt >> __user *arg) >> +{ >> + struct vfio_device *device = df->device; >> + struct vfio_device_pasid_attach_iommufd_pt attach; >> + unsigned long minsz; >> + int ret; >> + >> + minsz = offsetofend(struct vfio_device_pasid_attach_iommufd_pt, pt_id); >> + >> + if (copy_from_user(&attach, arg, minsz)) >> + return -EFAULT; >> + >> + if (attach.argsz < minsz || attach.flags) >> + return -EINVAL; >> + >> + mutex_lock(&device->dev_set->lock); >> + ret = device->ops->pasid_attach_ioas(device, attach.pasid, >> &attach.pt_id); >> + mutex_unlock(&device->dev_set->lock); >> + >> + return ret; >> +} >> + >> +int vfio_df_ioctl_pasid_detach_pt(struct vfio_device_file *df, >> + struct vfio_device_pasid_detach_iommufd_pt >> __user *arg) >> +{ >> + struct vfio_device *device = df->device; >> + struct vfio_device_pasid_detach_iommufd_pt detach; >> + unsigned long minsz; >> + >> + minsz = offsetofend(struct vfio_device_pasid_detach_iommufd_pt, flags); > > Pasid isn't copied, should use pasid here? good catch! will fix it. -- Regards, Yi Liu