View previous topic :: View next topic |
Author |
Message |
ambad4u n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/58265296064eb1fb2adbbc.png)
Joined: 08 May 2008 Posts: 59 Location: Toledo City, Cebu, Philippines
|
Posted: Thu Oct 22, 2015 11:20 am Post subject: yet another pci/pci-e kvm passthrough question |
|
|
Greetings to everyone!,
its been a while
anyways, I'm setting up a gentoo box that will host VM's via KVM/Qemu.
host details:
-Intel XEON E5520 http://ark.intel.com/products/40200/Intel-Xeon-Processor-E5520-8M-Cache-2_26-GHz-5_86-GTs-Intel-QPI
-Intel DX58S0 motherboard
-4GB RAM [at the moment]
what I'm trying to do is to passthrough a pci-e LAN/NIC but seems to fail.
I have read these for passthrough:
http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM
https://wiki.gentoo.org/wiki/QEMU/Options#PCI_pass-through
here is what I did:
Code: | hypervisor ~ # qemu-system-x86_64 -enable-kvm -cpu host -net vde -net nic -m 512M -cdrom /home/qemu/systemrescuecd-x86-4.5.4.iso -vnc 192.168.1.65:1 -device kvm-pci-assign,host=00:30.0
qemu-system-x86_64: -device kvm-pci-assign,host=00:30.0: Property 'kvm-pci-assign.host' doesn't take value '00:30.0' |
I did try to follow it but no avail...
tried also using virt-install..., and the result:
Code: | hypervisor ~ # virt-install --name dualNIC --memory 512 --cpu host --vcpus 2 --virt-type kvm --hvm --nodisks --cdrom /home/qemu/systemrescuecd-x86-4.5.4.iso --host-device=pci_0000_03_00_0 --network network:default --graphics vnc
WARNING No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.
Starting install...
ERROR internal error: early end of file from monitor: possible problem:
2015-10-22T10:48:33.690341Z qemu-system-x86_64: -device pci-assign,configfd=19,host=03:00.0,id=hostdev0,bus=pci.0,addr=0x4: Could not open '/sys/bus/pci/devices/0000:03:00.0/resource': Permission denied
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start dualNIC
otherwise, please restart your installation. |
some info on the pci-e lan am trying to passthrough
Code: | hypervisor ~ # lspci -nn | grep 03:00.0
03:00.0 Ethernet controller [0200]: Intel Corporation 82573L Gigabit Ethernet Controller [8086:109a] |
my emerge --info: https://bpaste.net/show/c1483b8b73e6
my kernel config: https://bpaste.net/show/4dfc31b49f65
dmesg if you need: https://bpaste.net/show/1337cde7626a
its been more than 2days already for me on this, any help is appreciated
thanks in advance! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hceline n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 30 Aug 2015 Posts: 36
|
Posted: Thu Oct 22, 2015 9:36 pm Post subject: |
|
|
Have you assigned the card to vfio-pci and booted with "iommu=on" or "iommu=pt"?
Edit: You seem to have switched the numbers here:
Quote: | qemu-system-x86_64: -device kvm-pci-assign,host=00:30.0: Property 'kvm-pci-assign.host' doesn't take value '00:30.0' |
00:30.0 should be 03:00.0 as below
Quote: | 03:00.0 Ethernet controller [0200]: Intel Corporation 82573L Gigabit Ethernet Controller [8086:109a]
|
Edit 2:
The "Could not open '/sys/bus/pci/devices/0000:03:00.0/resource': Permission denied" error should go away if you start qemu as root. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ambad4u n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/58265296064eb1fb2adbbc.png)
Joined: 08 May 2008 Posts: 59 Location: Toledo City, Cebu, Philippines
|
Posted: Fri Oct 23, 2015 1:44 pm Post subject: |
|
|
I seem to have resolved it.
as hceline also pointed out, it needs a boot option of "intel_iommu=on" [for intel]
afterwards, you need to unbind the needed device [like below for example]:
Code: | root #echo "8086 284b" > /sys/bus/pci/drivers/pci-stub/new_id
root #echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind
root #echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind |
and then enable this if it complains something like: "No interrupt remapping support...."
execute this also:
Code: | echo 1 > /sys/module/kvm/parameters/allow_unsafe_assigned_interrupts |
pci passthru seems to be working and am happy ATM
thanks to all! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TigerJr Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Jun 2007 Posts: 540
|
Posted: Sat Oct 24, 2015 1:03 pm Post subject: |
|
|
Quote: | [ 0.015908] This system BIOS has enabled interrupt remapping
on a chipset that contains an erratum making that
feature unstable. To maintain system stability
interrupt remapping is being disabled. Please
contact your BIOS vendor for an update |
I found this message in your dmesg. Maybe this message helps you to understand USB\PCI Passthrough needs. _________________ Do not use gentoo, it die |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|