From patchwork Wed Aug 16 09:42:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liulongfang X-Patchwork-Id: 13354782 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DD5EC001DF for ; Wed, 16 Aug 2023 09:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AFx7HqEqrTACq1dIhn+d7VQQ1CzyeqtJP3dyVoL1Iqg=; b=1k21LRB+E2iZ2k 0tj9tYMcFNRmH7TW221MGJQSg0jmuQ6VA6+WLQ8V2pWFgGSTYP5CmAem7bVy8d5Ud/TMyAKQzPJDC lMsru0VCelj57TQVqBakNrUewpxnPgq7D7L2c9OPHdhAPax9sSnFhmJyGELl/iWgEj0cNhrK9Ggdn tPD6qPNGZ2CsmvgpJJuCaK0wfej9r0YBHG7nfQbjYIPlp9m/YSwkB1Y4dvfXqhH/vTU/qVJjNIhtv eSO9EjZclpCxkPpN1utZeTlpeiAr19SBfgS2460H8gY1V3r/oIqjMBNnFKmF37kXTghUUlVj+Bylg WLukzg4B/3/pq6zWpi+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWD6n-003eSD-0M; Wed, 16 Aug 2023 09:46:33 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWD6k-003eRL-1Z for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 09:46:32 +0000 Received: from kwepemm600005.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RQjqH2FpzztS2F; Wed, 16 Aug 2023 17:42:51 +0800 (CST) Received: from huawei.com (10.50.163.32) 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.31; Wed, 16 Aug 2023 17:46:27 +0800 From: liulongfang To: , , CC: , , Subject: [PATCH v13 4/4] Documentation: add debugfs description for vfio Date: Wed, 16 Aug 2023 17:42:05 +0800 Message-ID: <20230816094205.37389-5-liulongfang@huawei.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20230816094205.37389-1-liulongfang@huawei.com> References: <20230816094205.37389-1-liulongfang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_024630_964133_B9E6CE7C X-CRM114-Status: GOOD ( 17.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Longfang Liu 1.Add two debugfs document description file to help users understand how to use the accelerator live migration driver's debugfs. 2.Update the file paths that need to be maintained in MAINTAINERS Signed-off-by: Longfang Liu --- .../ABI/testing/debugfs-hisi-migration | 36 +++++++++++++++++++ Documentation/ABI/testing/debugfs-vfio | 25 +++++++++++++ MAINTAINERS | 2 ++ 3 files changed, 63 insertions(+) create mode 100644 Documentation/ABI/testing/debugfs-hisi-migration create mode 100644 Documentation/ABI/testing/debugfs-vfio diff --git a/Documentation/ABI/testing/debugfs-hisi-migration b/Documentation/ABI/testing/debugfs-hisi-migration new file mode 100644 index 000000000000..791dd8a09575 --- /dev/null +++ b/Documentation/ABI/testing/debugfs-hisi-migration @@ -0,0 +1,36 @@ +What: /sys/kernel/debug/vfio//migration/hisi_acc/data +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: Read the live migration data of the vfio device. + These data include device status data, queue configuration + data and some task configuration data. + The output format of the data is defined by the live + migration driver. + +What: /sys/kernel/debug/vfio//migration/hisi_acc/attr +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: Read the live migration attributes of the vfio device. + it include device status attributes and data length attributes + The output format of the attributes is defined by the live + migration driver. + +What: /sys/kernel/debug/vfio//migration/hisi_acc/io_test +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: Trigger the HiSilicon accelerator device to perform + the io test through the read operation. If successful, + it returns the execution result of mailbox. If fails, + it returns error log result. + +What: /sys/kernel/debug/vfio//migration/hisi_acc/save +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: Trigger the Hisilicon accelerator device to perform + the state saving operation of live migration through the read + operation, and output the operation log results. + diff --git a/Documentation/ABI/testing/debugfs-vfio b/Documentation/ABI/testing/debugfs-vfio new file mode 100644 index 000000000000..086a8c52df35 --- /dev/null +++ b/Documentation/ABI/testing/debugfs-vfio @@ -0,0 +1,25 @@ +What: /sys/kernel/debug/vfio +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: This debugfs file directory is used for debugging + of vfio devices, it's a common directory for all vfio devices. + Each device should create a device subdirectory under this + directory by referencing the public registration interface. + +What: /sys/kernel/debug/vfio//migration +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: This debugfs file directory is used for debugging + of vfio devices that support live migration. + The debugfs of each vfio device that supports live migration + could be created under this directory. + +What: /sys/kernel/debug/vfio//migration/state +Date: Aug 2023 +KernelVersion: 6.6 +Contact: Longfang Liu +Description: Read the live migration status of the vfio device. + The status of these live migrations includes: + ERROR, RUNNING, STOP, STOP_COPY, RESUMING. diff --git a/MAINTAINERS b/MAINTAINERS index d516295978a4..d4fb7547b687 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22304,6 +22304,7 @@ L: kvm@vger.kernel.org S: Maintained T: git https://github.com/awilliam/linux-vfio.git F: Documentation/ABI/testing/sysfs-devices-vfio-dev +F: Documentation/ABI/testing/debugfs-vfio F: Documentation/driver-api/vfio.rst F: drivers/vfio/ F: include/linux/vfio.h @@ -22321,6 +22322,7 @@ M: Longfang Liu M: Shameer Kolothum L: kvm@vger.kernel.org S: Maintained +F: Documentation/ABI/testing/debugfs-hisi-migration F: drivers/vfio/pci/hisilicon/ VFIO MEDIATED DEVICE DRIVERS