CAP_SYS_RAWIO missing for qemu-kvm device passthrough

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm running current git libvirt on Fedora 13 beta. I enabled the use of 
libcap-ng as it is done in the regular F13 .spec.

When I now pass a pci card through to a qemu-kvm guest using vt-d I get this 
error from qemu-kvm:

Failed to assign irq for "hostdev0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?

I'm running qemu-kvm as root. But that doesn't seem to be enough:

I traced the issue down to a missing CAP_SYS_RAWIO.The kvm kernel module 
requires CAP_SYS_RAWIO to use the KVM_ASSIGN_DEV_IRQ ioctl.

When I remove the capability-dropping from libvirt like this everything works 
as expected:

--- libvirt/src/qemu/qemu_driver.c        2010-05-13 22:50:13.000000000 +0200
+++ libvirt.new/src/qemu/qemu_driver.c    2010-05-13 23:18:49.286311290 +0200
@@ -3359,7 +3359,7 @@
 
     ret = virExecDaemonize(argv, progenv, &keepfd, &child,
                            stdin_fd, &logfile, &logfile,
-                           VIR_EXEC_NONBLOCK | VIR_EXEC_CLEAR_CAPS,
+                           VIR_EXEC_NONBLOCK,
                            qemudSecurityHook, &hookData,
                            pidfile);
     VIR_FREE(pidfile);

Is there a better solution to get device passthrough to work?

Kind regards,

Gerd

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]