Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1859161rwb; Fri, 2 Dec 2022 02:03:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jAggG66iyREw+Oefiy8BLfrqHtbLbTtSkbqrtiq+UMCJSriQdMnh7EdkvZ0Nj+Mp8ZMu2 X-Received: by 2002:a05:6402:48d:b0:461:c3d9:c6a3 with SMTP id k13-20020a056402048d00b00461c3d9c6a3mr45977969edv.154.1669975384702; Fri, 02 Dec 2022 02:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669975384; cv=none; d=google.com; s=arc-20160816; b=uVmdeakHoenT257Veq+c7NmMv4zHX/sMBXZxRLE7M2gp/e3Teg6mNgnJ9c5MCfbSIU 7HDU128XB7UrNhlqnJrUCD/EnVMdbJOYIVW/VssQrrbShO0TJY0Hc6k6PTYZHdsaXNV+ eHWetv5ujnWrAdLjgO84+ReBn1lZ6xbOSZdYQtT2wr41GAeNgiebdCj/aUqERG7kAnDE mE2Lfchn8Zmy7ON5M0F+MAoBmqMkixcujQH4397XPGkxS/RKcBfTGYfCifcGE1eNAG2y HyQy8F8YXHChu1LptfiCygvjaozihnyW2bMQNkgrdQPBWiwD3EJ/+gpVTaRp+nn6wfbc 2Sug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ptG5ihlMSe45N+4w8qk3uBKWOO2b/pQskIt45jvvdEQ=; b=tSvqCIZfESAAlQeJ6Cd4WYBg1pexAU+nmPGOuljg8BkB+J7G7GrvJvbsVYmmUBhilB kws/yytyqx74y+9OG8thqgQNZJMZhGWjrj+LJM89s4yAQ5aXmy7M6DpV4RcxMcTMDs9/ 5xp7sqqPvxk6ZvMrUNmayAYZEjE3enzA/moYqK/7hpLUDhnz9TQVgr1mNbOPnJWyaNBx rbLKLrqYnjFbQSzVUVCdS7fpdm+LCyL1sI1excTII5Swt9HyiYDYq7ZzgnGJG+0oA0w9 9L36zQ4N348Gf98Vog2avNEqbFtbVhlCOL19wIRqV3erh6ZF/f+bfgg/zLgvmJlnx6zz E4uA== 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 ht8-20020a170907608800b007aea9dfb4f5si6724586ejc.511.2022.12.02.02.02.44; Fri, 02 Dec 2022 02:03:04 -0800 (PST) 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 S231649AbiLBJ1f (ORCPT + 83 others); Fri, 2 Dec 2022 04:27:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbiLBJ1d (ORCPT ); Fri, 2 Dec 2022 04:27:33 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A8685F9E for ; Fri, 2 Dec 2022 01:27:31 -0800 (PST) Received: from kwepemm600005.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NNnYS43YbzqSh9; Fri, 2 Dec 2022 17:23:24 +0800 (CST) Received: from huawei.com (10.67.164.66) 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.31; Fri, 2 Dec 2022 17:27:28 +0800 From: Longfang Liu To: , , , CC: , , , Subject: [PATCH v4 0/5] add debugfs to migration driver Date: Fri, 2 Dec 2022 17:26:20 +0800 Message-ID: <20221202092625.35075-1-liulongfang@huawei.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.164.66] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 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 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 (5): 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 hisi_acc_vfio_pci vfio: update live migration device status .../ABI/testing/debugfs-hisi-migration | 32 ++ drivers/vfio/pci/Makefile | 4 + .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 274 +++++++++++++++++- .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 9 + drivers/vfio/pci/mlx5/main.c | 3 + drivers/vfio/pci/vfio_pci_core.c | 3 + drivers/vfio/pci/vfio_pci_debugfs.c | 150 ++++++++++ drivers/vfio/pci/vfio_pci_debugfs.h | 32 ++ include/linux/vfio.h | 12 + 9 files changed, 509 insertions(+), 10 deletions(-) create mode 100644 Documentation/ABI/testing/debugfs-hisi-migration create mode 100644 drivers/vfio/pci/vfio_pci_debugfs.c create mode 100644 drivers/vfio/pci/vfio_pci_debugfs.h -- 2.24.0