Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1824781lqz; Mon, 1 Apr 2024 20:29:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUS30CQcBbO6ZffQaIv/0PoUp9glagis4y556d7GotJeeGFZXp43G2V7+3otsWcuFxNkJpCPJFFxKCNITyeVST2Yg2m0kr4RfqIU7aESQ== X-Google-Smtp-Source: AGHT+IG1Dc0jR1c3i+WiHjySw7iL7VH0PRaQSxZI2s5vGclaLLYhZkHjGz0IbThEjGVyvf9/D0Lx X-Received: by 2002:a5b:34c:0:b0:dc6:aeba:5aaf with SMTP id q12-20020a5b034c000000b00dc6aeba5aafmr10289001ybp.19.1712028578946; Mon, 01 Apr 2024 20:29:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712028578; cv=pass; d=google.com; s=arc-20160816; b=kLWk2uWc280R7nY5V/NgHSXZXxTAQweu7u21xyJ4k13lq0o6PsA65+fViUTVxVWSd0 DmJrOx/oD4ri/qAvJ5tBydnmQzyteibfQN8alONenWhxHi+8BjPdd2O4tIjrOj8pHYVj 48C3e/MckPhX45zuC9CL8uhOhF5q6IsAujk2Lu+u6lpgL4ulHwfRDrPqUCbLz9g+uvIC y+2I9rwPrNuBtnFLHoz4deN/njLoV7C+QN1nDEF3cziD964z0CuTXTb8oYuxY03whkal W9tIr95JAZfIfJ0325EmJqW29XcwIfOqW65J6gZybYYpn/KPW3FH41y54sKUAQBU8aYG sntA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=+J1olUqxvAY6sW9IT7a6gY6T2DQ0tCq+3sYIM6fkyj4=; fh=lW6MHi1ma+bdiE1he+iHyx9lPKntUb1s0946rN3rfJM=; b=E7d1gcmUrVlO6c1uOEB+G+kEoIjFlC52LwFhfo36n98dSp+i8NMu6mQRKf1aG4AH1q EiIp30HuGYBnhhq3ZwK3GBq2AStQloJ3hS5199vO0hbyYkWQBkXjVyG01Jq74fL7bpwS FR2X0NDBOxA9OKEtvuA5apo9n99Kh9w100wvmWKTugv6MEUUrgOZZkB73J/Hjp5KEBs4 llA0ht2+8I9FkQ4sn5VDdDamS/btqwn9e0yeyyOhAin+kFIZdlD4Qdw98haRQtqEMLoM SBC82SsQPd7bMl0IMjpfiu3/Qe7WsrC9qDh4FgN1YKijlGs3c3CxIqB7vqcZpYzR/huF ZGHg==; 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-127337-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o10-20020a17090a5b0a00b0029beb83ed1asi12523611pji.57.2024.04.01.20.29.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 20:29:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127337-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-127337-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127337-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 983182873B4 for ; Tue, 2 Apr 2024 03:29:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C417175AD; Tue, 2 Apr 2024 03:29:23 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 B0C891759E; Tue, 2 Apr 2024 03:29:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712028563; cv=none; b=mC/IiEQyhggewA79ZtCjHRYjKJcgD7spYjVFH/VlqhSmVZ3JwI/BT0ov6ypQn+xKfhxB6eh9AwpTvpqUOHSrBhYydDJDrjHTdCx7IR0CxxRWFLIKzbUKiJGH9Hdyupk99PYg/9MAkcVNLtqZT6qptLfqR03zfxdEYjTsasizNsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712028563; c=relaxed/simple; bh=djyVy8+fPyGzZPzPF4SjSGy7AW26La7QUjqbjM1zzqc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SrPzxzmayTmzYzXLV1Yvakv/tBUjZS5027rGlayd5o5DFqTCpPh79bqJxqKMzsWn60TQpOxeFvmUfZrdLAFWR7BMsj2GaZwt7NsCERovyVUOx7zlE8r0i/iXKcS3BC7pRMI7zSj5ihfBPWkMyE9ic+q4GfCApjwMca1XR8Gyv2Q= 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.189 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.194]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4V7tbf6bY5zcbDt; Tue, 2 Apr 2024 11:27:10 +0800 (CST) Received: from kwepemm600005.china.huawei.com (unknown [7.193.23.191]) by mail.maildlp.com (Postfix) with ESMTPS id 05A45140154; Tue, 2 Apr 2024 11:29:18 +0800 (CST) Received: from huawei.com (10.50.165.33) 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; Tue, 2 Apr 2024 11:29:17 +0800 From: Longfang Liu To: , , , CC: , , , Subject: [PATCH v4 0/4] add debugfs to hisilicon migration driver Date: Tue, 2 Apr 2024 11:24:28 +0800 Message-ID: <20240402032432.41004-1-liulongfang@huawei.com> X-Mailer: git-send-email 2.24.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600005.china.huawei.com (7.193.23.191) Add a debugfs function to the hisilicon migration driver in VFIO to provide intermediate state values and data during device migration. 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 Rebased on kernel6.9 Changes v2 -> v3 Solve debugfs serialization problem. Changes v1 -> v2 Solve the racy problem of io_base. Longfang Liu (4): hisi_acc_vfio_pci: extract public functions for container_of hisi_acc_vfio_pci: Create subfunction for data reading hisi_acc_vfio_pci: register debugfs for hisilicon migration driver Documentation: add debugfs description for hisi migration .../ABI/testing/debugfs-hisi-migration | 34 +++ MAINTAINERS | 1 + .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 281 ++++++++++++++++-- .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 14 + 4 files changed, 298 insertions(+), 32 deletions(-) create mode 100644 Documentation/ABI/testing/debugfs-hisi-migration -- 2.24.0