PCI Pass Through via libvirt cannot remap IRQ's
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Invalid
|
Undecided
|
Unassigned | ||
libvirt (Ubuntu) |
Incomplete
|
Medium
|
Unassigned | ||
qemu-kvm (Ubuntu) |
Incomplete
|
Medium
|
Unassigned |
Bug Description
Trying to allocate a hardware device (telecoms card) using virt-manager results in errors - most frequently (but not exclusively)
a) Errors claiming IOMMU cannot be found even though the hardware is VT-x and VT-d capable and BIOS has it enabled
b) Failed to assign irq for "hostdev0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
and
c) PCI region 0 at address 0xe5200000 has size 0x100, which is not a multiple of 4K
Tried with versions of Lucid and Maverick. Currently using 0.8.3-1ubuntu9
Investigation showed that
i) The kernel does not have DMAR enabled even on Maverick Server.
ii) apparmor profile does not have the right settings
iii) Updates in qemu-kvm git repository which handle small I/O windows havent yet been incorporated in a release
Investigation showed there to be several problems (which perhaps could gave been documented somewhere)
To fix this successfully it was necessary for me to undertake the following:
a) recompiled the kernel with
CONFIG_DMAR=y
CONFIG_
CONFIG_GART_IOMMU=y
b) recompiled qemu-kvm from git source
c) Added the following to /etc/apparmor.
# required for pci passthru
capability sys_rawio,
# For hostdev access.
/sys/devices/ r,
/sys/devices/** r,
You could argue that the small PCI Memory problem was very card specific but given that Ubuntu claims the Server version is ready for virtualisation under KVM and that technology supports VT-d and PCI Pass Through there should be a suitable kernel version and apparmor profile that supports it available.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libvirt-bin 0.8.3-1ubuntu9 [modified: usr/bin/virsh usr/sbin/libvirtd usr/share/
ProcVersionSign
Uname: Linux 2.6.35-19-dmar x86_64
NonfreeKernelMo
Architecture: amd64
Date: Wed Sep 15 16:49:55 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
ProcEnviron:
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: libvirt
Thanks for reporting this bug and helping to make Ubuntu better.
So the first step, it sounds like, would be to pursue enabling the CONFIGs you need
in Ubuntu's kernel. There may be a specific reason why it isn't yet, but if not we can
see about requesting that it be enabled in for Natty.