You are not logged in.

#1 2017-08-01 16:20:03

buptwugh
Member
Registered: 2017-06-10
Posts: 9

[Solved] Nvidia 1070 GPU passthrough not work.

Hi,

I follow arch wiki https://wiki.archlinux.org/index.php/PC … h_via_OVMF to pass my gpu to virtual machine.

I have isolate my GPU use vfio, here is output of lspci.

╭─wuguohua@highspeed ~  
╰─$ lspci -k                                                                                                                                                                                                 127 ↵
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 07)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Kernel driver in use: skl_uncore
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Kernel driver in use: i915
	Kernel modules: i915
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Kernel driver in use: ahci
	Kernel modules: ahci
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1d.2 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #11 (rev f1)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1d.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #12 (rev f1)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 8694
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 8694
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 86c7
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device 3302
	Kernel driver in use: vfio-pci
	Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device 3302
	Kernel driver in use: vfio-pci
	Kernel modules: snd_hda_intel
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
	Kernel modules: shpchp
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
	Subsystem: ASUSTeK Computer Inc. Device 8677
	Kernel driver in use: r8169
	Kernel modules: r8169

I want to pass "NVIDIA Corporation GP104 [GeForce GTX 1070]" to virtual machine.

Here is my IOMMU groups.

╭─wuguohua@highspeed ~  
╰─$ #!/bin/bash          
shopt -s nullglob
for d in /sys/kernel/iommu_groups/*/devices/*; do
    n=${d#*/iommu_groups/*}; n=${n%%/*}
    printf 'IOMMU Group %s ' "$n"
    lspci -nns "${d##*/}"
done;
zsh: command not found: shopt
IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation Skylake Host Bridge/DRAM Registers [8086:191f] (rev 07)
IOMMU Group 10 00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-H LPC Controller [8086:a148] (rev 31)
IOMMU Group 10 00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-H PMC [8086:a121] (rev 31)
IOMMU Group 10 00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
IOMMU Group 10 00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-H SMBus [8086:a123] (rev 31)
IOMMU Group 11 04:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 04)
IOMMU Group 12 06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Skylake PCIe Controller (x16) [8086:1901] (rev 07)
IOMMU Group 1 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1070] [10de:1b81] (rev a1)
IOMMU Group 1 01:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)
IOMMU Group 2 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
IOMMU Group 3 00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] (rev 31)
IOMMU Group 4 00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] (rev 31)
IOMMU Group 5 00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] (rev 31)
IOMMU Group 6 00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #5 [8086:a114] (rev f1)
IOMMU Group 7 00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #9 [8086:a118] (rev f1)
IOMMU Group 8 00:1d.2 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #11 [8086:a11a] (rev f1)
IOMMU Group 9 00:1d.3 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #12 [8086:a11b] (rev f1)

Here is my vfio.conf

╰─$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1b81,10de:10f0

I have install win10 success by virt-manager. But when I remove 'spice channel and virtual display, the QXL video adapter' devices,
and Add two PCI device:

0000:01:00:0 NVIDIA Corporation GP104 [GeForce GTX 1070]
0000:01:00:1 NVIDIA Corporation GP104 High Definition Audio Controller

to my virtual machine. Then I turn on my virtual machine, I can not see any output from my monitor that connect to my GTX 1070.

Could you please give me some advice, I have search google for long time.

Thx, Wuguohua

Last edited by buptwugh (2017-08-02 14:50:51)

Offline

#2 2017-08-01 19:01:50

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,142

Re: [Solved] Nvidia 1070 GPU passthrough not work.

Unless you use a Quattro card, Nvidia windows drivers disable themselves and the hardware when run in a VM.

It can be worked around, see
https://wiki.archlinux.org/index.php/PC … indows_VMs

Last edited by Lone_Wolf (2017-08-01 19:02:07)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB