aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-07-28 16:41:13 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-07-28 16:41:13 +0100
commit0a8f3082f61c46bd1b48b2d8261364bf97f255f1 (patch)
treeca7b78f60817eebb1ece36ebf517dc8a267f4309 /tools
parentaee7151ee76070f77b5ae30fdc6310e4f86223ec (diff)
downloadxen-0a8f3082f61c46bd1b48b2d8261364bf97f255f1.tar.gz
xen-0a8f3082f61c46bd1b48b2d8261364bf97f255f1.tar.bz2
xen-0a8f3082f61c46bd1b48b2d8261364bf97f255f1.zip
xend: pass-through: fix pci passthrough for pv guest
C/S 19754: a5f584c1e2f6 breaks pci passthrough for pv guest. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/server/pciif.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/python/xen/xend/server/pciif.py b/tools/python/xen/xend/server/pciif.py
index 823a77c40f..441c7b8f68 100644
--- a/tools/python/xen/xend/server/pciif.py
+++ b/tools/python/xen/xend/server/pciif.py
@@ -403,6 +403,17 @@ class PciController(DevController):
' same guest with %s'
raise VmError(err_msg % (s, dev.name))
+ # Assigning device staticaly (namely, the pci string in guest config
+ # file) to PV guest needs this setupOneDevice().
+ # Assigning device dynamically (namely, 'xm pci-attach') to PV guest
+ # would go through reconfigureDevice().
+ #
+ # For hvm guest, (from c/s 19679 on) assigning device statically and
+ # dynamically both go through reconfigureDevice(), so HERE the
+ # setupOneDevice() is not necessary.
+ if not self.vm.info.is_hvm():
+ for d in pci_dev_list:
+ self.setupOneDevice(d)
wPath = '/local/domain/0/backend/pci/%u/0/aerState' % (self.getDomid())
self.aerStateWatch = xswatch(wPath, self._handleAerStateWatch)
log.debug('pci: register aer watch %s', wPath)