You are not logged in.

#1 2018-09-07 23:58:23

manasij7479
Member
Registered: 2011-10-20
Posts: 31

How do I setup one of my GPUs for VGA passthrough with KVM?

I am trying to pass the 0a:00.0 device to a windows host.
Here is a list of my VGA devices (lspci -nnk).

09:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1)
        Subsystem: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:11d7]
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
09:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)
        Subsystem: NVIDIA Corporation GP106 High Definition Audio Controller [10de:11d7]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
0a:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP108 [GeForce GT 1030] [10de:1d01] (rev a1)
        Subsystem: Gigabyte Technology Co., Ltd GP108 [GeForce GT 1030] [1458:375d]
        Kernel modules: nouveau, nvidia_drm, nvidia
0a:00.1 Audio device [0403]: NVIDIA Corporation GP108 High Definition Audio Controller [10de:0fb8] (rev a1)
        Subsystem: Gigabyte Technology Co., Ltd GP108 High Definition Audio Controller [1458:375d]
        Kernel driver in use: snd_hda_intel

The log (dmesg) below shows that removal of this device fails.

[ 1365.364042] NVRM: Attempting to remove minor device 1 with non-zero usage count!
[ 1365.364222] WARNING: CPU: 13 PID: 4083 at /build/nvidia/src/NVIDIA-Linux-x86_64-396.54/kernel/nvidia/nv.c:4057 nvidia_remove+0x2e6/0x310 [nvidia]
[ 1365.364223] Modules linked in: vfio_pci vfio_virqfd vfio_iommu_type1 vfio xt_CHECKSUM ipt_MASQUERADE xt_conntrack ipt_REJECT xt_tcpudp nf_tables_set nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat_ipv6 nft_chain_nat_ipv4 nf_tables ebtable_nat ebtable_broute ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bpfilter tun bridge stp llc devlink snd_hda_codec_hdmi cfg80211 rfkill 8021q mrp nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) edac_mce_amd kvm_amd snd_hda_codec_realtek
[ 1365.364255]  snd_hda_codec_generic kvm drm_kms_helper snd_hda_intel irqbypass mousedev joydev crct10dif_pclmul input_leds crc32_pclmul led_class wmi_bmof mxm_wmi drm snd_hda_codec igb ghash_clmulni_intel pcbc snd_hda_core agpgart aesni_intel snd_hwdep ipmi_devintf snd_pcm i2c_algo_bit ccp ipmi_msghandler dca aes_x86_64 crypto_simd cryptd syscopyarea sysfillrect glue_helper sysimgblt rng_core fb_sys_fops snd_timer sp5100_tco pcspkr snd i2c_piix4 k10temp soundcore rtc_cmos wmi pinctrl_amd gpio_amdpt evdev mac_hid pcc_cpufreq acpi_cpufreq vboxnetflt(O) vboxnetadp(O) vboxpci(O) vboxdrv(O) crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto sd_mod hid_generic usbhid hid ahci xhci_pci libahci crc32c_intel xhci_hcd libata usbcore scsi_mod usb_common

How do I stop this from happening and still use the nvidia driver on my host for one of the GPUs?

Offline

#2 2018-09-08 15:43:20

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: How do I setup one of my GPUs for VGA passthrough with KVM?

There are no devices claimed by vfio-pci in that list.

If you are trying to setup qemu* / ovmf check https://wiki.archlinux.org/index.php/PC … h_via_OVMF

post the output of the script shown in 2.2 ensuring that the groups are valid .


* KVM was integrated in Qemu a long time ago.


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB