From 48bb09eee4e102544808c00f43bc40a4a2e43e50 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Wed, 12 May 2010 09:46:31 -0400 Subject: KVM: remove CAP_SYS_RAWIO requirement from kvm_vm_ioctl_assign_irq Remove this check in an effort to allow kvm guests to run without root privileges. This capability check doesn't seem to add any security since the device needs to have already been added via the assign device ioctl and the io actually occurs through the pci sysfs interface. Signed-off-by: Alex Williamson Signed-off-by: Marcelo Tosatti --- virt/kvm/assigned-dev.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'virt/kvm/assigned-dev.c') diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 4d10b1e047f4..64672e2d43c3 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -448,9 +448,6 @@ static int kvm_vm_ioctl_assign_irq(struct kvm *kvm, struct kvm_assigned_dev_kernel *match; unsigned long host_irq_type, guest_irq_type; - if (!capable(CAP_SYS_RAWIO)) - return -EPERM; - if (!irqchip_in_kernel(kvm)) return r; -- cgit v1.2.2 From 221d059d15f1c8bd070a63fd45cd8d2598af5f99 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 23 May 2010 18:37:00 +0300 Subject: KVM: Update Red Hat copyrights Signed-off-by: Avi Kivity --- virt/kvm/assigned-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'virt/kvm/assigned-dev.c') diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 64672e2d43c3..bf9d958d4d5b 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -1,7 +1,7 @@ /* * Kernel-based Virtual Machine - device assignment support * - * Copyright (C) 2006-9 Red Hat, Inc + * Copyright (C) 2010 Red Hat, Inc. and/or its affiliates. * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. -- cgit v1.2.2 From a24e809902339458416900869abdcc51a44bfd48 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 10 Jun 2010 13:10:55 +0200 Subject: KVM: Fix unused but set warnings No real bugs in this one. Signed-off-by: Andi Kleen Signed-off-by: Avi Kivity --- virt/kvm/assigned-dev.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'virt/kvm/assigned-dev.c') diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index bf9d958d4d5b..7c98928b09d9 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -58,12 +58,10 @@ static int find_index_from_host_irq(struct kvm_assigned_dev_kernel static void kvm_assigned_dev_interrupt_work_handler(struct work_struct *work) { struct kvm_assigned_dev_kernel *assigned_dev; - struct kvm *kvm; int i; assigned_dev = container_of(work, struct kvm_assigned_dev_kernel, interrupt_work); - kvm = assigned_dev->kvm; spin_lock_irq(&assigned_dev->assigned_dev_lock); if (assigned_dev->irq_requested_type & KVM_DEV_IRQ_HOST_MSIX) { -- cgit v1.2.2