summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2011-12-21 05:59:09 +0100
committerAvi Kivity <avi@redhat.com>2011-12-25 18:03:54 +0100
commit3d27e23b17010c668db311140b17bbbb70c78fb9 (patch)
treed3d87399212b2dda0bbf6616e4a580b35e7d7760 /include
parentKVM: Remove ability to assign a device without iommu support (diff)
downloadlinux-3d27e23b17010c668db311140b17bbbb70c78fb9.tar.xz
linux-3d27e23b17010c668db311140b17bbbb70c78fb9.zip
KVM: Device assignment permission checks
Only allow KVM device assignment to attach to devices which: - Are not bridges - Have BAR resources (assume others are special devices) - The user has permissions to use Assigning a bridge is a configuration error, it's not supported, and typically doesn't result in the behavior the user is expecting anyway. Devices without BAR resources are typically chipset components that also don't have host drivers. We don't want users to hold such devices captive or cause system problems by fencing them off into an iommu domain. We determine "permission to use" by testing whether the user has access to the PCI sysfs resource files. By default a normal user will not have access to these files, so it provides a good indication that an administration agent has granted the user access to the device. [Yang Bai: add missing #include] [avi: fix comment style] Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Yang Bai <hamo.by@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions