Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp583838rwb; Mon, 26 Sep 2022 03:16:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7T0ilvkPduIS2/YF0tBj+WjBgPjp9HT9Zb0keN2NVZET3D6GIxaoYg+VE+kCLa7jou9FNz X-Received: by 2002:aa7:c054:0:b0:453:98c6:f6c4 with SMTP id k20-20020aa7c054000000b0045398c6f6c4mr21794776edo.2.1664187360850; Mon, 26 Sep 2022 03:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664187360; cv=none; d=google.com; s=arc-20160816; b=FMcTGFva1cW3+uxEacbzJTKr03qoxzBhiKHfX8qN+oDh7Rts69QDlS2oAh+r70t5dk /WiInfApkHIJB/7yXL8ai0D5+gO5IYpIWl63bB5UiIeYfENrJMCDcII5jk+JOR9t9b9w FpCCMB9KBFs6upBW3gdTcs6zsKH74z3PrlxOHFPS+RAPVX4RyO2zwheb236nMlnoWgnv jCcNSMl0zOVf55sOJgH+TNAcF6OHcj0pyUAhfSTRY44mdRuIITHIjbeb9IqcKHw3i7MV LtYU4LKn46one5ESQJhRDtuAQqRWPidGhko1kTiSAHg+coeHbatccqnMnyAS3xPoL0AB 1JjA== 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=c50B+GCxK1KYiRi9ScYTaHBpnwjWzAmdNRRJ54o4H0M=; b=Qk1Lgyzx1Q7AUAsbwX65HEakua1PSfvVIfiZAgcSXQhlxDalRoMyifkm2DrfTpPwbQ 6m++KYfiSvfqvk9EN0tc8zq5Aij7ebxJmEgat1CXJMTei+A1+yYLUWOPi3sTMcimzCPc t8GLeO4mXYGhCK/bCOhfrxhzqOjRNPmGHQYsKSMoLMtwdQTao7HHnVxqi35Cf7aaBXPN laabqjcRdAxJjSvuP+8l+DIjfEIYE3mLCZbVsV56cn/y56KI40QKtgTj8C4UZFx6HWhR cMUDhQewjgGdDnMZ7cAIN1esrnWpzG6aiw8p8/QdAKGCvqZ3VTkVnz0iPvl1Fm8ZeWjp DQuA== 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 dr4-20020a170907720400b00783cf05c210si311999ejc.833.2022.09.26.03.15.35; Mon, 26 Sep 2022 03:16:00 -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 S233699AbiIZJjM (ORCPT + 99 others); Mon, 26 Sep 2022 05:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234576AbiIZJhk (ORCPT ); Mon, 26 Sep 2022 05:37:40 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 169A1326DA for ; Mon, 26 Sep 2022 02:36:59 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Mbcx73kSlz1P759; Mon, 26 Sep 2022 17:32:43 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 26 Sep 2022 17:36:52 +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; Mon, 26 Sep 2022 17:36:51 +0800 From: Longfang Liu To: , , CC: , , , Subject: [PATCH v3 1/5] hisi_acc_vfio_pci: Fixes error return code issue Date: Mon, 26 Sep 2022 17:33:28 +0800 Message-ID: <20220926093332.28824-2-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220926093332.28824-1-liulongfang@huawei.com> References: <20220926093332.28824-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: dggems701-chm.china.huawei.com (10.3.19.178) 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 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 Reviewed-by: Jason Gunthorpe 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 47174e2b61bd..4ef9761ef467 100644 --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c @@ -397,7 +397,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