]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pci: Add flag indicating device has been assigned by KVM
authorGreg Rose <gregory.v.rose@intel.com>
Fri, 22 Jul 2011 05:46:07 +0000 (05:46 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 13:04:22 +0000 (21:04 +0800)
commit20ea5bef458c8eeaded676b3966ad76d9f2daf4f
tree839eb8b5a434bb49dc96fc5652e13c6d1f96605e
parentf5a8b3d910d4425f0ea90320f57d0c6e7950f1ec
pci: Add flag indicating device has been assigned by KVM

Device drivers that create and destroy SR-IOV virtual functions via
calls to pci_enable_sriov() and pci_disable_sriov can cause catastrophic
failures if they attempt to destroy VFs while they are assigned to
guest virtual machines.  By adding a flag for use by the KVM module
to indicate that a device is assigned a device driver can check that
flag and avoid destroying VFs while they are assigned and avoid system
failures.

CC: Ian Campbell <ijc@hellion.org.uk>
CC: Konrad Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 6777829cfe1c4ed78319ad40aaee60254222da76)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
include/linux/pci.h
virt/kvm/assigned-dev.c
virt/kvm/iommu.c