linux/drivers/vfio/pci
Alexey Kardashevskiy d22f9a6c92 vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU
We execute certain NPU2 setup code (such as mapping an LPID to a device
in NPU2) unconditionally if an Nvlink bridge is detected. However this
cannot succeed on POWER8NVL machines as the init helpers return an error
other than ENODEV which means the device is there is and setup failed so
vfio_pci_enable() fails and pass through is not possible.

This changes the two NPU2 related init helpers to return -ENODEV if
there is no "memory-region" device tree property as this is
the distinction between NPU and NPU2.

Tested on
- POWER9 pvr=004e1201, Ubuntu 19.04 host, Ubuntu 18.04 vm,
  NVIDIA GV100 10de:1db1 driver 418.39
- POWER8 pvr=004c0100, RHEL 7.6 host, Ubuntu 16.10 vm,
  NVIDIA P100 10de:15f9 driver 396.47

Fixes: 7f92891778 ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")
Cc: stable@vger.kernel.org # 5.0
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2020-12-02 13:04:22 -07:00
..
Kconfig vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO 2020-10-12 11:37:59 -06:00
Makefile vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO 2020-10-12 11:37:59 -06:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci_config.c Merge branches 'v5.10/vfio/bardirty', 'v5.10/vfio/dma_avail', 'v5.10/vfio/misc', 'v5.10/vfio/no-cmd-mem' and 'v5.10/vfio/yan_zhao_fixes' into v5.10/vfio/next 2020-09-22 10:56:51 -06:00
vfio_pci_igd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfio_pci_intrs.c vfio/pci: Clear token on bypass registration failure 2020-10-19 07:13:55 -06:00
vfio_pci_nvlink2.c vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU 2020-12-02 13:04:22 -07:00
vfio_pci_private.h vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO 2020-10-12 11:37:59 -06:00
vfio_pci_rdwr.c vfio/pci: Implement ioeventfd thread handler for contended memory lock 2020-11-03 11:07:40 -07:00
vfio_pci_zdev.c vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO 2020-10-12 11:37:59 -06:00
vfio_pci.c vfio-pci: Use io_remap_pfn_range() for PCI IO memory 2020-12-02 13:03:12 -07:00