LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-29-2009, 03:23 PM   #1
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
KVM passing pci-e nic through


Hope the title itself qualifies for the general forum. Else just move it around software, hardware and network once a day
Just kidding.

I'm fiddling around with kvm and pci passthrough. But just can get it to work. Also following the howto on the kvm webside: http://www.linux-kvm.org/page/How_to...th_VT-d_in_KVM

While diging around I just found out that one would need IOMMU enable on the mobo. BUt i can't find out if my m4a78 (Asus) is cabaple. The website is not very informative.

I'm using the 2.6.30 vanilla kernel with the extended config of the debian lenny 2.6.28-2-kernel-package. The extra options are those mentioned in the howto above.

To hide the device i use this self made script
Code:
#!/bin/bash
# unload kvm modules
modprobe -r kvm_amd kvm
# get all the devices and pretty print
/usr/bin/lspci | /bin/sed = | /bin/sed 'N;s/\n/\t/'

# get number of devices to hide
echo "enter line number of pci device to hide"
read line

# get us the variables
DEVICE=$(/usr/bin/lspci -n | /usr/bin/head -n $line | /usr/bin/tail -n 1)
PCI=0000:$(echo $DEVICE | /usr/bin/cut -d " " -f 1)
NUM=$(echo $DEVICE | /usr/bin/cut -d " " -f 3 | sed -e 's/:/ /g')

# files in sys
STUBNEW=/sys/bus/pci/drivers/pci-stub/new_id
DRIVUNB=/sys/bus/pci/devices/$PCI/driver/unbind
STUBBIN=/sys/bus/pci/drivers/pci-stub/bind

# search and destroy
/bin/echo "$NUM" > $STUBNEW
/bin/echo $PCI > $DRIVUNB
/bin/echo $PCI > $STUBBIN

# reload kvm
modprobe -a kvm kvm_amd
The start line for the kvm
Code:
qemu-system-x86_64 -hda /dev/mapper/isos-iso--apache -boot c -m 256 -net none -pcidevice host=02:00.0
And the output after start:
Code:
assign_irq: deassign: Invalid argument
assign_irq: deassign: Invalid argument
assign_irq: deassign: Invalid argument
assigned_dev_update_msi: deassign irq: Invalid argument
assigned_dev_update_msi: deassign irq: Invalid argument
So anyone tried this stuff? Is my mobo just not able to IUMMO? MIssing kernel options? You need some more info to help?

Thanks for reading
zhjim
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing args in terminal window is OK. but isn't when passing in GNOME launcher why? majrys1962 Debian 0 11-18-2008 06:00 PM
HELP - Need a Fedora 8 compatable wireless PCI NIC hellcat1 Linux - Hardware 2 03-18-2008 04:16 AM
Best high performance PCI or PCI-X fiber gigabit NIC joegoober Linux - Networking 0 11-01-2007 11:51 AM
1 x PCI and 2 x PCI-Express NIC not working Carceri Linux - Networking 1 01-10-2007 04:24 PM
installing a pci nic with debain 3 race Linux - Networking 6 11-27-2003 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration