From patchwork Tue Aug 6 12:29:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liulongfang X-Patchwork-Id: 13754773 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 E00051BD507; Tue, 6 Aug 2024 12:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722947744; cv=none; b=aLKOTL0sBx3ne9y3tqAPKO3EEZDx+YiNmbl+7XHMvuP8DHrTf/aO+hlZOYEvJp8fVzvFBOQLEmqBH01qD5yP4tvTsE4GEvsNs1Oy4QfaIjKPhFJV2NYhEvi0zdLwbIB0EutuvC1bX7c6kTnqiHWJL/N1HSuG1zNRr7ZccMKdKz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722947744; c=relaxed/simple; bh=jpHW7r9EJUcrRNJPq8Rr2C2IQI7ov2Sh0Zioh6zhiEU=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dImIrj2suZu2pOe7dzS0m+mJBHbqwvrJroEXWO1/SIJVR4gwrb690D0roKwqsLYjbk/gzRtN4vBKf4gvUqqgGmvff5wKC7h+PlBCw8a4Jjvvc2jzYj5OwgoRe04cplXjtfuOst4DI4L9AX1goHs2e9xAVaUsjJvM6uOD5EisxTQ= 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.188 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.105]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WdXm83scgzfZ2S; Tue, 6 Aug 2024 20:33:44 +0800 (CST) Received: from kwepemm600005.china.huawei.com (unknown [7.193.23.191]) by mail.maildlp.com (Postfix) with ESMTPS id E947B14011B; Tue, 6 Aug 2024 20:35:37 +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.39; Tue, 6 Aug 2024 20:35:37 +0800 From: Longfang Liu To: , , , CC: , , , Subject: [PATCH v8 0/4] debugfs to hisilicon migration driver Date: Tue, 6 Aug 2024 20:29:24 +0800 Message-ID: <20240806122928.46187-1-liulongfang@huawei.com> X-Mailer: git-send-email 2.24.0 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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 v7 -> v8 Delete unnecessary information Changes v6 -> v7 Remove redundant kernel error log printing and remove unrelated bugfix code Changes v5 -> v6 Modify log output calling error Changes v4 -> v5 Adjust the descriptioniptionbugfs file directory Changes v3 -> v4 Rebased on kernel6.9 Changes 2 -> 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 | 25 ++ .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 284 ++++++++++++++++-- .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 6 + 3 files changed, 284 insertions(+), 31 deletions(-) create mode 100644 Documentation/ABI/testing/debugfs-hisi-migration