vtd hotplug: check if a device can be hot-plugged.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jan 2009 11:14:18 +0000 (11:14 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jan 2009 11:14:18 +0000 (11:14 +0000)
commitdca0b1a8052ff2d46f2b8119d79b360bc4f282ff
treeecf7514ca5b311c34fa9fa7212a4887efc64360b
parent19e94db94935b6a5ecfd532cc890d9cc04a781dd
vtd hotplug: check if a device can be hot-plugged.

When we statically assign a pci device (the pci=3D['xx:xx.x'] string
in guest config file) to guest, we make many checkings (for instance,
if the device is specified in 'pciback.hide', if it has
non-page-aligned MMIO BARs, if it has a proper FLR capability, if the
related devices should be co-assigned). However, with respect to the
guest hotplug, we only check if the device exists and not assigned yet
-- this is not enough, for instance, now xend allows us to assign an
in-use device (being used by Dom0) to an HVM guest (because
xc.test_assigned() returns OK) -- this will cause disaster... The
patch adds some necessary checkings.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
tools/python/xen/util/pci.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/server/pciif.py