I was able to pass through a PCIE virtual function NIC from the host to
the guest. No kernel panics seen in the host.

-- Host with kernel patches --
ubuntu@seuss:~$ ethtool -i enP2p1s0f1
driver: thunder-nicvf
version: 1.0
firmware-version:
expansion-rom-version:
bus-info: 0002:01:00.1
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

ubuntu@seuss:~$ readlink /sys/bus/pci/devices/0002\:01\:00.1/driver
../../../../../../../bus/pci/drivers/thunder-nicvf
ubuntu@seuss:~$

ubuntu@seuss:~$ virsh nodedev-detach pci_0002_01_00_1
Device pci_0002_01_00_1 detached

ubuntu@seuss:~$ readlink /sys/bus/pci/devices/0002\:01\:00.1/driver
../../../../../../../bus/pci/drivers/vfio-pci
ubuntu@seuss:~$

-- Bionic Guest --

ubuntu@vm1:~$ lspci -k
00:00.0 Host bridge: Red Hat, Inc. QEMU PCIe Host bridge
        Subsystem: Red Hat, Inc QEMU PCIe Host bridge
00:01.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:01.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:01.2 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:01.3 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:01.4 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:01.5 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
        Kernel driver in use: pcieport
        Kernel modules: shpchp
01:00.0 Ethernet controller: Red Hat, Inc Virtio network device (rev 01)
        Subsystem: Red Hat, Inc Virtio network device
        Kernel driver in use: virtio-pci
02:00.0 Communication controller: Red Hat, Inc Virtio console (rev 01)
        Subsystem: Red Hat, Inc Virtio console
        Kernel driver in use: virtio-pci
03:00.0 SCSI storage controller: Red Hat, Inc Virtio block device (rev 01)
        Subsystem: Red Hat, Inc Virtio block device
        Kernel driver in use: virtio-pci
04:00.0 SCSI storage controller: Red Hat, Inc Virtio block device (rev 01)
        Subsystem: Red Hat, Inc Virtio block device
        Kernel driver in use: virtio-pci
05:00.0 Ethernet controller: Cavium, Inc. THUNDERX Network Interface Controller 
virtual function (rev 09)
        Subsystem: Cavium, Inc. THUNDERX Network Interface Controller virtual 
function
        Kernel driver in use: thunder-nicvf
        Kernel modules: nicvf
ubuntu@vm1:~$

ubuntu@vm1:~$ ethtool -i enp5s0
driver: thunder-nicvf
version: 1.0
firmware-version:
expansion-rom-version:
bus-info: 0000:05:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
ubuntu@vm1:~$


** Description changed:

  [Impact]
  Using vfio-pci on a combination of cn8xxx and some PCI devices results in a 
kernel panic. This is triggered by issuing a bus or a slot reset on the PCI 
device.
  
  [Fix]
  The following patches checks indicate that the reset is not possible
  preventing the kernel panic.
  357027786f35 PCI: Avoid bus reset if bridge itself is broken
  822155100e58 PCI: Mark Cavium CN8xxx to avoid bus reset
  33ba90aa4d44 PCI: Avoid slot reset if bridge itself is broken
  
  These patches are already in Bionic, we need these patches in Artful so
  that xenial linux-hwe also has the fix. The platforms of interest were
  certified with Xenial and linux-hwe, so we are interested in fixing this
  only in Artful.
  
  [Test]
  - Artful Host with Artful/bionic guests
  - Pass though PCI device (vfio-pci) from Artful to bionic and make sure its 
usable.
  - The device should pass through and not cause a kernel panic.
  
+ A test kernel is available in ppa:manjo/lp1770254
+ 
  [Regression Potential]
  None.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770254

Title:
  [SRU][Artful] using vfio-pci on a combination of cn8xxx and some PCI
  devices results in a kernel panic.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1770254/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to