]> xenbits.xensource.com Git - libvirt.git/commit
check IOMMU group devices usage when preparing device for vfio passthrough
authorShivaprasad G Bhat <shivaprasadbhat@gmail.com>
Wed, 14 Jan 2015 11:03:28 +0000 (06:03 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 14 Jan 2015 17:01:06 +0000 (18:01 +0100)
commit7e72de49fe63f3c4892b26002928252d45cc3822
tree569d69772f09394f0eeb9b2b0e5fbee62708b05c
parent6af9bb35608e8b14533e973cd46abfc17d516d77
check IOMMU group devices usage when preparing device for vfio passthrough

The virsh start <domain> fails with qemu error when the hostdevices of the
same iommu group are used actively by other vms. It is not clear which
hostdev from the same iommu group is used by any of the running guests.
User has to go through every guest xml to figure out who is using the
hostdev of same iommu group.

Solution:
Iterate the iommu group of the hostdev and error our neatly in case a
device in the same iommu group is busy. Reattach code also does the same
kind of check, remove duplicate code as well.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virhostdev.c