You are not logged in.

#1 2020-05-16 10:57:24

MattMatt2
Member
Registered: 2019-03-11
Posts: 20

GeForce GTX 980 vm passtrough

Hi,
I've set up a virtual machine with KVM and I'd like to use my computer (Asus ROG G20 AJ 2015)'s gpu, a GeForce GTX 980 in this VM.
My processor is an Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
so i followed this guide: https://wiki.archlinux.org/index.php/PC … g_up_IOMMU, and I edited my grub config (/etc/default.grub):

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

I've activated intel virtualization technology in the UEFI, but when I run:

dmesg | grep -i -e DMAR -e IOMMU

I get this

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=4e591388-344e-42f8-a499-d21f0246eb54 rw intel_iommu=on iommu=pt loglevel=3 quiet
[    0.046344] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=4e591388-344e-42f8-a499-d21f0246eb54 rw intel_iommu=on iommu=pt loglevel=3 quiet
[    0.046377] DMAR: IOMMU enabled
[    0.618600] iommu: Default domain type: Passthrough (set via kernel command line)
[    0.773444] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[    0.773445] AMD-Vi: AMD IOMMUv2 functionality not available on this system
[    1.756464]     intel_iommu=on

Is iommu enabled? Actually the logs about AMD-Vi seems weird, because I haven't got any AMD hardware.
When I run the bash script:

#!/bin/bash
shopt -s nullglob
for g in /sys/kernel/iommu_groups/*; do
    echo "IOMMU Group ${g##*/}:"
    for d in $g/devices/*; do
        echo -e "\t$(lspci -nns ${d##*/})"
    done;
done;

It does return nothing, but I activated IOMMU support, and I'm sure my hardware does support it.
(the repertory /sys/kernel/iommu_groups is empty)
Doesn't my hardware support iommu, or did I do something wrong?
Thanks for your help
NOTE: I installed arch on an external SSD

Last edited by MattMatt2 (2020-05-16 10:59:56)

Offline

#2 2020-05-16 13:02:44

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,086

Re: GeForce GTX 980 vm passtrough

[    0.773444] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[    0.773445] AMD-Vi: AMD IOMMUv2 functionality not available on this system

That message comes from the amd_iommu_v2 kernel module which is a builtin for archlinux kernels (maybe an upstream choice ? ) .
For intel systems it should look exactly as the above.

https://ark.intel.com/content/www/us/en … 0-ghz.html
Your processor does support intel VT-x & VT-d .

Please post full dmesg and/or journal as well as lspci -k  output.

Last edited by Lone_Wolf (2020-05-16 13:03:16)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#3 2020-05-16 13:23:33

MattMatt2
Member
Registered: 2019-03-11
Posts: 20

Re: GeForce GTX 980 vm passtrough

Thanks for the explanation
Here is the full dmesg https://pastebin.com/GxYSYCFC
The full journal https://drive.google.com/open?id=1-FVc8 … dEvORh7tZm
lspci -k:

00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. 4th Gen Core Processor DRAM Controller
        Kernel driver in use: hsw_uncore
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
        Kernel driver in use: pcieport
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB xHCI Controller
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family ME Interface
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
        DeviceName:  Onboard LAN
        Subsystem: ASUSTeK Computer Inc. Ethernet Connection (2) I218-V
        Kernel driver in use: e1000e
        Kernel modules: e1000e
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB EHCI Controller
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family HD Audio Controller
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)
        Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family USB EHCI Controller
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation H97 Chipset LPC Controller
        Subsystem: ASUSTeK Computer Inc. H97 Chipset LPC Controller
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich
00:1f.2 RAID bus controller: Intel Corporation SATA Controller [RAID mode]
        Subsystem: ASUSTeK Computer Inc. SATA Controller [RAID mode]
        Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
        Subsystem: ASUSTeK Computer Inc. 9 Series Chipset Family SMBus Controller
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 980] (rev a1)
        Subsystem: NVIDIA Corporation GM204 [GeForce GTX 980]
        Kernel driver in use: nouveau
        Kernel modules: nouveau
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
        Subsystem: NVIDIA Corporation GM204 High Definition Audio Controller
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter
        Subsystem: AzureWave RTL8821AE 802.11ac PCIe Wireless Network Adapter
        Kernel driver in use: rtl8821ae
        Kernel modules: rtl8821ae

Offline

Board footer

Powered by FluxBB