Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1761865rdh; Tue, 26 Sep 2023 02:49:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnTnIejs609PNnmM0hnQL9EyCCytRP0wyYiG57SdrsHaxCQ4ZrEf3QORLWFasx79ZIQnsT X-Received: by 2002:a05:6808:bd0:b0:3a4:633:44d2 with SMTP id o16-20020a0568080bd000b003a4063344d2mr15066712oik.18.1695721744665; Tue, 26 Sep 2023 02:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695721744; cv=none; d=google.com; s=arc-20160816; b=j+GznAeohdBrg7CZFt1loZq8rFZL30miWGQgCLpMAY8kUV1OV++FN+vCTWrz7VOsml 3em3bRTp7RhPAgusPJtf+biEr2Pa8LIf/d2b6b+rskv7FvuLuOULcuPPOI9EQvI547zx avLrXHMHZ8hvvr8YTOJj77rPDILdONuoDuXai04gke7FBRdG8+80T7K/3Q8VjAgFwFCE 5lr5QHySs7SlQpXGYx3uWgrfc8ubTIBVdh8ePOpUh2QTjoU6cC/PBiOFxtPbmHKbQUte UcoLk/ZPkpK132fMGxLORz5F2GouX9hjsEwRQkRMbih8e+dG/dBJOaqqNrsZS/QYfdpf s1HA== 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=7ESDxsheL5lEoCD6CR+3U7abRoImvcGVfAmgSnZQg5I=; fh=6RjYAQ34uDeYKm0rLOoNcFiQikSk6+SaiM0Axnq7aoY=; b=X5i566usFY/pWFN9lDcazHGo8qJGmLnLi3Cb9OmdafFPJGOL2FdIoURBJ8jgw9muW8 I3Q/pd0kEJnf1PH5sp+/g6TkYlpgrl8JEBsV/josCgK4PIKufB2Dzrcn2JNpyi8bfIAd 9YtoGyxneGmzz+3yWj9K6Pmg/0cU3OBF9wOGMrKgVqvilzifDxEN5r1Q3h0h580lZMM7 SLQcU4ipr14mGzj3/jWZaYqB3yav9B2iic67ze/UHU2Aqm5Re7S4QHdZCCyIaM/MvLrD KKXJyMklfDa1fse2BwA+ZkV2QuItHOGeAfMPkLnNCRNeCXOLevP2xGo5vCjUpjPw4np/ 8d4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id w71-20020a63824a000000b0057806be7290si12077761pgd.451.2023.09.26.02.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 02:49:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DCDF8806AA1A; Tue, 26 Sep 2023 02:36:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234233AbjIZJgz (ORCPT + 99 others); Tue, 26 Sep 2023 05:36:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234114AbjIZJgx (ORCPT ); Tue, 26 Sep 2023 05:36:53 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30397EB; Tue, 26 Sep 2023 02:36:46 -0700 (PDT) Received: from kwepemm000005.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Rvvft5t7BzNmlB; Tue, 26 Sep 2023 17:32:54 +0800 (CST) Received: from huawei.com (10.50.163.32) by kwepemm000005.china.huawei.com (7.193.23.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 26 Sep 2023 17:36:43 +0800 From: liulongfang To: , , , CC: , , , , Subject: [PATCH v16 0/2] add debugfs to migration driver Date: Tue, 26 Sep 2023 17:33:54 +0800 Message-ID: <20230926093356.56014-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.50.163.32] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm000005.china.huawei.com (7.193.23.27) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:36:58 -0700 (PDT) Add a debugfs function to the migration driver in VFIO to provide a step-by-step debugfs information for the migration driver. Changes v15 -> v16 Update the calling order of functions to maintain symmetry Changes v14 -> v15 Update the output status value of live migration. Changes v13 -> v14 Split the patchset and keep the vfio debugfs frame. Changes v12 -> v13 Solve the problem of open and close competition to debugfs. Changes v11 -> v12 Update loading conditions of vfio debugfs. 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 (2): vfio/migration: Add debugfs to live migration driver Documentation: add debugfs description for vfio Documentation/ABI/testing/debugfs-vfio | 25 ++++++++ MAINTAINERS | 1 + drivers/vfio/Makefile | 1 + drivers/vfio/vfio.h | 14 +++++ drivers/vfio/vfio_debugfs.c | 87 ++++++++++++++++++++++++++ drivers/vfio/vfio_main.c | 14 ++++- include/linux/vfio.h | 7 +++ 7 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 Documentation/ABI/testing/debugfs-vfio create mode 100644 drivers/vfio/vfio_debugfs.c -- 2.24.0