aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4a033757a19..fffdf4f69c5 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -191,6 +191,11 @@ static int kvm_vm_ioctl_assign_irq(struct kvm *kvm,
191 kvm_assigned_dev_interrupt_work_handler); 191 kvm_assigned_dev_interrupt_work_handler);
192 192
193 if (irqchip_in_kernel(kvm)) { 193 if (irqchip_in_kernel(kvm)) {
194 if (!capable(CAP_SYS_RAWIO)) {
195 return -EPERM;
196 goto out;
197 }
198
194 if (assigned_irq->host_irq) 199 if (assigned_irq->host_irq)
195 match->host_irq = assigned_irq->host_irq; 200 match->host_irq = assigned_irq->host_irq;
196 else 201 else