From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 525D3C4708D for ; Wed, 4 Jan 2023 03:20:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234228AbjADDUQ (ORCPT ); Tue, 3 Jan 2023 22:20:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjADDUO (ORCPT ); Tue, 3 Jan 2023 22:20:14 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDF0B10FDC for ; Tue, 3 Jan 2023 19:20:13 -0800 (PST) Received: from kwepemm600005.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NmvvN4CXlzRqk7; Wed, 4 Jan 2023 11:18:40 +0800 (CST) Received: from [10.67.103.158] (10.67.103.158) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 4 Jan 2023 11:20:11 +0800 Subject: Re: [PATCH v5 3/5] hisi_acc_vfio_pci: register debugfs for hisilicon migration driver To: Jason Gunthorpe CC: , , , , , References: <20221217063248.6735-1-liulongfang@huawei.com> <20221217063248.6735-4-liulongfang@huawei.com> From: liulongfang Message-ID: Date: Wed, 4 Jan 2023 11:20:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.158] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/1/3 23:07, Jason Gunthorpe Wrote: > On Sat, Dec 17, 2022 at 02:32:46PM +0800, Longfang Liu wrote: >> On the debugfs framework of VFIO, register the debug function >> for the live migration driver of the hisilicon accelerator device. >> >> On the basis of the original public debug function, a private debug >> function is added: >> >> mig_data file: used to get the migration data of the live migration device >> mig_attr file: used to get device attributes of the live migration device >> debug file: used to test for acquiring and writing device state data >> for VF device. >> >> Signed-off-by: Longfang Liu >> --- >> .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 276 ++++++++++++++++++ >> .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 11 + >> 2 files changed, 287 insertions(+) > > You should put this all in its own file and not compile it when > debugfs is turned off as well. > Here use this macro #ifdef CONFIG_DEBUG_FS to wrap the creation part of debugfs. Do you think it can be handled like this? > Jason > . > Thanks, Longfang.