Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp225693rdb; Fri, 5 Jan 2024 07:56:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyVPt6Jb9kMtFMsKHREPECmoeULDqT3zq6Cq0jJrheT4FXk2dASIw/GT+9lhB/Uf2bt53K X-Received: by 2002:a17:906:5185:b0:a27:f0da:f6d8 with SMTP id y5-20020a170906518500b00a27f0daf6d8mr1047629ejk.104.1704470190946; Fri, 05 Jan 2024 07:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704470190; cv=none; d=google.com; s=arc-20160816; b=lURJURYC6JpaAbDJEXhO0NVHZCv1Uzwp7xknm0avsGUSorGNVLz3XALz551PsEViDE wK7piKZiapT6+y633bFMxhOVd+OsJYgjFSryDjU2udRVqUkPy742l/TNexmS0hFMESZA 49s4uuPYgOwiJxm0pUbg+MyhXilVaRN/K4+B2u45sDpodW43MX1JyGMlPGIeLuqziWlq BL/cZC9ia+cfjF5RoWuanmKPhCF7btisy/JzguJVBRa5Zf/ovZZHMwdSvNttOoenS3bh 3ZIWjKV8pOQZ6GctrAzqDK5pThanXskHX1NvPjcQ6JJJ7JseytcPhDGrUKfTYQB4b6+7 ECaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=85QkxSSkTqiGx0HgHbL+TuwT9bPxFEtRZKIy3248oLw=; fh=DifkB4C/k8WfJGQqWPkmXxPhD3yP4JWkn+OjRy8ri7A=; b=bkZ19XpSgsMAyFwXU63p4KLZyv3DO1uqQ9kA4vueXl373aZjpfM3UyVOElUhWzCMia b2Lb2DAK2o/5oWm7EVzFhVroC6uh8CxbuDlckGJucjVrrquGTgMtMSJzMtqtVIVcNjE1 WSbXzl4zp+AIrzdOE252GVyqHZP7nHYyv+4Va0uvtmPaYWS4tQQxEUOQTIddrezknaf+ fQbORCTAPgCFA3Fh3HF0CmRLCyI+z1tVGARZd6C3Tb6V+Oc4qiZZAEZQUY+RvUGjTwQ5 bB67qPsUW1ZJKy9G2sJCgvSTRkuze9NNmaouQXlIKdvme01qSrTOp7ulqgWiGFWmi+Gg /rXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ka7-20020a170907990700b00a28c80e3888si701219ejc.219.2024.01.05.07.56.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:56:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18020-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 am.mirrors.kernel.org (Postfix) with ESMTPS id AE92C1F21D99 for ; Fri, 5 Jan 2024 15:56:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6AD02E830; Fri, 5 Jan 2024 15:56:20 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (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 D7DA62E824; Fri, 5 Jan 2024 15:56:15 +0000 (UTC) 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 szxga07-in.huawei.com (SkyGuard) with ESMTP id 4T67Lr1f5hz1Q6cn; Fri, 5 Jan 2024 23:54:44 +0800 (CST) Received: from dggems704-chm.china.huawei.com (unknown [10.3.19.181]) by mail.maildlp.com (Postfix) with ESMTPS id 560911800C6; Fri, 5 Jan 2024 23:56:12 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by dggems704-chm.china.huawei.com (10.3.19.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 5 Jan 2024 23:56:11 +0800 Received: from lhrpeml500005.china.huawei.com ([7.191.163.240]) by lhrpeml500005.china.huawei.com ([7.191.163.240]) with mapi id 15.01.2507.035; Fri, 5 Jan 2024 15:56:09 +0000 From: Shameerali Kolothum Thodi To: Jason Gunthorpe , "alex.williamson@redhat.com" CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "yishaih@nvidia.com" , "kevin.tian@intel.com" , Linuxarm , liulongfang Subject: RE: [PATCH] hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume Thread-Topic: [PATCH] hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume Thread-Index: AQHaG5IKSxqx627vikqShB0juPG9VbCDRMsAgEhisBA= Date: Fri, 5 Jan 2024 15:56:09 +0000 Message-ID: <12f92affadf34f048a2eb2e7e9ecd879@huawei.com> References: <20231120091406.780-1-shameerali.kolothum.thodi@huawei.com> <20231120142928.GC6083@nvidia.com> In-Reply-To: <20231120142928.GC6083@nvidia.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Alex, Just a gentle ping on this.=20 Thanks, Shameer > -----Original Message----- > From: Jason Gunthorpe > Sent: Monday, November 20, 2023 2:29 PM > To: Shameerali Kolothum Thodi > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org; > alex.williamson@redhat.com; yishaih@nvidia.com; kevin.tian@intel.com; > Linuxarm ; liulongfang > Subject: Re: [PATCH] hisi_acc_vfio_pci: Update migration data pointer cor= rectly > on saving/resume >=20 > On Mon, Nov 20, 2023 at 09:14:06AM +0000, Shameer Kolothum wrote: > > When the optional PRE_COPY support was added to speed up the device > > compatibility check, it failed to update the saving/resuming data > > pointers based on the fd offset. This results in migration data > > corruption and when the device gets started on the destination the > > following error is reported in some cases, > > > > [ 478.907684] arm-smmu-v3 arm-smmu-v3.2.auto: event 0x10 received: > > [ 478.913691] arm-smmu-v3 arm-smmu-v3.2.auto: 0x0000310200000010 [ > > 478.919603] arm-smmu-v3 arm-smmu-v3.2.auto: 0x000002088000007f [ > > 478.925515] arm-smmu-v3 arm-smmu-v3.2.auto: 0x0000000000000000 [ > > 478.931425] arm-smmu-v3 arm-smmu-v3.2.auto: 0x0000000000000000 [ > > 478.947552] hisi_zip 0000:31:00.0: qm_axi_rresp [error status=3D0x1] > > found [ 478.955930] hisi_zip 0000:31:00.0: qm_db_timeout [error > > status=3D0x400] found [ 478.955944] hisi_zip 0000:31:00.0: qm sq > > doorbell timeout in function 2 > > > > Fixes: d9a871e4a143 ("hisi_acc_vfio_pci: Introduce support for > > PRE_COPY state transitions") > > Signed-off-by: Shameer Kolothum > > --- > > drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > Reviewed-by: Jason Gunthorpe >=20 > Jason