lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 31 May 2019 11:28:02 +0800
From:   Hao Zheng <yinhe@...ux.alibaba.com>
To:     bhelgaas@...gle.com
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        nanhai.zou@...ux.alibaba.com, Hao Zheng <yinhe@...ux.alibaba.com>,
        Quan Xu <quan.xu0@...ux.alibaba.com>
Subject: [PATCH 1/1] PCI/IOV: fix cfg_size setting for multiple vfio-devices

When there are multiple vfio devices, only the cfg_size of first
vfio device can be correctly set to 4096. The cfg_size of other
vfio devices are incorrectly set to 256.

This will cause an error when live migrating a virtual machine with
vfio devices to multiple destinations. Fix this by setting correct
pcie_cap field before cfg_size initialize.

Signed-off-by: Hao Zheng <yinhe@...ux.alibaba.com>
Signed-off-by: Quan Xu <quan.xu0@...ux.alibaba.com>
cc: Zou Nanhai <nanhai.zou@...ux.alibaba.com>
---
 drivers/pci/iov.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 3aa115e..239fad1 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -133,6 +133,7 @@ static void pci_read_vf_config_common(struct pci_dev *virtfn)
 	pci_read_config_word(virtfn, PCI_SUBSYSTEM_ID,
 			     &physfn->sriov->subsystem_device);
 
+	set_pcie_port_type(virtfn);
 	physfn->sriov->cfg_size = pci_cfg_space_size(virtfn);
 }
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ