Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp193518rwn; Wed, 14 Sep 2022 18:49:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR4JRoizdQ2iqMgldpwj4MCusSYHCM1PjgGcs4kWXvErN1DN6hqB8mT0yGunNHwb2KW5AxoF X-Received: by 2002:a62:5443:0:b0:53b:b934:ee8e with SMTP id i64-20020a625443000000b0053bb934ee8emr41090357pfb.10.1663206595689; Wed, 14 Sep 2022 18:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663206595; cv=none; d=google.com; s=arc-20160816; b=orKvhhJTB+ztvopGBeyEOjMe//x+gbR0LcZx+tDKaDg/9cNf6WWYeV5wO5vRIJ6n0M XdOiLTKL/biXDm9BgYBsn+2AaTZ0NAc//1tyjpUzNhnKok02cvYxqJUJJ4ZlwDLL/hGy whJjpdR0D+Yz6gZBiIeve43myoM1ycZTnpLbI6sPV3aGktkMKcAoK7jsWPFqr/pAWn6q Km3EQP6BGv8efFpzGo+FZQG+Q1ikiUeBSY+iz3IX2zFFVFTcaJwJWnxabnB0cMV1Bxc9 DGEWqD6J2ZsyHuYTyddn6sGlU2exX8dVllchrZJTR/enIyYGI6h1BLz+n905lJty/Ne3 y73Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dU59DTyONaraZHkevuR46OabS+g6nLKzK9wlGtibITA=; b=q+ISP+jcC0IcBFJP2w75ye4+vejKFJIIAcyRuj3DYYJJVckuuN9czSwrZ8S3X83h04 mTQzA8hJKci/PoJJQiG3NK5YsBoPPPAi/s3Nh3QtPDyydfHAzYDSDic5vPJ6TpTWJqev JnC2ZOmZhvme0Bcp2cYtv5dZSOe8S0qg7QhRUjTRUi8Tz7grKawxAn/NRc3D+L31zB4p fqr8LK/WUrBSabN8Tw3JJGw7bGrOS3mZmx5XxpCzyxD7fDVIduX385Note/HxfxRSVkO QAm0VHJpESKl6kM25AglBobEltst+csJ0qZmLlyq2w8SPTUksv+pZl29kJ0YWhTrF+UI GhhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id az22-20020a17090b029600b001fab8938920si15072598pjb.152.2022.09.14.18.49.43; Wed, 14 Sep 2022 18:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229921AbiIOBfo (ORCPT + 99 others); Wed, 14 Sep 2022 21:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbiIOBfm (ORCPT ); Wed, 14 Sep 2022 21:35:42 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D5D6AA3A for ; Wed, 14 Sep 2022 18:35:41 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MSfn943ntz14QNT; Thu, 15 Sep 2022 09:31:41 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 15 Sep 2022 09:35:39 +0800 Received: from huawei.com (10.69.192.56) 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.2375.31; Thu, 15 Sep 2022 09:35:39 +0800 From: Longfang Liu To: , , CC: , , , Subject: [PATCH 2/5] hisi_acc_vfio_pci: Fixes error return code issue Date: Thu, 15 Sep 2022 09:31:54 +0800 Message-ID: <20220915013157.60771-3-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220915013157.60771-1-liulongfang@huawei.com> References: <20220915013157.60771-1-liulongfang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During the process of compatibility and matching of live migration device information, if the isolation status of the two devices is inconsistent, the live migration needs to be exited. The current driver does not return the error code correctly and needs to be fixed. Reviewed-by: Shameer Kolothum Signed-off-by: Longfang Liu --- drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c index 8fd68af2ed5f..3790b76a578e 100644 --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c @@ -405,7 +405,7 @@ static int vf_qm_check_match(struct hisi_acc_vf_core_device *hisi_acc_vdev, if (vf_data->que_iso_cfg != que_iso_state) { dev_err(dev, "failed to match isolation state\n"); - return ret; + return -EINVAL; } ret = qm_write_regs(vf_qm, QM_VF_STATE, &vf_data->vf_qm_state, 1); -- 2.33.0