KVM: Device assignment: Check for privileges before assigning irq
authorAmit Shah <amit.shah@qumranet.com>
Wed, 13 Aug 2008 13:22:37 +0000 (16:22 +0300)
committerAvi Kivity <avi@qumranet.com>
Wed, 15 Oct 2008 08:15:20 +0000 (10:15 +0200)
commit6762b7299aa115e11815decd1fd982d015f09615
tree3973aab788f7f1d75377aa2aa78dc0014354c6f5
parentdc7404cea34ef997dfe89ca94d16358e9d29c8d8
KVM: Device assignment: Check for privileges before assigning irq

Even though we don't share irqs at the moment, we should ensure
regular user processes don't try to allocate system resources.

We check for capability to access IO devices (CAP_SYS_RAWIO) before
we request_irq on behalf of the guest.

Noticed by Avi.

Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/x86.c