]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix device assignment with root devices
authorChris Lalancette <clalance@redhat.com>
Tue, 19 Jan 2010 16:26:54 +0000 (11:26 -0500)
committerChris Lalancette <clalance@redhat.com>
Fri, 22 Jan 2010 14:42:45 +0000 (09:42 -0500)
commit654dd2902d44ca2e7d2d162543680f94d1a00fda
tree46f5dda944c76575d8399f1c8fbebbf58562eefd
parent54c973d52b1dffd7714fa60453052f4decabe192
Fix device assignment with root devices

The patches to add ACS checking to PCI device passthrough
introduced a bug.  With the current code, if you try to
passthrough a device on the root bus (i.e. bus 0), then
it denies the passthrough.  This is because the code in
pciDeviceIsBehindSwitchLackingACS() to check for a parent
device doesn't take into account the possibility of the
root bus.  If we are on the root bus, it means we
legitimately can't find a parent, and it also means that
we don't have to worry about whether ACS is enabled.
Therefore return 0 (indicating we don't lack ACS) from
pciDeviceIsBehindSwitchLackingACS().

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/util/pci.c