You are not logged in.

#1 2017-04-30 14:14:47

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

[PCI Passthrough] KVM Setup Problems

So I've been trying to get a KVM going with Windows 10 for gaming and writing up a quick guide for myself and anyone who wants to go through it.
But I'm running into some issues with isolating the 2nd GPU.

PC Specs
Motherboard:   Asus ROG MAXIMUS VII HERO
RAM:               Corsair 2x8GB (16GB)
CPU:                Intel i7 4790K @ 4.0GHz
GPU:               NVIDIA GTX 710
                        NVIDIA GTX 970
Hard Drives:    Samsung EVO 840 120GB (Archlinux)
                        Samsung EVO 840 500GB (Windows 10)


Here's the Guide:
https://github.com/Pheoxy/kvm-gaming/bl … install.md

My setup I was planning to use 1 Screen but 2 different ports. DVI for Guest (Windows 10) and HDMI for Host (Archlinux).

I'm using 2 NVIDIA GPU's:

01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)
04:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 710B] (rev a1)

Because the GPU for the Guest is the DVI corded one my monitor takes it first on install's so I completely forgot and now it boots and starts up with the GTX 970 as the main screen but that's the one I'm trying to isolate . When I tried to isolate it and switch to HDMI on my monitor it just didn't register at all that the GT 710 was even there just times out the monitor and switchs back to DVI.
Unless I press CTRL+ALT+F2 which just brings up starting version 232 of the systemd boot sequence and looking through the Arch Wiki and some google-fu and even going through the filesystem I couldn't find the config files for the screens.

I'm using the nvidia-lts package with the linux-lts kernel. However I can't find nvidia-settings within the nvidia-lts package, its in the extras repository but I'm weary of using that in case it generates more issues.

Any help would be awesome so thanks in advance.

Last edited by Pheoxy (2017-04-30 14:25:10)

Offline

#2 2017-05-01 11:44:13

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

Re: [PCI Passthrough] KVM Setup Problems


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

#3 2017-05-01 12:39:43

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:

That's the guide I was following to set it up. When I get to this part after building the kernel:

Reboot and verify that vfio-pci has loaded properly and that it is now bound to the right devices.

It doesn't boot properly through HDMI as I think because I installed arch using the guest GPU.
Forgot it was defaulting to that too with DVI so I think it isn't registering which hopefully means its isolating the GPU properly but then it isn't swapping to the Host GPU because I don't think it knows to use it.

But the config files that the arch wiki "https://wiki.archlinux.org/index.php/NV … A_Settings" is talking about are all missing. So I'm a bit confused how to switch it over to the other GPU.

Is there a way to check?

xrandr

Just tells me:

xrandr: command not found

Same when I do it with:

sudo

Last edited by Pheoxy (2017-05-01 12:40:31)

Offline

#4 2017-05-01 13:25:27

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

Re: [PCI Passthrough] KVM Setup Problems

xrandr is in xorg-xrandr, did you setup graphical environment ?

Your processor normally has an integrated intel gpu , are you sure you don't have that ?

Which gpu / card is set as primary in uefi firmware  ?

for now revert to non-vfio boot, and post full lspci -k output .
If you already have graphic setup for host, also post xorg log of non-vfio boot.


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

#5 2017-05-01 13:40:49

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

I installed linux-lts, nvidia-lts, sddm, enabled sddm.service, plasma, kde-applications I can boot into sddm and then login to get to plasma.

I didn't specifically install xorg it self except through dependencies through the above packages.

Guest GPU is in the Primary slot because it's the only one that supports PCIE_3.
I'll update after I have double checked it in the UEFI Settings.


sudo lspci -k
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. Device 8534
        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
        Kernel modules: shpchp
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
        Subsystem: ASUSTeK Computer Inc. Device 8534
        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. Device 8534
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
        Subsystem: ASUSTeK Computer Inc. Device 85c4
        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. Device 8534
        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. Device 8602
        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 1 (rev d0)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.4 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 5 (rev d0)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
        Subsystem: ASUSTeK Computer Inc. Device 8534
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation 9 Series Chipset Family Z97 LPC Controller
        Subsystem: ASUSTeK Computer Inc. Device 8534
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
        Subsystem: ASUSTeK Computer Inc. Device 8534
        Kernel driver in use: ahci
        Kernel modules: ahci
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
        Subsystem: ASUSTeK Computer Inc. Device 8534
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 8531
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 8531
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
        Subsystem: ASUSTeK Computer Inc. Device 858d
        Kernel driver in use: ahci
        Kernel modules: ahci
04:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 710B] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 8572
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
04:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 8572
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

Last edited by Pheoxy (2017-05-01 14:03:26)

Offline

#6 2017-05-01 13:49:53

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Turns out both slots support PCIE_3.

Yeh it's in the Primary Slot. Should I move it to the second slot?

Offline

#7 2017-05-02 09:47:57

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:

xrandr is in xorg-xrandr, did you setup graphical environment ?

Your processor normally has an integrated intel gpu , are you sure you don't have that ?

Which gpu / card is set as primary in uefi firmware  ?

for now revert to non-vfio boot, and post full lspci -k output .
If you already have graphic setup for host, also post xorg log of non-vfio boot.

Never mind I seem to have got it working with swapping the GPU's around so now its using HDMI.

Have to see how it goes from here.

Offline

#8 2017-05-02 12:24:35

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

Re: [PCI Passthrough] KVM Setup Problems

Never mind I seem to have got it working with swapping the GPU's around so now its using HDMI.

That is what i would have suggested.

During boot / console linux uses the primary card to display things, only in X / wayland it's possible to use a different card.
What the primary card is is decided by firmware, not by kernel.

I suggest you add something to your guide like :

figure out which card is seen as primary by linux and make sure that card is available for the host.
If that results in bad performance for the guest card : blame your hardware, not linux.


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

#9 2017-05-02 13:55:42

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:

Never mind I seem to have got it working with swapping the GPU's around so now its using HDMI.

That is what i would have suggested.

During boot / console linux uses the primary card to display things, only in X / wayland it's possible to use a different card.
What the primary card is is decided by firmware, not by kernel.

I suggest you add something to your guide like :

figure out which card is seen as primary by linux and make sure that card is available for the host.
If that results in bad performance for the guest card : blame your hardware, not linux.

So I got a bit further and OVMF is being annoying after I installed ovmf-git and added:

nvram = [
	"/usr/share/ovmf/ovmf_code_x64.bin:/usr/share/ovmf/ovmf_vars_x64.bin"
]

to the

/etc/libvirt/qemu.conf

It's not being detected when I go to change it via the virt-manger.

But just to test if the pass through was working I tried BIOS anyway:

Unable to complete install: 'internal error: qemu unexpectedly closed the monitor: 2017-05-02T13:34:28.761192Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x5: vfio error: 0000:02:00.0: group 1 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 2288, in _do_async_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 477, in start_install
    doboot, transient)
  File "/usr/share/virt-manager/virtinst/guest.py", line 405, in _create_guest
    self.domain.create()
  File "/usr/lib/python2.7/site-packages/libvirt.py", line 1039, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: qemu unexpectedly closed the monitor: 2017-05-02T13:34:28.761192Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x5: vfio error: 0000:02:00.0: group 1 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

lspci -nnk -d 10de:13c2 returns:

02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8531]
        Kernel driver in use: vfio-pci
        Kernel modules: nouveau, nvidia_drm, nvidia

lspci -nnk -d 10de:0fbb returns:

02:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8531]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

ls -l /sys/bus/pci/devices/0000:02:00.0/iommu_group/devices/ gives me:

total 0
lrwxrwxrwx 1 root root 0 May  2 21:39 0000:00:01.0 -> ../../../../devices/pci0000:00/0000:00:01.0
lrwxrwxrwx 1 root root 0 May  2 21:39 0000:00:01.1 -> ../../../../devices/pci0000:00/0000:00:01.1
lrwxrwxrwx 1 root root 0 May  2 21:39 0000:01:00.0 -> ../../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0
lrwxrwxrwx 1 root root 0 May  2 21:39 0000:01:00.1 -> ../../../../devices/pci0000:00/0000:00:01.0/0000:01:00.1
lrwxrwxrwx 1 root root 0 May  2 21:39 0000:02:00.0 -> ../../../../devices/pci0000:00/0000:00:01.1/0000:02:00.0
lrwxrwxrwx 1 root root 0 May  2 21:39 0000:02:00.1 -> ../../../../devices/pci0000:00/0000:00:01.1/0000:02:00.1

So going by the last one I think it means it's still being grabbed by the Host?

Offline

#10 2017-05-02 14:25:00

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

Re: [PCI Passthrough] KVM Setup Problems

vfio error: 0000:02:00.0: group 1 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.'

That error suggests there may be more hardware in that iommu group then you think.

please post the output of the command listed here : https://wiki.archlinux.org/index.php/PC … _are_valid


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

#11 2017-05-02 14:37:56

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:
vfio error: 0000:02:00.0: group 1 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.'

That error suggests there may be more hardware in that iommu group then you think.

please post the output of the command listed here : https://wiki.archlinux.org/index.php/PC … _are_valid

Here's the output:

IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
IOMMU Group 10 00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
IOMMU Group 11 00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
IOMMU Group 11 00:1f.2 SATA controller [0106]: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] [8086:8c82]
IOMMU Group 11 00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
IOMMU Group 12 04:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02)
IOMMU Group 13 05:00.0 Network controller [0280]: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
IOMMU Group 1 00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller [8086:0c05] (rev 06)
IOMMU Group 1 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 710B] [10de:128b] (rev a1)
IOMMU Group 1 01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
IOMMU Group 1 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
IOMMU Group 1 02:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
IOMMU Group 2 00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
IOMMU Group 3 00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
IOMMU Group 4 00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1]
IOMMU Group 5 00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
IOMMU Group 6 00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
IOMMU Group 7 00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
IOMMU Group 8 00:1c.3 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 [8086:8c96] (rev d0)
IOMMU Group 9 00:1c.6 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 7 [8086:8c9c] (rev d0)

Offline

#12 2017-05-02 14:43:10

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

Re: [PCI Passthrough] KVM Setup Problems

IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
IOMMU Group 1 00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller [8086:0c05] (rev 06)
IOMMU Group 1 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 710B] [10de:128b] (rev a1)
IOMMU Group 1 01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
IOMMU Group 1 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
IOMMU Group 1 02:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)

problem found, both your videocards and their controllers are in the same iommu group.

You will need a patched kernel , see https://wiki.archlinux.org/index.php/PC … e_patch.29 .


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

#13 2017-05-02 15:14:28

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
IOMMU Group 1 00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller [8086:0c05] (rev 06)
IOMMU Group 1 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 710B] [10de:128b] (rev a1)
IOMMU Group 1 01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
IOMMU Group 1 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
IOMMU Group 1 02:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)

problem found, both your videocards and their controllers are in the same iommu group.

You will need a patched kernel , see https://wiki.archlinux.org/index.php/PC … e_patch.29 .

Because I prefer the lts packages I would have to build the patch into the linux-lts kernel (4.9.25-1) as the linux-vfio-lts (4.9.20-1) is out of date and may conflict with my other lts packages like nivida-lts?

I would need to follow this I'm assuming:
https://wiki.archlinux.org/index.php/Ke … ild_System

And somehow include this?
https://aur.archlinux.org/cgit/aur.git/ … x-vfio-lts


Or just try and update it myself until the maintainer catch's up?

Offline

#14 2017-05-02 15:29:41

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

UEFI is working now to, just a typo in

/etc/libvirt/qemu.conf

for the nvram that I fixed.

Offline

#15 2017-05-03 10:48:01

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

Re: [PCI Passthrough] KVM Setup Problems

Using AUR linux-vfio-lts as base and update it is by far simplest option.

It was last updated on april 6, so it's not really that old.


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

#16 2017-05-03 11:08:31

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:

Using AUR linux-vfio-lts as base and update it is by far simplest option.

It was last updated on april 6, so it's not really that old.

I was just worried, I also just spent around 4 hours learning how to build a kernel and I just noticed I could change 2 things in the pkgbuild and its building linux-vfio-lts 4.9.25 now.

Hope it works. Seems to be building fine.

Offline

#17 2017-05-03 13:53:56

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Here's the output of  https://wiki.archlinux.org/index.php/PC … _are_valid after installing linux-vfio-lts:

IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
IOMMU Group 10 00:1c.6 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 7 [8086:8c9c] (rev d0)
IOMMU Group 11 00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
IOMMU Group 12 00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
IOMMU Group 12 00:1f.2 SATA controller [0106]: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] [8086:8c82]
IOMMU Group 12 00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
IOMMU Group 13 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 710B] [10de:128b] (rev a1)
IOMMU Group 13 01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
IOMMU Group 14 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
IOMMU Group 14 02:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
IOMMU Group 15 04:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02)
IOMMU Group 16 05:00.0 Network controller [0280]: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
IOMMU Group 2 00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller [8086:0c05] (rev 06)
IOMMU Group 3 00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
IOMMU Group 4 00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
IOMMU Group 5 00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1]
IOMMU Group 6 00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
IOMMU Group 7 00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
IOMMU Group 8 00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
IOMMU Group 9 00:1c.3 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 [8086:8c96] (rev d0)

It seems to work but now sddm.service is crashing on boot with:

sddm-helper[1243]: Received a wrong opcode instead of AUTHENTICATED: 0

Switch back to linux-lts kernel and it boots fine.

Offline

#18 2017-05-04 11:02:20

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Got it working, had to install xorg-randr for some information and blacklist nouvea in kernel and add nvidia to kernel options nvidia_drm.modeset=1 so that it would stop trying to load with nouvea even though it should have already been blacklisted.

I got the GPU to pass-through but Windows 10 setup crashes during install but I can start the setup at least and see windows on the other input.
Trying to load virtio drivers to see if it fixes it.

If anyone has some awesome scripts and configurations for the KVM it would save me some time.

Offline

#19 2017-05-04 12:15:25

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

Re: [PCI Passthrough] KVM Setup Problems

Did you make the changes mentioned here :
https://wiki.archlinux.org/index.php/PC … indows_VMs ?


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

#20 2017-05-04 13:47:41

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Lone_Wolf wrote:

Did you make the changes mentioned here :
https://wiki.archlinux.org/index.php/PC … indows_VMs ?

Yes I did that and everything seems to be working.

I passed through my:

  • NVIDIA GTX 970

  • TP-Link T9E Wireless PCIE (Less hassle with Network Bridges)

  • USB Keyboard, Mouse, Headphones, Xbox One Controller

I'm confused about how to install the VM onto a SSD though, I'm pretty sure it still has to be an image and that there's a few optimisations to do with SSD's and the CPU I have to figure out now.

The virt-manager config:

<domain type='kvm'>
  <name>win10</name>
  <uuid>e2555a5d-42cb-4d87-96cd-e2636d8b9372</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.9'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/ovmf/x64/ovmf_code_x64.bin</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='whatever'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
    <vmport state='off'/>
  </features>
  <cpu mode='host-model' check='partial'>
    <model fallback='allow'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/sbin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/pheoxy/VM/win10.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </controller>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x0202'/>
      </source>
      <address type='usb' bus='0' port='1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc051'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x1b1c'/>
        <product id='0x0a2b'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x07b2'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Thanks for all of your help!
I've finally got this figured out, it only took 6 months!

Last edited by Pheoxy (2017-05-04 14:08:06)

Offline

#21 2017-05-04 15:54:39

Pheoxy
Member
From: Australia
Registered: 2016-08-18
Posts: 34

Re: [PCI Passthrough] KVM Setup Problems

Hmm. Host is hanging after some optimizations on KVM start..

Offline

Board footer

Powered by FluxBB