提交 16015952 编写于 作者: L Longfang Liu 提交者: Zheng Zengkai

vfio/migration: bugfix queue isolation configuration

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4JA4W

----------------------------------------------------------------------

In the previous driver, the queue isolation configuration register of
the PF page was mixed with the queue isolation configuration register of
the VF page, which resulted in mismatch and error in the configuration
information during migration. Because the BIT0 of the queue isolation
register of the PF page is consistent with the value of the queue
isolation register of the VF page, Therefore, driver can only read
the registers of the VF page.
Signed-off-by: NLongfang Liu <liulongfang@huawei.com>
Signed-off-by: NYang Shen <shenyang39@huawei.com>
Reviewed-by: NHao Fang <fanghao11@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 66d64f28
...@@ -381,12 +381,6 @@ static int qm_rw_regs_write(struct hisi_qm *qm, struct acc_vf_data *vf_data) ...@@ -381,12 +381,6 @@ static int qm_rw_regs_write(struct hisi_qm *qm, struct acc_vf_data *vf_data)
return ret; return ret;
} }
ret = qm_write_reg(qm, QM_QUE_ISO_CFG_V, &vf_data->que_iso_cfg, 1);
if (ret) {
dev_err(dev, "failed to write QM_QUE_ISO_CFG_V!\n");
return ret;
}
ret = qm_write_reg(qm, QM_PAGE_SIZE, &vf_data->page_size, 1); ret = qm_write_reg(qm, QM_PAGE_SIZE, &vf_data->page_size, 1);
if (ret) { if (ret) {
dev_err(dev, "failed to write QM_PAGE_SIZE!\n"); dev_err(dev, "failed to write QM_PAGE_SIZE!\n");
...@@ -518,6 +512,7 @@ static int vf_match_info_check(struct hisi_qm *qm, ...@@ -518,6 +512,7 @@ static int vf_match_info_check(struct hisi_qm *qm,
struct acc_vf_migration *acc_vf_dev) struct acc_vf_migration *acc_vf_dev)
{ {
struct acc_vf_data *vf_data = acc_vf_dev->vf_data; struct acc_vf_data *vf_data = acc_vf_dev->vf_data;
struct hisi_qm *pf_qm = acc_vf_dev->pf_qm;
struct device *dev = &qm->pdev->dev; struct device *dev = &qm->pdev->dev;
u32 que_iso_state; u32 que_iso_state;
int ret; int ret;
...@@ -541,7 +536,7 @@ static int vf_match_info_check(struct hisi_qm *qm, ...@@ -541,7 +536,7 @@ static int vf_match_info_check(struct hisi_qm *qm,
} }
/* vf isolation state check */ /* vf isolation state check */
ret = qm_read_reg(qm, QM_QUE_ISO_CFG_V, &que_iso_state, 1); ret = qm_read_reg(pf_qm, QM_QUE_ISO_CFG_V, &que_iso_state, 1);
if (ret) { if (ret) {
dev_err(dev, "failed to read QM_QUE_ISO_CFG_V!\n"); dev_err(dev, "failed to read QM_QUE_ISO_CFG_V!\n");
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册