Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp193843lqn; Thu, 11 Apr 2024 20:07:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXaSDXv+RHaPYttjtmBVeHettHKCyOaQNZwGolPyCS8kE9oD6/qPT+4b3eUTwybxOv2kGNd6fGxoJEZfkkmfDEakMSLaMi3eYgzlrjmdg== X-Google-Smtp-Source: AGHT+IEy70Df4GfyTDUgVq91XQFjo/Hd+JitISIPONU0GiVnIRA/72ujF59aDBdr1wByVwB7s7hl X-Received: by 2002:a9d:74c5:0:b0:6ea:1d8e:19fc with SMTP id a5-20020a9d74c5000000b006ea1d8e19fcmr1557879otl.34.1712891246218; Thu, 11 Apr 2024 20:07:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712891246; cv=pass; d=google.com; s=arc-20160816; b=n+CyYPO4PVQQQR7C9vR2aF+ZG37MjbrK1pwcuRhzEa0LMgyOVAeyqSHFQ8fT6QK7gH 0MPSwHH3KA5eSPCo8DSJZ7bVKBEQj/2hf2dF9GPxh7xHB8LSb0io3os4pKIDMUDh2wf/ 8zZyWGss7TZ9zlGwI4JFYAgwC2piH33dYg5rrS/ia4I7fnuro7pond0l3zYFYpK7ECaj aSrl/ygj5nEZNI+OLmBIk5jFhJQ21ESDL0IWrY9/lLccqVF1JIZtPtJgS9NxjCHpT3I1 O/q8a6bX3XCWfLd0iR86mFPacQ3l7ZCeYxtFHG7eXaiONf0oAR8O5dEVL/VDxKVjWfMb 7lOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=eVltuTPus7vMUqG1WvwV+/xq+VMvi2k9xv95Y1eRTlY=; fh=j2DBCy+F7b21/EhQD3A0FSndaTG1JVdK5yaTvlFBiic=; b=XKLMA58vF+fk7e0XBf2TSOzHCJvOvHjRzmgqu7LWiSGGhr8qQb0IKwLLaTSiQYrrXZ NdM+r6KmjCkpF2sgZPI8FVjalCderFdMWO+0qTCb8BDPx9UbQUawTtF7XK1nrYd/WE2G 8Mm1NYVuhfVaOdu1O8UgkJansW41oG3vUXJgX0ZBmH7WKjRtHruCLK0hp99hUf/gIx4U fZoKi+PM7gVvQJJLi9vsgqVJQ4qRD8lAqqs+1LLNpQ/ZPa9wdROnNut6zr6A2E433/Fe /5KNpqCcBARPvdVcx9FLGu75xT9ncS8MCL8VhW8v6N/E6K92g+5+lVHAB+wWK4ZJ9PLG 0Otg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-141840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d18-20020a63f252000000b005e485fc4266si2374954pgk.388.2024.04.11.20.07.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 20:07:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-141840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 55170B219C0 for ; Fri, 12 Apr 2024 03:03:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE42B14F70; Fri, 12 Apr 2024 03:02:58 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD5F3125BA; Fri, 12 Apr 2024 03:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712890978; cv=none; b=rr2DN+lxTkUBzV/mwFlsLIZ3wIdTT6J2nbtkSH9zuZHttK6+kfXkuMRgJJqlanog+E8lMJ43q70RmHZN7KKB4zqoIkhGquUCz2UF0tUUdhKkXrPCWRBeFdQ1krtPNbQNr81vqnRi7HD7IJ6hK5evBDwteYxKX0GiWg+NX7Tbs2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712890978; c=relaxed/simple; bh=mksHlutSXcQUklVG/Sm4Rj52riQY7SIjyLfdHrSpKqs=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=eP7L9CfuodQqN7zp+EO37gl3gIo0lFg/waWod/8tWjBLXnXYTyGduPkF0XK+lUKF0/cHrKEwa82w0nNqad302nYfZPJIHtdkseraEI7OZoRLbjahXmCR4pdzhf2KhNqC5e8idTMF8Nkc51LMWq63eYFbJG7WlC4uFpN4KhBLTR8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4VG1Z34nHXz1S5M8; Fri, 12 Apr 2024 11:02:03 +0800 (CST) Received: from kwepemm600005.china.huawei.com (unknown [7.193.23.191]) by mail.maildlp.com (Postfix) with ESMTPS id 8E4DC180063; Fri, 12 Apr 2024 11:02:51 +0800 (CST) Received: from [10.67.121.110] (10.67.121.110) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 12 Apr 2024 11:02:51 +0800 Subject: Re: [PATCH v4 4/4] Documentation: add debugfs description for hisi migration To: Alex Williamson CC: , , , , , References: <20240402032432.41004-1-liulongfang@huawei.com> <20240402032432.41004-5-liulongfang@huawei.com> <20240404140750.78549701.alex.williamson@redhat.com> From: liulongfang Message-ID: <699fed1e-51c0-2d74-0f1f-6f45813f4cb4@huawei.com> Date: Fri, 12 Apr 2024 11:02:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240404140750.78549701.alex.williamson@redhat.com> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600005.china.huawei.com (7.193.23.191) On 2024/4/5 4:07, Alex Williamson wrote: > On Tue, 2 Apr 2024 11:24:32 +0800 > Longfang Liu wrote: > >> Add a debugfs document description file to help users understand >> how to use the hisilicon accelerator live migration driver's >> debugfs. >> >> Update the file paths that need to be maintained in MAINTAINERS >> >> Signed-off-by: Longfang Liu >> --- >> .../ABI/testing/debugfs-hisi-migration | 34 +++++++++++++++++++ >> MAINTAINERS | 1 + >> 2 files changed, 35 insertions(+) >> create mode 100644 Documentation/ABI/testing/debugfs-hisi-migration >> >> diff --git a/Documentation/ABI/testing/debugfs-hisi-migration b/Documentation/ABI/testing/debugfs-hisi-migration >> new file mode 100644 >> index 000000000000..3d7339276e6f >> --- /dev/null >> +++ b/Documentation/ABI/testing/debugfs-hisi-migration >> @@ -0,0 +1,34 @@ >> +What: /sys/kernel/debug/vfio//migration/hisi_acc/data >> +Date: Apr 2024 >> +KernelVersion: 6.9 > > At best 6.10 with a merge window in May. > >> +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. > > "Dumps the device debug migration buffer, state must first be saved > using the 'save' attribute." > >> + >> +What: /sys/kernel/debug/vfio//migration/hisi_acc/attr >> +Date: Apr 2024 >> +KernelVersion: 6.9 >> +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. > > AFAICT from the previous patch, this attribute is useless. > >> + >> +What: /sys/kernel/debug/vfio//migration/hisi_acc/cmd_state >> +Date: Apr 2024 >> +KernelVersion: 6.9 >> +Contact: Longfang Liu >> +Description: Used to obtain the device command sending and receiving >> + channel status. If successful, returns the command value. >> + If failed, return error log. >> + > > Seems like it statically returns "OK" plus the actual value. > > >> +What: /sys/kernel/debug/vfio//migration/hisi_acc/save >> +Date: Apr 2024 >> +KernelVersion: 6.9 >> +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. > > These interfaces are confusing, attr and data only work if there has > either been a previous save OR the user migration process closed saving > or resuming fds in the interim, and the user doesn't know which one > they get. Note that debug_migf isn't even discarded between > open/close, only cmd and save require the device to be opened by a > user, data and attr might continue to return data from some previous > user save, resume, or debugfs save. > data: Indicates the device migration data obtained after the migration is completed. This data is saved in debug_migf. The user reads it through "cat" and presents it to the user in the form of hexadecimal pure data. attr: Indicates the configuration parameters of the migration process after the migration is completed. These parameters are saved in vfio device and debug_migf. The user reads it through "cat" and presents it to the user in the form of key-value pairs such as . Save is an action process. After "cat" it, a migration save operation will be performed and the result data will be updated to debug_migf. There is still a big difference between data and attr, and the data formats are also different. Not merging makes it easier for users to obtain information. If you feel confused about save, it is recommended to use migrate_save. Thanks, Longfang. > > >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 7625911ec2f1..8c2d13b13273 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -23072,6 +23072,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 > > . >