diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-04-08 10:18:31 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-04-08 10:18:31 +0100 |
commit | ed85358827e461b00db75a0313c14f7e21e8120d (patch) | |
tree | 2a49e0234c8897106dfd798697b5ad0f1c48ea1b | |
parent | bd5e620a8b895fd8716f8662de9cf5e2e2c51d67 (diff) | |
download | xen-ed85358827e461b00db75a0313c14f7e21e8120d.tar.gz xen-ed85358827e461b00db75a0313c14f7e21e8120d.tar.bz2 xen-ed85358827e461b00db75a0313c14f7e21e8120d.zip |
xend: Give domain-ID 0 to xc.test_assign_device
When xend calls xc.test_assign_device, xend does not have to give
the domain-ID of a guest domain.
This patch gives domain-ID 0 to xc.test_assign_device.
The following methods give domain-ID 0 to xc.test_assign_device
currently.
- setupDevice@xend/server/pciif.py
- pciinfo@xend/XendNode.py
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
-rw-r--r-- | tools/python/xen/xend/XendDomainInfo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 3ac885fd28..9b4313acda 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -634,7 +634,7 @@ class XendDomainInfo: new_dev['bus'], new_dev['slot'], new_dev['func']) - bdf = xc.test_assign_device(self.domid, pci_str) + bdf = xc.test_assign_device(0, pci_str) if bdf != 0: if bdf == -1: raise VmError("failed to assign device: maybe the platform" @@ -689,7 +689,7 @@ class XendDomainInfo: for pci_str in coassignment_list: (domain, bus, dev, func) = parse_pci_name(pci_str) dev_str = '0x%x,0x%x,0x%x,0x%x' % (domain, bus, dev, func) - if xc.test_assign_device(self.domid, dev_str) == 0: + if xc.test_assign_device(0, dev_str) == 0: continue if not pci_str in assigned_pci_device_str_list: raise VmError(('pci: failed to pci-attach %s to dom%d" + \ @@ -2339,7 +2339,7 @@ class XendDomainInfo: pci = map(lambda x: x[0:4], pci) # strip options pci_str = str(pci) if hvm and pci_str: - bdf = xc.test_assign_device(self.domid, pci_str) + bdf = xc.test_assign_device(0, pci_str) if bdf != 0: if bdf == -1: raise VmError("failed to assign device: maybe the platform" |