Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35288034rwd; Mon, 10 Jul 2023 05:30:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlHtqiLMsGMA3Cy6xnbQPXEXGR11aj/KbFzMnyt2k5wDyt354H+xPXvPn+CpJ5hZquprGlj8 X-Received: by 2002:a0d:ef07:0:b0:577:616e:2d72 with SMTP id y7-20020a0def07000000b00577616e2d72mr16051431ywe.5.1688992237866; Mon, 10 Jul 2023 05:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688992237; cv=none; d=google.com; s=arc-20160816; b=cM+1eeha6v0rzWmoJfwlHypVSLCZApOY1o7An3puNteDFLk8Z1VfQGn5cBvgynkbTp 73sU4wuZU4Ov6OUm2v8VHBBjQLwg3I3V0VboNTh5Pmpvz+Hw1WrtU3zIDrz8jjOL/BpZ 5wnToZQKtmqC0GO/TrRdbQTKlQZmcmI1lzOuFPXKJ2bjFYRXLZasK5y0QBEivTVpOTeY piHF2Ut4HuWJczQ3DN/jxg4rSaKRAboYqO2c24BcrSGINM/abw0x9Ve9IN698yEYcnQa yDZ/Dwbr/joKwi35sxP+T6i3b0RXSSvROnFgAbL2ZaIwIv13YCCb8oKYQQBOM2beSe5I G+HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=MmsNUm5hbHlfu9YydXUAnMFi0P48zgh7Qg6D3PfLERs=; fh=QWGf+vz+y2Jp5Ws+FGqcd4IHhaeHhz8SpaFSJAyZj4c=; b=AjDLZjgFJONpRfODQ8Ae9uTRv5H2L+YaqaPy40tS+904sWRxDsC+9R/R7NILI6dD0u 8Lx9AAIde23hwNb664FfnUPIDvBszC096HwVCP6jyb5AHtqnt3T1/i+UzAUIUwqH4rxN uhQd8RvP4agmKTs8Z208ixEoChEXplUgB5U+QWP66rRbFcl4oJkMdWWl1cjt7uembJvE kdXyu4QzfEVMlZZ5JmT7WPU7KPCQmWkTa5vFk9HSN298y0ygbhQ5u6+RGF8GMfjPxtFY DQeCb65rZSYqg1XhJG8NWXSzM6Mmz0K9USvZteIsdRQXGBDgL6ZLWgS/bHuYe3hmuVe3 bkSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a17090a3e0700b00262ecc1963fsi7426544pjc.33.2023.07.10.05.30.25; Mon, 10 Jul 2023 05:30:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbjGJMMx (ORCPT + 99 others); Mon, 10 Jul 2023 08:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbjGJMMw (ORCPT ); Mon, 10 Jul 2023 08:12:52 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0C5BB1 for ; Mon, 10 Jul 2023 05:12:50 -0700 (PDT) Received: from kwepemm600005.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R02tl2Glgz1FDlj; Mon, 10 Jul 2023 20:12:15 +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.2507.27; Mon, 10 Jul 2023 20:12:46 +0800 Subject: Re: [PATCH v11 0/4] add debugfs to migration driver To: , , , CC: , , References: <20230630092457.54902-1-liulongfang@huawei.com> From: liulongfang Message-ID: <9c3f7b5c-b0c0-2c74-e32f-68fd3e1deee9@huawei.com> Date: Mon, 10 Jul 2023 20:12:46 +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: <20230630092457.54902-1-liulongfang@huawei.com> 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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/6/30 17:24, liulongfang wrote: > Add a debugfs function to the migration driver in VFIO to provide > a step-by-step test function for the migration driver. > > When the execution of live migration fails, the user can view the > status and data during the migration process separately from the > source and the destination, which is convenient for users to analyze > and locate problems. > > Changes v10 -> v11 > Delete the device restore function in debugfs. > > Changes v9 -> v10 > Update the debugfs file of the live migration driver. > > Changes v8 -> v9 > Update the debugfs directory structure of vfio. > > Changes v7 -> v8 > Add support for platform devices. > > Changes v6 -> v7 > Fix some code style issues. > > Changes v5 -> v6 > Control the creation of debugfs through the CONFIG_DEBUG_FS. > > Changes v4 -> v5 > Remove the newly added vfio_migration_ops and use seq_printf > to optimize the implementation of debugfs. > > Changes v3 -> v4 > Change the migration_debug_operate interface to debug_root file. > > Changes v2 -> v3 > Extend the debugfs function from hisilicon device to vfio. > > Changes v1 -> v2 > Change the registration method of root_debugfs to register > with module initialization. > > Longfang Liu (4): > vfio/migration: Add debugfs to live migration driver > hisi_acc_vfio_pci: extract public functions for container_of > hisi_acc_vfio_pci: register debugfs for hisilicon migration driver > Documentation: add debugfs description for vfio > > .../ABI/testing/debugfs-hisi-migration | 32 +++ > Documentation/ABI/testing/debugfs-vfio | 25 +++ > MAINTAINERS | 2 + > drivers/vfio/Makefile | 1 + > .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 203 +++++++++++++++++- > .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 11 + > drivers/vfio/vfio.h | 14 ++ > drivers/vfio/vfio_debugfs.c | 78 +++++++ > drivers/vfio/vfio_main.c | 9 +- > include/linux/vfio.h | 7 + > 10 files changed, 371 insertions(+), 11 deletions(-) > create mode 100644 Documentation/ABI/testing/debugfs-hisi-migration > create mode 100644 Documentation/ABI/testing/debugfs-vfio > create mode 100644 drivers/vfio/vfio_debugfs.c > Hi, Alex Can you help me to review these patches ? Thanks, Longfang.