mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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>
The file test.py here is from the Zope project, and is Copyright (c) 2001, 2002 Zope Corporation and Contributors. This file is released under the Zope Public License, version 2.0, a copy of which is in the file ZPL-2.0.