You are not logged in.

#726 2013-11-13 21:45:29

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Val532 wrote:

So i made some test with this methode but no luck. Virt Manager say to me a lot of difrente error.
Sometime AppArmor error, sometime connection reset by peer.

My Hardware is:

Corei5 4670S so HD4600 for the host
24Go ram (3*8Go)
Asrock Z87 Extrem 6
AMD HD7770 for the first VM
AMD HD5570 for the second VM
AMD HD5570 fot the third Vm

All of the graphic card work.

For the moment i've only Windows 7 on the first VM, the seconde and third come later.

Well try disabling apparmor, you could also use the qemu monitor for your vm's, launch qemu with -monitor stdio

Offline

#727 2013-11-13 22:21:17

cryptonymous
Member
Registered: 2013-11-05
Posts: 6

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:
aw wrote:

Testing a Linux guest w/ a GTX660, I can confirm that things go bad when using the NV_RegEnableMSI=1 option.  This worked fine for me with a Quadro card.  I see a single interrupt and the monitor goes out of sync and never comes back after OS bootup.  I'll try to find some time to dig into it.  I also note that the audio driver specifically checks for nvidia devices and blacklists MSI on snd-hda-intel, so at some point nvidia hasn't played nicely with Linux MSI support.  Perhaps there's a reason why the Linux nvidia driver defaults to INTx as well.

Good news/bad news...

Good news: I figured out the problem and posted a patch that solves it on my GTX660: http://lists.nongnu.org/archive/html/qe … 01390.html

Bad news: This means that for every MSI interrupt, the Nvidia driver does a write to MMIO space at an offset that QEMU needs to trap in order to "virtualize" the device.  That may negate any performance benefit of MSI vs INTx.  As noted in the patch we might be able to use an ioeventfd to make handling more asynchronous, but the overhead is probably still more than INTx, which we can handle without exiting to QEMU userspace.

Thanks, "3950205 vfio-pci: Fix Nvidia MSI ACK through 0x88000 quirk" has fixed the interrupt issue on my GTX 650 in OS X guest.

Offline

#728 2013-11-13 22:37:37

Val532
Member
Registered: 2013-11-13
Posts: 35

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

nbhs wrote:

Well try disabling apparmor, you could also use the qemu monitor for your vm's, launch qemu with -monitor stdio

So i've disabled apparmor but it does not slove my problem.

I've tried a lot of differente .xml but some time it does not show in virt manager, sometime it's say Connection reset by peer (when i put pc-q35-1.7 instead of 440).

I'm completly lost ^^.

ps: my .xml

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit windows7test
or other application using the libvirt API.
-->

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>windows7test</name>
  <uuid>79afd66a-f479-8c9c-c66f-2ac53f1c110c</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-1.7'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='host'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='smx'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='abm'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='pdpe1gb'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='rdrand'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='monitor'/>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writethrough' io='native'/>
      <source file='/home/val/windows2'/>
      <target dev='sda' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:4c:d9:7a'/>
      <source bridge='br0'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.1,bus=root.1,addr=00.1'/>
    <qemu:arg value='-bios'/>
    <qemu:arg value='/usr/share/qemu/bios.bin'/>
  </qemu:commandline>
</domain>

Last edited by Val532 (2013-11-13 23:03:54)

Offline

#729 2013-11-13 23:25:13

Norcoen
Member
From: Norway
Registered: 2013-11-02
Posts: 23

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

I'm using everything provided in post#1, including startup script, but as soon as I try to pass pci/pcie devices I get this error:

qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: error opening /dev/vfio/9: No such file or directory
qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: failed to get group 9
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device 'vfio-pci' could not be initialized
cset: --> deactivating/reseting shielding
cset: **> shielding not active on system
All Done!!

What does it mean, why does /dev/vfio/9 not exist?
What did I do wrong?

My versions of your scripts:
Assign PCI devices to pci-stub

modprobe pci_stub

# 2. onboard Ethernetcontroller/Lankarte
echo "8086 1539" > /sys/bus/pci/drivers/pci-stub/new_id

echo 0000:04:00.0 > /sys/bus/pci/devices/0000:04:00.0/driver/unbind
echo 0000:04:00.0 > /sys/bus/pci/drivers/pci-stub/bind


# PCI bridge der PCIe Karte:
echo "10b5 8603" > /sys/bus/pci/drivers/pci-stub/new_id

echo 0000:06:00.0 > /sys/bus/pci/devices/0000:06:00.0/driver/unbind
echo 0000:06:00.0 > /sys/bus/pci/drivers/pci-stub/bind
echo 0000:07:01.0 > /sys/bus/pci/devices/0000:07:01.0/driver/unbind
echo 0000:07:01.0 > /sys/bus/pci/drivers/pci-stub/bind
echo 0000:07:02.0 > /sys/bus/pci/devices/0000:07:02.0/driver/unbind
echo 0000:07:02.0 > /sys/bus/pci/drivers/pci-stub/bind


# S-ATA Controller PCIe: 
echo "1b21 0612" > /sys/bus/pci/drivers/pci-stub/new_id
echo "1b21 1060" > /sys/bus/pci/drivers/pci-stub/new_id

echo 0000:08:00.0 > /sys/bus/pci/devices/0000:08:00.0/driver/unbind
echo 0000:08:00.0 > /sys/bus/pci/drivers/pci-stub/bind


# USB3 Controller der PCIe Karte:
echo "1912 0015" > /sys/bus/pci/drivers/pci-stub/new_id

echo 0000:09:00.0 > /sys/bus/pci/devices/0000:09:00.0/driver/unbind
echo 0000:09:00.0 > /sys/bus/pci/drivers/pci-stub/bind

Startup Script

#!/bin/sh

CPU_CORE_NR=$(cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l)

QEMU=/home/neocron/qemu-1.6.50/bin/qemu-system-x86_64
CSET=/home/neocron/qemu-git/cpuset-1.5.6/usr/bin/cset

VCPUS="8" #must be > 0 < cpu core number
CPU="Haswell"
MEM="8192"
MEM_PATH=""
BIOS="/home/neocron/qemu-1.6.50/share/qemu/bios.bin"
#NET="-netdev bridge,br=br0,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0"
NET=""
USB_DEVICES=""
#PCI_DEVICES="00:11.0 04:00.0 05:00.0 06:00.0"
PCI_DEVICES="04:00.0 06:00.0 07:01.0 07:02.0 08:00.0 09:00.0"
#PCI_DEVICES=""
GPU="01:00.0"
GPU_SND="01:00.1"
#SND=true
SND=false
SND_DRIVER_OPTS="QEMU_AUDIO_DRV=alsa QEMU_ALSA_DAC_BUFFER_SIZE=512 QEMU_ALSA_DAC_PERIOD_SIZE=170"
#VBIOS="/home/neocron/qemu-1.6.50/share/qemu/vgabios-6950.bin"
VBIOS=""
CDROM="/home/neocron/Dokumente/KVM/Win7.SP1.AiO.PreActivated.Multilanguage/Win_7_AiO_Ar-En-Fr-Ge_Pre-Activated.iso"
#HDD="/dev/mapper/vgRaidHDDs-win7ult"
HDD="/media/BigStorage/Temp/windowskvm.img"
#HDD=""
QEMU_ARGS=" -M q35 -enable-kvm -monitor stdio"
EXTRA_ARGS="-boot menu=on"
	
if [ -n "$GPU" ]; then
	EXTRA_ARGS+=" -vga none -nographic"
	DEV+=" -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1"
	if [ -n "$VBIOS" ]; then
		DEV+=" -device vfio-pci,host=$GPU,x-vga=on,addr=0.0,multifunction=on,bus=root.1,rombar=0,romfile=$VBIOS"
	else
		DEV+=" -device vfio-pci,host=$GPU,x-vga=on,addr=0.0,multifunction=on,bus=root.1"
	fi
  
	if [ -n "$GPU_SND" ]; then
		DEV+=" -device vfio-pci,host=$GPU_SND,addr=0.1,bus=root.1"
	fi
fi

if [ -n "$PCI_DEVICES" ]; then
	for d in $PCI_DEVICES; do
		DEV+=" -device vfio-pci,host=$d"
	done
fi 


if [ -n "$HDD" ] || [ -n "$CDROM" ]; then
	DEV+="  -device ahci,bus=pcie.0,id=ahci"
	if [ -n "$HDD" ]; then
		STORAGE+=" -drive file=$HDD,id=disk,format=raw -device ide-hd,bus=ahci.0,drive=disk"
	fi
	if [ -n "$CDROM" ]; then
		STORAGE+=" -drive file=$CDROM,id=isocd -device ide-cd,bus=ahci.1,drive=isocd"
	fi
fi

if [ -n "$CPU" ]; then
	CPU="-cpu $CPU -smp $VCPUS,sockets=1,cores=$VCPUS,threads=1"
else
	CPU="-smp $VCPUS,sockets=1,cores=$VCPUS,threads=1"
fi

if [ -n "$BIOS" ]; then
	BIOS=" -bios $BIOS"
fi

if $SND ; then
	SND="-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 -device hda-duplex,cad=0"
	export $SND_DRIVER_OPTS
else
	SND=""
fi

if [ -n "$MEM" ]; then
	MEMORY+="-m $MEM"
	if [ -n "$MEM_PATH" ]; then
		MEMORY+=" -mem-path $MEM_PATH"
	fi
fi

if [ -n "$USB_DEVICES" ]; then
	for u in $USB_DEVICES; do
		USB_DEV+=" -usbdevice $u"
	done
fi

$CSET shield -c $((CPU_CORE_NR-VCPUS))-$((CPU_CORE_NR-1))
set -m

$QEMU $BIOS $CPU $MEMORY $QEMU_ARGS $DEV $USB_DEV $NET $SND $STORAGE  $EXTRA_ARGS &

PID=$!
(
while ( (kill -s 0 $PID > /dev/null 2>&1) ); do
	if [ "$(grep Threads /proc/$PID/status | awk '{print $2}' )" -ge "$((VCPUS+1))" > /dev/null 2>&1 ]; then
		i=$((CPU_CORE_NR-VCPUS))
		for t in `ls /proc/$PID/task/`; do
			if [ $i -ne $((CPU_CORE_NR)) ]; then
				if [ $t -ne $PID ];then
					$CSET shield --shield --pid $t
					taskset -pc $i $t
					let i++
				fi
			fi
		done
		break
	fi
done
) &

fg %1
wait
$CSET shield --reset
echo "All Done!!"

lspci:

$ sudo lspci -vnn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v3 Processor DRAM Controller [8086:0c08] (rev 06)
	Subsystem: ASRock Incorporation Device [1849:0c08]
	Flags: bus master, fast devsel, latency 0
	Capabilities: [e0] Vendor Specific Information: Len=0c <?>

00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 0000e000-0000efff
	Memory behind bridge: e0000000-f00fffff
	Capabilities: [88] Subsystem: ASRock Incorporation Device [1849:0c01]
	Capabilities: [80] Power Management version 3
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [a0] Express Root Port (Slot+), MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [140] Root Complex Link
	Capabilities: [d94] #19
	Kernel driver in use: pcieport

00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller [8086:041a] (rev 06) (prog-if 00 [VGA controller])
	Subsystem: ASRock Incorporation Device [1849:041a]
	Flags: bus master, fast devsel, latency 0, IRQ 59
	Memory at f0400000 (64-bit, non-prefetchable) [size=4M]
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [a4] PCI Advanced Features
	Kernel driver in use: i915

00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
	Subsystem: ASRock Incorporation Device [1849:0c0c]
	Flags: bus master, fast devsel, latency 0, IRQ 67
	Memory at f0e34000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Kernel driver in use: snd_hda_intel

00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 05) (prog-if 30 [XHCI])
	Subsystem: ASRock Incorporation Device [1849:8c31]
	Flags: bus master, medium devsel, latency 0, IRQ 50
	Memory at f0e20000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: [70] Power Management version 2
	Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
	Kernel driver in use: xhci_hcd

00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
	Subsystem: ASRock Incorporation Device [1849:8c3a]
	Flags: bus master, fast devsel, latency 0, IRQ 60
	Memory at f0e3f000 (64-bit, non-prefetchable) [size=16]
	Capabilities: [50] Power Management version 3
	Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Kernel driver in use: mei_me

00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b] (rev 05)
	Subsystem: ASRock Incorporation Device [1849:153b]
	Flags: bus master, fast devsel, latency 0, IRQ 66
	Memory at f0e00000 (32-bit, non-prefetchable) [size=128K]
	Memory at f0e3d000 (32-bit, non-prefetchable) [size=4K]
	I/O ports at f080 [disabled] [size=32]
	Capabilities: [c8] Power Management version 2
	Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [e0] PCI Advanced Features
	Kernel driver in use: e1000e

00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 05) (prog-if 20 [EHCI])
	Subsystem: ASRock Incorporation Device [1849:8c2d]
	Flags: bus master, medium devsel, latency 0, IRQ 16
	Memory at f0e3c000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [50] Power Management version 2
	Capabilities: [58] Debug port: BAR=1 offset=00a0
	Capabilities: [98] PCI Advanced Features
	Kernel driver in use: ehci-pci

00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05)
	Subsystem: ASRock Incorporation Device [1849:1151]
	Flags: bus master, fast devsel, latency 0, IRQ 68
	Memory at f0e30000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d5) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	Capabilities: [40] Express Root Port (Slot-), MSI 00
	Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: ASRock Incorporation Device [1849:8c10]
	Capabilities: [a0] Power Management version 3
	Kernel driver in use: pcieport

00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 [8086:8c14] (rev d5) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 0000d000-0000dfff
	Memory behind bridge: f0d00000-f0dfffff
	Capabilities: [40] Express Root Port (Slot+), MSI 00
	Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: ASRock Incorporation Device [1849:8c14]
	Capabilities: [a0] Power Management version 3
	Kernel driver in use: pcieport

00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d5) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 0000c000-0000cfff
	Memory behind bridge: f0c00000-f0cfffff
	Capabilities: [40] Express Root Port (Slot+), MSI 00
	Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: ASRock Incorporation Device [1849:8c16]
	Capabilities: [a0] Power Management version 3
	Kernel driver in use: pcieport

00:1c.4 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 [8086:8c18] (rev d5) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
	I/O behind bridge: 0000b000-0000bfff
	Memory behind bridge: f0b00000-f0bfffff
	Capabilities: [40] Express Root Port (Slot+), MSI 00
	Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: ASRock Incorporation Device [1849:8c18]
	Capabilities: [a0] Power Management version 3
	Kernel driver in use: pcieport

00:1c.5 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 [8086:8c1a] (rev d5) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=06, subordinate=09, sec-latency=0
	I/O behind bridge: 0000a000-0000afff
	Memory behind bridge: f0800000-f0afffff
	Prefetchable memory behind bridge: 00000000cfa00000-00000000cfbfffff
	Capabilities: [40] Express Root Port (Slot+), MSI 00
	Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [90] Subsystem: ASRock Incorporation Device [1849:8c1a]
	Capabilities: [a0] Power Management version 3
	Kernel driver in use: pcieport

00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 05) (prog-if 20 [EHCI])
	Subsystem: ASRock Incorporation Device [1849:8c26]
	Flags: bus master, medium devsel, latency 0, IRQ 23
	Memory at f0e3b000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [50] Power Management version 2
	Capabilities: [58] Debug port: BAR=1 offset=00a0
	Capabilities: [98] PCI Advanced Features
	Kernel driver in use: ehci-pci

00:1f.0 ISA bridge [0601]: Intel Corporation Z87 Express LPC Controller [8086:8c44] (rev 05)
	Subsystem: ASRock Incorporation Device [1849:8c44]
	Flags: bus master, medium devsel, latency 0
	Capabilities: [e0] Vendor Specific Information: Len=0c <?>
	Kernel driver in use: lpc_ich

00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 05) (prog-if 01 [AHCI 1.0])
	Subsystem: ASRock Incorporation Device [1849:8c02]
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 46
	I/O ports at f0d0 [size=8]
	I/O ports at f0c0 [size=4]
	I/O ports at f0b0 [size=8]
	I/O ports at f0a0 [size=4]
	I/O ports at f060 [size=32]
	Memory at f0e3a000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [70] Power Management version 3
	Capabilities: [a8] SATA HBA v1.0
	Kernel driver in use: ahci

00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 05)
	Subsystem: ASRock Incorporation Device [1849:8c22]
	Flags: medium devsel, IRQ 18
	Memory at f0e39000 (64-bit, non-prefetchable) [size=256]
	I/O ports at f040 [size=32]

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850] [1002:6819] (prog-if 00 [VGA controller])
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:2553]
	Flags: fast devsel, IRQ 16
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Memory at f0000000 (64-bit, non-prefetchable) [size=256K]
	I/O ports at e000 [size=256]
	Expansion ROM at f0040000 [disabled] [size=128K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Capabilities: [150] Advanced Error Reporting
	Capabilities: [270] #19
	Capabilities: [2b0] Address Translation Service (ATS)
	Capabilities: [2c0] #13
	Capabilities: [2d0] #1b
	Kernel driver in use: vfio-pci

01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]
	Subsystem: Gigabyte Technology Co., Ltd Device [1458:aab0]
	Flags: fast devsel, IRQ 17
	Memory at f0060000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Capabilities: [150] Advanced Error Reporting
	Kernel driver in use: vfio-pci

03:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) (prog-if 01 [AHCI 1.0])
	Subsystem: ASRock Incorporation Motherboard [1849:0612]
	Flags: bus master, fast devsel, latency 0, IRQ 47
	I/O ports at d050 [size=8]
	I/O ports at d040 [size=4]
	I/O ports at d030 [size=8]
	I/O ports at d020 [size=4]
	I/O ports at d000 [size=32]
	Memory at f0d00000 (32-bit, non-prefetchable) [size=512]
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Legacy Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: ahci

04:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
	Subsystem: ASRock Incorporation Device [1849:1539]
	Flags: fast devsel, IRQ 19
	Memory at f0c00000 (32-bit, non-prefetchable) [size=128K]
	I/O ports at c000 [disabled] [size=32]
	Memory at f0c20000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
	Capabilities: [70] MSI-X: Enable- Count=5 Masked-
	Capabilities: [a0] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Device Serial Number bc-5f-f4-ff-ff-cd-17-77
	Capabilities: [1a0] Transaction Processing Hints
	Kernel driver in use: pci-stub

05:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) (prog-if 01 [AHCI 1.0])
	Subsystem: ASRock Incorporation Motherboard [1849:0612]
	Flags: bus master, fast devsel, latency 0, IRQ 48
	I/O ports at b050 [size=8]
	I/O ports at b040 [size=4]
	I/O ports at b030 [size=8]
	I/O ports at b020 [size=4]
	I/O ports at b000 [size=32]
	Memory at f0b00000 (32-bit, non-prefetchable) [size=512]
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Legacy Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: ahci

06:00.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8603] (rev aa) (prog-if 00 [Normal decode])
	Flags: fast devsel
	Memory at f0a00000 (32-bit, non-prefetchable) [size=16K]
	Bus: primary=06, secondary=07, subordinate=09, sec-latency=0
	I/O behind bridge: 0000a000-0000afff
	Memory behind bridge: f0800000-f09fffff
	Prefetchable memory behind bridge: 00000000cfa00000-00000000cfbfffff
	Capabilities: [40] Power Management version 3
	Capabilities: [48] MSI: Enable- Count=1/4 Maskable+ 64bit+
	Capabilities: [68] Express Upstream Port, MSI 00
	Capabilities: [a4] Subsystem: PLX Technology, Inc. Device [10b5:8603]
	Capabilities: [100] Device Serial Number aa-86-02-10-b5-df-0e-00
	Capabilities: [fb4] Advanced Error Reporting
	Capabilities: [138] Power Budgeting <?>
	Capabilities: [148] Virtual Channel
	Capabilities: [950] Vendor Specific Information: ID=0001 Rev=0 Len=028 <?>
	Kernel driver in use: pci-stub

07:01.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8603] (rev aa) (prog-if 00 [Normal decode])
	Flags: fast devsel
	Bus: primary=07, secondary=08, subordinate=08, sec-latency=0
	I/O behind bridge: 0000a000-0000afff
	Memory behind bridge: f0900000-f09fffff
	Prefetchable memory behind bridge: 00000000cfa00000-00000000cfbfffff
	Capabilities: [40] Power Management version 3
	Capabilities: [48] MSI: Enable- Count=1/4 Maskable+ 64bit+
	Capabilities: [68] Express Downstream Port (Slot+), MSI 00
	Capabilities: [a4] Subsystem: PLX Technology, Inc. Device [10b5:8603]
	Capabilities: [100] Device Serial Number aa-86-02-10-b5-df-0e-00
	Capabilities: [fb4] Advanced Error Reporting
	Capabilities: [148] Virtual Channel
	Capabilities: [520] Access Control Services
	Capabilities: [950] Vendor Specific Information: ID=0001 Rev=0 Len=028 <?>
	Kernel driver in use: pci-stub

07:02.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8603] (rev aa) (prog-if 00 [Normal decode])
	Flags: fast devsel
	Bus: primary=07, secondary=09, subordinate=09, sec-latency=0
	Memory behind bridge: f0800000-f08fffff
	Capabilities: [40] Power Management version 3
	Capabilities: [48] MSI: Enable- Count=1/4 Maskable+ 64bit+
	Capabilities: [68] Express Downstream Port (Slot+), MSI 00
	Capabilities: [a4] Subsystem: PLX Technology, Inc. Device [10b5:8603]
	Capabilities: [100] Device Serial Number aa-86-02-10-b5-df-0e-00
	Capabilities: [fb4] Advanced Error Reporting
	Capabilities: [148] Virtual Channel
	Capabilities: [520] Access Control Services
	Capabilities: [950] Vendor Specific Information: ID=0001 Rev=0 Len=028 <?>
	Kernel driver in use: pci-stub

08:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) (prog-if 01 [AHCI 1.0])
	Subsystem: ASMedia Technology Inc. Device [1b21:1060]
	Flags: fast devsel, IRQ 18
	I/O ports at a050 [size=8]
	I/O ports at a040 [size=4]
	I/O ports at a030 [size=8]
	I/O ports at a020 [size=4]
	I/O ports at a000 [size=32]
	Memory at f0910000 (32-bit, non-prefetchable) [size=512]
	Expansion ROM at f0900000 [disabled] [size=64K]
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Legacy Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Kernel driver in use: pci-stub

09:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02) (prog-if 30 [XHCI])
	Subsystem: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015]
	Flags: fast devsel, IRQ 19
	Memory at f0800000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: [50] Power Management version 3
	Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
	Capabilities: [90] MSI-X: Enable- Count=8 Masked-
	Capabilities: [a0] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [150] Latency Tolerance Reporting
	Kernel driver in use: pci-stub

Offline

#730 2013-11-13 23:29:16

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Norcoen wrote:

...
Assign PCI devices to pci-stub
...

You have to assign your devices to vfio-pci not pci-stub

Offline

#731 2013-11-13 23:33:14

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

nbhs wrote:
Norcoen wrote:

...
Assign PCI devices to pci-stub
...

You have to assign your devices to vfio-pci not pci-stub

And do not bind bridges to anything, leave them attached to pcieport.  Maybe start with something simple, like one device instead of practically everything in the box.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#732 2013-11-13 23:36:17

mafferri
Member
Registered: 2013-11-11
Posts: 7

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:
mafferri wrote:

quoto this because I wish I could do the reverse, for when I shutdown the vm
because if I restart the vm I have very bad performance
I have to reboot the host because everything works well

You can do the reverse.  Here are the scripts I use:

vfio-group <group #>:

#!/bin/sh

if [ ! -e /sys/kernel/iommu_groups/$1 ]; then
	echo "IOMMU group $1 not found"
	exit 1
fi

if [ ! -e /sys/bus/pci/drivers/vfio-pci ]; then
	sudo modprobe vfio-pci
fi

for i in $(ls /sys/kernel/iommu_groups/$1/devices/); do
	if [ -e /sys/kernel/iommu_groups/$1/devices/$i/driver ]; then
		if [ "$(basename $(readlink -f \
	        	/sys/kernel/iommu_groups/$1/devices/$i/driver))" != \
			"pcieport" ]; then
			echo $i | sudo tee \
				/sys/kernel/iommu_groups/$1/devices/$i/driver/unbind
		fi
	fi
done

for i in $(ls /sys/kernel/iommu_groups/$1/devices/); do
	if [ ! -e /sys/kernel/iommu_groups/$1/devices/$i/driver ]; then
		VEN=$(cat /sys/kernel/iommu_groups/$1/devices/$i/vendor)
		DEV=$(cat /sys/kernel/iommu_groups/$1/devices/$i/device)
		echo $VEN $DEV | sudo tee \
			/sys/bus/pci/drivers/vfio-pci/new_id
	fi
done

vfio-ungroup <group #>

#!/bin/sh

if [ ! -e /sys/kernel/iommu_groups/$1 ]; then
	echo "IOMMU group $1 not found"
	exit 1
fi

for i in $(ls /sys/kernel/iommu_groups/$1/devices/); do
	VEN=$(cat /sys/kernel/iommu_groups/$1/devices/$i/vendor)
	DEV=$(cat /sys/kernel/iommu_groups/$1/devices/$i/device)
	echo $VEN $DEV | sudo tee \
		/sys/bus/pci/drivers/vfio-pci/remove_id
	echo $i | sudo tee \
		/sys/kernel/iommu_groups/$1/devices/$i/driver/unbind
done

for i in $(ls /sys/kernel/iommu_groups/$1/devices/); do
	echo $i | sudo tee /sys/bus/pci/drivers_probe
done

lsgroup

#!/bin/sh

BASE="/sys/kernel/iommu_groups"

for i in $(find $BASE -maxdepth 1 -mindepth 1 -type d); do
	GROUP=$(basename $i)
	echo "### Group $GROUP ###"
	for j in $(find $i/devices -type l); do
		DEV=$(basename $j)
		echo -n "    "
		lspci -s $DEV
	done
done

I'm not sure how this is going to help your performance though, it's pretty random whether re-loading the host driver is going to resolve anything that the guest driver can't.  For graphics devices, if you're using kernel+qemu that support bus reset, that should provide something nearly as good as a host reboot.

much more convenient to handle thanks;)

Offline

#733 2013-11-13 23:50:53

Norcoen
Member
From: Norway
Registered: 2013-11-02
Posts: 23

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Thank you for your insanely fast reply smile
I didn't thought about it when I used pci-stub because I always used it with virt-manager before trying vfio...

I'm getting this error now:

qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: error, group 9 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: failed to get group 9
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device 'vfio-pci' could not be initialized

Using the lsgroup script you just posted I got this:

$ ./lsgroup.sh 
### Group 0 ###
    00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3 Processor DRAM Controller (rev 06)
### Group 1 ###
    00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850]
    01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
### Group 2 ###
    00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06)
### Group 3 ###
    00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
### Group 4 ###
    00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
### Group 5 ###
    00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
### Group 6 ###
    00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 05)
### Group 7 ###
    00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
### Group 8 ###
    00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
### Group 9 ###
    00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
    00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
    00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
    00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
    00:1c.5 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 (rev d5)
    03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
    04:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
    05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
    06:00.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
    07:01.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
    07:02.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
    08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
    09:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
### Group 10 ###
    00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
### Group 11 ###
    00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05)
    00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
    00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)

Why is there so much in group 9? From what I know, I can only passthrough complete groups.
But why would my PCIe Card be in the same group as a whole lot of onboard stuff?
Or is this the same problem as I had some pages back, because the PCIe Card has the same vendor:device ids as the onboard asmedia chip? (I think vfio-bind.sh automaticly gets them)

Offline

#734 2013-11-14 00:05:01

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Norcoen wrote:

Thank you for your insanely fast reply smile
I didn't thought about it when I used pci-stub because I always used it with virt-manager before trying vfio...

I'm getting this error now:

qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: error, group 9 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: failed to get group 9
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device 'vfio-pci' could not be initialized

Using the lsgroup script you just posted I got this:

$ ./lsgroup.sh 
### Group 0 ###
    00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3 Processor DRAM Controller (rev 06)
### Group 1 ###
    00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850]
    01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
### Group 2 ###
    00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06)
### Group 3 ###
    00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
### Group 4 ###
    00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
### Group 5 ###
    00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
### Group 6 ###
    00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 05)
### Group 7 ###
    00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
### Group 8 ###
    00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
### Group 9 ###
    00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
    00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
    00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
    00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
    00:1c.5 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 (rev d5)
    03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
    04:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
    05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
    06:00.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
    07:01.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
    07:02.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
    08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
    09:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
### Group 10 ###
    00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
### Group 11 ###
    00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05)
    00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
    00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)

Why is there so much in group 9? From what I know, I can only passthrough complete groups.
But why would my PCIe Card be in the same group as a whole lot of onboard stuff?
Or is this the same problem as I had some pages back, because the PCIe Card has the same vendor:device ids as the onboard asmedia chip? (I think vfio-bind.sh automaticly gets them)

If you built the kernel i provided try this workarround: https://bbs.archlinux.org/viewtopic.php … 5#p1342995

Offline

#735 2013-11-14 00:40:36

Norcoen
Member
From: Norway
Registered: 2013-11-02
Posts: 23

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

No, I just built 3.12 from kernel.org with the config changes

    CONFIG_VFIO_IOMMU_TYPE1=y

    CONFIG_VFIO=y

    CONFIG_VFIO_PCI=y

    CONFIG_VFIO_PCI_VGA=y

I'll try building your kernel. Guess that will take some time, since I have to patch it manually. (And built my first kernel a week ago...^^)

Offline

#736 2013-11-14 00:48:55

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Norcoen wrote:

I'll try building your kernel. Guess that will take some time, since I have to patch it manually. (And built my first kernel a week ago...^^)

If you're using arch,  just unpack it, open a console then build it like this:

makepkg -s

then install it:

sudo pacman -U linux-mainline-*

Same for the qemu and seabios packages i linked.

Last edited by nbhs (2013-11-14 00:49:27)

Offline

#737 2013-11-14 02:16:44

mafferri
Member
Registered: 2013-11-11
Posts: 7

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Norcoen wrote:

Thank you for your insanely fast reply smile
I didn't thought about it when I used pci-stub because I always used it with virt-manager before trying vfio...

I'm getting this error now:

qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: error, group 9 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: failed to get group 9
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device 'vfio-pci' could not be initialized

resolve this , add the group /dev/vfio/9 in the /etc/libvirt/qemu.conf  edit: I thought you were the one who posted the libvirt domain
and "chmod 666 /dev/vfio/* " only this test

Last edited by mafferri (2013-11-14 02:18:24)

Offline

#738 2013-11-14 02:22:28

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

mafferri wrote:
Norcoen wrote:

Thank you for your insanely fast reply smile
I didn't thought about it when I used pci-stub because I always used it with virt-manager before trying vfio...

I'm getting this error now:

qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: error, group 9 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: vfio: failed to get group 9
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=04:00.0: Device 'vfio-pci' could not be initialized

resolve this , add the group /dev/vfio/9 in the /etc/libvirt/qemu.conf  edit: I thought you were the one who posted the libvirt domain
and "chmod 666 /dev/vfio/* " only this test

That's not the problem, the error message indicates how to fix it.  Norcoen needs the ACS override patch and to boot with an option to prune the group down to something manageable.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#739 2013-11-14 05:32:33

Val532
Member
Registered: 2013-11-13
Posts: 35

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hi,

I work this night to make able to use virt-manager with GPU passtrough and it work now !!!

You need libvirt 1.1.4 and Virt-Manage 0.10.

Offline

#740 2013-11-14 14:16:06

ilya80
Member
Registered: 2013-11-12
Posts: 34

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hi guys!

Need a bit of help here. My config:

Asrock Z68 Extreme 3 Gen 3, latest BIOS, Vt-d enabled in bios
Intel i5 3470, with HD 2500 as primary adapter, used in host system
NVidia GTX 680 as secondary adapter, nouveau blacklisted in host system - intended for passthrough
Running fresh Debian sid

I started on the whole thing, so far I`ve done the following:

1) Downloaded 3.12 source, applied "i915_fixes.patch" and "override_for_missing_acs_capabilities.patch", built with VFIO compiled into the kernel and rebooted. Tried both with and without "vfio_iommu_type1.allow_unsafe_interrupts=1" in kernel command line.
2) Cloned qemu git, applied "vfio_disallow_device_from_using_nosnoop_transactions.patch", built and installed via "make install"
3) Cloned seabios and built, have no use for it yet though.

My problem is that when I try to bind the GPU using "sudo vfio-bind 0000:01:00.0 0000:01:00.0", it fails with the following in /var/log/kern.log:

Nov 14 17:54:18 cave-lin kernel: [  145.427257] vfio-pci: probe of 0000:01:00.0 failed with error -22
Nov 14 17:54:18 cave-lin kernel: [  145.472245] vfio-pci: probe of 0000:01:00.0 failed with error -22
Nov 14 17:54:18 cave-lin kernel: [  145.472252] vfio-pci: probe of 0000:01:00.1 failed with error -22

I`m sure device is not yet claimed by any driver, "sudo lspci -k" gives:

01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 680] (rev a1)
        Subsystem: NVIDIA Corporation Device 0969
01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
        Subsystem: NVIDIA Corporation Device 0969

Any pointers on what I have missed / where I should look ?

Thanks!

Offline

#741 2013-11-14 14:20:31

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

ilya80 wrote:

Hi guys!

Need a bit of help here. My config:

Asrock Z68 Extreme 3 Gen 3, latest BIOS, Vt-d enabled in bios
Intel i5 3470, with HD 2500 as primary adapter, used in host system
NVidia GTX 680 as secondary adapter, nouveau blacklisted in host system - intended for passthrough
Running fresh Debian sid

I started on the whole thing, so far I`ve done the following:

1) Downloaded 3.12 source, applied "i915_fixes.patch" and "override_for_missing_acs_capabilities.patch", built with VFIO compiled into the kernel and rebooted. Tried both with and without "vfio_iommu_type1.allow_unsafe_interrupts=1" in kernel command line.
2) Cloned qemu git, applied "vfio_disallow_device_from_using_nosnoop_transactions.patch", built and installed via "make install"
3) Cloned seabios and built, have no use for it yet though.

My problem is that when I try to bind the GPU using "sudo vfio-bind 0000:01:00.0 0000:01:00.0", it fails with the following in /var/log/kern.log:

Nov 14 17:54:18 cave-lin kernel: [  145.427257] vfio-pci: probe of 0000:01:00.0 failed with error -22
Nov 14 17:54:18 cave-lin kernel: [  145.472245] vfio-pci: probe of 0000:01:00.0 failed with error -22
Nov 14 17:54:18 cave-lin kernel: [  145.472252] vfio-pci: probe of 0000:01:00.1 failed with error -22

I`m sure device is not yet claimed by any driver, "sudo lspci -k" gives:

01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 680] (rev a1)
        Subsystem: NVIDIA Corporation Device 0969
01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
        Subsystem: NVIDIA Corporation Device 0969

Any pointers on what I have missed / where I should look ?

Thanks!

Boot with intel_iommu=on


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#742 2013-11-14 14:36:42

ilya80
Member
Registered: 2013-11-12
Posts: 34

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:

Boot with intel_iommu=on

That did it, thanks! Both devices now successfully managed by vfio-pci. I`ll follow the guide in the first post. Maybe you could provide few clarifications: should I copy seabios binaries produced after building it somewhere into qemu? Or just try firing up qemu?

Offline

#743 2013-11-14 14:46:53

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

ilya80 wrote:
aw wrote:

Boot with intel_iommu=on

That did it, thanks! Both devices now successfully managed by vfio-pci. I`ll follow the guide in the first post. Maybe you could provide few clarifications: should I copy seabios binaries produced after building it somewhere into qemu? Or just try firing up qemu?

Build it somewhere then fire qemu with qemu-system-x86_64 -bios /path/to/seabios/out/bios.bin ...

Offline

#744 2013-11-14 15:06:42

ilya80
Member
Registered: 2013-11-12
Posts: 34

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

nbhs wrote:

Build it somewhere then fire qemu with qemu-system-x86_64 -bios /path/to/seabios/out/bios.bin ...

Right, now I read it. Okay this requires me looking at the monitors, so I`ll have to come home first.

Thanks!

Offline

#745 2013-11-14 15:07:02

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

The bios provided by qemu should be fine.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#746 2013-11-14 16:49:11

Norcoen
Member
From: Norway
Registered: 2013-11-02
Posts: 23

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

nbhs wrote:

If you're using arch,  just unpack it, open a console then build it like this:

makepkg -s

then install it:

sudo pacman -U linux-mainline-*

Same for the qemu and seabios packages i linked.

Unfortunately I'm stuck with Fedora and/or CentOS if I don't want to use Windows here.
I already built the qemu and seabios packages you provided (~2 weeks ago, have there been any changes I need in the meantime?)

Now I just read the code in the PKGBUILD file and did the patching manually. No errors so far. But I'm kinda stuck on the .config file.
I copied the oldconfig from /boot/config/3.11.7 and compared it to your config.x86_64.

I think (hope) it's save, to leave configs on, that arent specified in your config, for example:
Your config: # CONFIG_KALLSYMS_ALL is not set
My oldconfig: CONFIG_KALLSYMS_ALL=y
Result: CONFIG_KALLSYMS_ALL=y

I think this also applies the other way around, when you set it, but it's not specified in my oldconfig yet:
Your config: CONFIG_TICK_CPU_ACCOUNTING=y
My oldconfig: # CONFIG_TICK_CPU_ACCOUNTING is not set
Result: CONFIG_TICK_CPU_ACCOUNTING=y

I hope I'm right to this point. Now what do I do with differences like this:

Your Config:                                             My oldconfig:
#								#
# RCU Subsystem							# RCU Subsystem
#								#
CONFIG_TREE_PREEMPT_RCU=y				      |	CONFIG_TREE_RCU=y
CONFIG_PREEMPT_RCU=y					      |	# CONFIG_PREEMPT_RCU is not set
CONFIG_RCU_STALL_COMMON=y					CONFIG_RCU_STALL_COMMON=y

Last edited by Norcoen (2013-11-14 16:54:44)

Offline

#747 2013-11-14 16:52:13

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

The fedora kernel config is fine to use as a starting point.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#748 2013-11-14 16:58:25

Norcoen
Member
From: Norway
Registered: 2013-11-02
Posts: 23

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

But why isn't CONFIG_TREE_PREEMPT_RCU present in the fedora kernel config, while CONFIG_TREE_RCU isn't present in nbhs' config?
Aren't those related somehow? Or is it complety irrelevant?

Again, thank you for those insanely fast replies smile

Last edited by Norcoen (2013-11-14 17:04:30)

Offline

#749 2013-11-14 16:59:58

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Norcoen wrote:

But why isn't CONFIG_TREE_PREEMPT_RCU present in the fedora kernel config, while CONFIG_TREE_RCU is present isn't present in nbhs' config?
AreN't those related somehow? Or is it complety irrelevant?

Again, thank you for those insanely fast replies smile

Completely irrelevant to vga assignment


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#750 2013-11-14 18:41:29

Norcoen
Member
From: Norway
Registered: 2013-11-02
Posts: 23

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

It's working!
Booting kernel 3.12 with the provided patches and "pcie_acs_override=downstream" as a parameter, lsgroup now gives me this output:

$ ./lsgroup.sh 
### Group 0 ###
    00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3 Processor DRAM Controller (rev 06)
### Group 1 ###
    00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
### Group 2 ###
    00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06)
### Group 3 ###
    00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
### Group 4 ###
    00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
### Group 5 ###
    00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
### Group 6 ###
    00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 05)
### Group 7 ###
    00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
### Group 8 ###
    00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
### Group 9 ###
    00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
### Group 10 ###
    00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
### Group 11 ###
    00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
### Group 12 ###
    00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
### Group 13 ###
    00:1c.5 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 (rev d5)
### Group 14 ###
    00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
### Group 15 ###
    00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05)
    00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
    00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
### Group 16 ###
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850]
    01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
### Group 17 ###
    03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
### Group 18 ###
    04:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
### Group 19 ###
    05:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
### Group 20 ###
    06:00.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
### Group 21 ###
    07:01.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
### Group 22 ###
    07:02.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev aa)
### Group 23 ###
    08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
### Group 24 ###
    09:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)

I can boot the Windows7 image with this. It's working fine as far as I can tell. Thank you so much smile

I got an other little problem now, because Win7 does not recognize mouse and keyboard on the pcie-controller until I install the drivers for it, I need to passthrough my hosts usb devices.

$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc. 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 013: ID 046d:c227 Logitech, Inc. G15 Refresh Keyboard
Bus 003 Device 011: ID 046d:c226 Logitech, Inc. G15 Refresh Keyboard
Bus 003 Device 010: ID 1532:0016 Razer USA, Ltd DeathAdder Mouse
Bus 003 Device 009: ID 10d5:1234 Uni Class Technology Co., Ltd 
Bus 003 Device 008: ID 0424:2524 Standard Microsystems Corp. USB MultiSwitch Hub
Bus 003 Device 002: ID 174c:2074 ASMedia Technology Inc. 
Bus 003 Device 007: ID 046d:c227 Logitech, Inc. G15 Refresh Keyboard
Bus 003 Device 006: ID 046d:c226 Logitech, Inc. G15 Refresh Keyboard
Bus 003 Device 005: ID 1532:0016 Razer USA, Ltd DeathAdder Mouse
Bus 003 Device 004: ID 10d5:1234 Uni Class Technology Co., Ltd 
Bus 003 Device 003: ID 0424:2524 Standard Microsystems Corp. USB MultiSwitch Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Mouse and keyboard are 2x in this list, because both of the kvm-switch cables are connected to the host.
I want to passthrough the secondary ones, so the line in the startscript looks like this:

USB_DEVICES="host:046d:c226 host:046d:c227 host:1532:0016"

giving me this output+error:

$ ./startWin7.sh
cset: **> CPUSPEC "-4-3" has bad group "-4-3"
$QEMU $BIOS $CPU $MEMORY $QEMU_ARGS $DEV $USB_DEV $NET $SND $STORAGE $EXTRA_ARGS
QEMU 1.6.50 monitor - type 'help' for more information
(qemu) cset: **> shielding not active on system
taskset: Ungültige Option -- 4
Usage: taskset [options] [mask | cpu-list] [pid|cmd [args...]]

Options:
 -a, --all-tasks         operate on all the tasks (threads) for a given pid
 -p, --pid               operate on existing given pid
 -c, --cpu-list          display and specify cpus in list format
 -h, --help              display this help
 -V, --version           output version information

The default behavior is to run a new command:
    taskset 03 sshd -b 1024
You can retrieve the mask of an existing task:
    taskset -p 700
Or set it:
    taskset -p 03 700
List format uses a comma-separated list instead of a mask:
    taskset -pc 0,3,7-11 700
Ranges in list format can take a stride argument:
    e.g. 0-31:2 is equivalent to mask 0x55555555

For more information see taskset(1).
cset: **> shielding not active on system
taskset: Ungültige Option -- 3
Usage: taskset [options] [mask | cpu-list] [pid|cmd [args...]]

Options:
 -a, --all-tasks         operate on all the tasks (threads) for a given pid
 -p, --pid               operate on existing given pid
 -c, --cpu-list          display and specify cpus in list format
 -h, --help              display this help
 -V, --version           output version information

The default behavior is to run a new command:
    taskset 03 sshd -b 1024
You can retrieve the mask of an existing task:
    taskset -p 700
Or set it:
    taskset -p 03 700
List format uses a comma-separated list instead of a mask:
    taskset -pc 0,3,7-11 700
Ranges in list format can take a stride argument:
    e.g. 0-31:2 is equivalent to mask 0x55555555

For more information see taskset(1).
cset: **> shielding not active on system
taskset: Ungültige Option -- 2
Usage: taskset [options] [mask | cpu-list] [pid|cmd [args...]]

Options:
 -a, --all-tasks         operate on all the tasks (threads) for a given pid
 -p, --pid               operate on existing given pid
 -c, --cpu-list          display and specify cpus in list format
 -h, --help              display this help
 -V, --version           output version information

The default behavior is to run a new command:
    taskset 03 sshd -b 1024
You can retrieve the mask of an existing task:
    taskset -p 700
Or set it:
    taskset -p 03 700
List format uses a comma-separated list instead of a mask:
    taskset -pc 0,3,7-11 700
Ranges in list format can take a stride argument:
    e.g. 0-31:2 is equivalent to mask 0x55555555

For more information see taskset(1).
cset: **> shielding not active on system
taskset: Ungültige Option -- 1
Usage: taskset [options] [mask | cpu-list] [pid|cmd [args...]]

Options:
 -a, --all-tasks         operate on all the tasks (threads) for a given pid
 -p, --pid               operate on existing given pid
 -c, --cpu-list          display and specify cpus in list format
 -h, --help              display this help
 -V, --version           output version information

The default behavior is to run a new command:
    taskset 03 sshd -b 1024
You can retrieve the mask of an existing task:
    taskset -p 700
Or set it:
    taskset -p 03 700
List format uses a comma-separated list instead of a mask:
    taskset -pc 0,3,7-11 700
Ranges in list format can take a stride argument:
    e.g. 0-31:2 is equivalent to mask 0x55555555

For more information see taskset(1).
cset: **> shielding not active on system
pid 6715's current affinity list: 0-7
pid 6715's new affinity list: 0
qemu: could not add USB device 'host:046d:c226'
cset: **> shielding not active on system
taskset: failed to get pid 6755's affinity: Kein passender Prozess gefunden
cset: **> shielding not active on system
taskset: failed to get pid 6804's affinity: Kein passender Prozess gefunden
cset: **> shielding not active on system
taskset: failed to get pid 6853's affinity: Kein passender Prozess gefunden
cset: --> deactivating/reseting shielding
cset: **> shielding not active on system
All Done!!

Do I Need to unbind them somehow? Like the PCI devices?
Before I just selected them in virt-manager and they've been passed through without manually unbinding them.
Or is my syntax incorrect?

//edit:
ah, now I see that vendor:device IDs are the same again, like the problem I had with the sata-controller.
Is it possible to be more specific, on which device I want to pass?
virt-manager defines it in this xml structure:

<hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x0016'/>
        <address bus='3' device='15'/>
      </source>
    </hostdev>

//edit2:
I found this: http://www.linux-kvm.org/page/USB_Host_ … d_to_Guest
I tried changing the startscript from

USB_DEVICES="host:046d:c226 host:046d:c227 host:1532:0016"

to:

USB_DEVICES="usb-host,hostbus=3,hostaddr=10 usb-host,hostbus=3,hostaddr=11 usb-host,hostbus=3,hostaddr=13"

but that did not work either.

Last edited by Norcoen (2013-11-14 19:02:23)

Offline

Board footer

Powered by FluxBB