LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 01-19-2010, 03:42 PM   #1
martdj
Member
 
Registered: Feb 2005
Distribution: Fedora 20
Posts: 33

Rep: Reputation: 1
PCI Passthrough with KVM fails


Hi,
I'm trying to setup a MythTV backend with Mythbuntu in a VM. I'm running Fedora 12 as host. I have 2 DVB-C cards in my system. The system contains an AM2 cpu which supports AMD's virtualization technology (which is switched on in bios). I've enabled SELinux to:
- Allow virt to manage devince configuration, (pci)
- Allow virt to use usb devices

The error which I get is:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 588, in run_domain
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 150, in startup
self._backend.create()
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 293, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error unable to start guest: char device redirected to /dev/pts/1
Failed to assign irq for "01:06.0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to initialize assigned device host=01:06.0

My /proc/interrupts contains this list:

CPU0 CPU1
0: 129 12 IO-APIC-edge timer
1: 0 2 IO-APIC-edge i8042
7: 1 0 IO-APIC-edge
8: 0 1 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 1 4 IO-APIC-edge i8042
14: 41 24670 IO-APIC-edge pata_amd
15: 0 0 IO-APIC-edge pata_amd
16: 244 160 IO-APIC-fasteoi saa7146 (0)
17: 0 348 IO-APIC-fasteoi saa7146 (1)
18: 7 26 IO-APIC-fasteoi firewire_ohci
20: 5 19394 IO-APIC-fasteoi sata_nv
21: 376 495 IO-APIC-fasteoi nouveau, HDA Intel
22: 1171 24778 IO-APIC-fasteoi ohci_hcd:usb2
23: 12 539 IO-APIC-fasteoi ehci_hcd:usb1, sata_nv
24: 19324 212 PCI-MSI-edge eth0
NMI: 0 0 Non-maskable interrupts
LOC: 403323 452940 Local timer interrupts
SPU: 0 0 Spurious interrupts
CNT: 0 0 Performance counter interrupts
PND: 0 0 Performance pending work
RES: 44192 24782 Rescheduling interrupts

Which I think means that no IRQs are shared. Devices 16 & 17 are the one I want to Passthrough. Can someone point me in the right direction on how to solve this problem?

Last edited by martdj; 01-20-2010 at 03:26 AM. Reason: removed some garbage
 
Old 01-21-2010, 03:06 PM   #2
martdj
Member
 
Registered: Feb 2005
Distribution: Fedora 20
Posts: 33

Original Poster
Rep: Reputation: 1
I'll answer my own question as no one else did and it might benefit someone.

KVM needs hardware support to function (otherwise you're using Qemu emulation and that's slow and not really KVM). There are however gradations in this hardware support:
- The 1st gradation is virtualization support in the cpu. AMD support this kind of virtualization since the Athlon on AM2 generation, Intel supports it in the Core cpu's though cheaper Core cpu's might lack this support. Check Intel website to see if your Intel cpu supports it or not
- The 2nd gradation is support in the northbridge. As far as I know, so far only intel chipsets for the Core i9, i7 and i5 have this "IOMMU" support. AMD's new 8x0 chipsets with mainboards containing them due to be released this month are also suspected of containing this IOMMU support.

In short KVM needs the first gradation to function at all. KVM needs the 2nd gradation for functionality like PCI Passthrough. My cpu only has AMD-V, so PCI passthrough won't work for me. If I want PCI passthrough in a VM I'd have to use Xen.

Last edited by martdj; 01-21-2010 at 03:07 PM.
 
1 members found this post helpful.
Old 01-27-2010, 07:01 AM   #3
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
Yes, and with Intel you need VT-d.
 
Old 01-27-2010, 02:29 PM   #4
skug67
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Thanks for that clarification. I'm also running a MythTV backend in a virtual machine on an AMD-V machine. I'm working in a Debian/Ubuntu based environment so I was interested in migrating to KVM since Ubuntu has stopped supporting Xen and it's unclear to me what Debian has planned for Xen in the future. I'd tried setting up KVM and got the exact same error messages that you did. I've been banging my head against a wall, and while I wish there was a solution it's at least good to have the knowledge that it's a hardware problem so I can just work with what I've got.
 
Old 01-29-2010, 08:42 AM   #5
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
Is your AMD-V enabled? It might show all the right flags in /proc/cpuinfo, but be disabled in the BIOS.
 
Old 02-01-2010, 08:01 AM   #6
martdj2
LQ Newbie
 
Registered: Jan 2010
Posts: 6

Rep: Reputation: 0
@dyasny It's not relevant to skug67's problem. He wants to use PCI passthrough. AMD-V alone is not enough for that and there are no AMD systems available yet that will support PCI passthrough on KVM. He'll have to revert to Xen or use the host for MythTV. The latter is what I did.
 
  


Reply

Tags
kvm, passthrough, pci



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
[SOLVED] Keyboard problems: virt-manager fails, but kvm from the command line works kenneho Linux - Virtualization and Cloud 1 11-14-2009 11:11 AM
LXer: Linux virtualization and PCI passthrough LXer Syndicated Linux News 0 10-29-2009 12:20 PM
problem with kvm and pci passthrough with two devices vegatux Linux - General 0 09-24-2009 10:53 AM
KVM passing pci-e nic through zhjim Linux - General 0 06-29-2009 03:23 PM
NE2000-PCI detection fails silently dregoma Linux - Networking 0 07-14-2003 07:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:25 PM.

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