Bug 594912

Summary: kvm_vm_ioctl_assign_irq() requires CAP_SYS_RAWIO breaking libvirt device assignment
Product: Red Hat Enterprise Linux 6 Reporter: Alex Williamson <alex.williamson>
Component: kernelAssignee: Alex Williamson <alex.williamson>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: chrisw, lihuang, snagar, syeghiay
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 15:43:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 559709, 595495    
Attachments:
Description Flags
upstream patch backported to rhel6 none

Description Alex Williamson 2010-05-21 22:18:22 UTC
Description of problem:

kvm_vm_ioctl_assign_irq() checks for CAP_SYS_RAWIO, which is not present for qemu processes launched via libvirt.  This check really isn't necessary since it can only operate on devices previously assigned via the assign_device ioctl.  Remove the check.

Version-Release number of selected component (if applicable):
2.6.32-28.el6

How reproducible:
always

Steps to Reproduce:
1. assign passthrough device via libvirt
2. fail (note this isn't the only problem blocking this path)
3.
  
Actual results:
assign_irq ioctl fails

Expected results:
works

Additional info:

Comment 3 Alex Williamson 2010-05-26 19:28:59 UTC
Created attachment 416999 [details]
upstream patch backported to rhel6

Here's the patch posted to rhkernel-list.  This was accepted upstream.  assign_irq only works on devices already registered through assign_device, so it doesn't make much sense to enforce RAWIO here.

Comment 5 Aristeu Rozanski 2010-05-28 20:38:23 UTC
Patch(es) available on kernel-2.6.32-31.el6

Comment 8 lihuang 2010-08-18 14:09:57 UTC
Tested on  kernel-2.6.32-63.el6
PASS

Comment 9 releng-rhel@redhat.com 2010-11-11 15:43:29 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.