mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.959.1.8 (40d0bbe4zdQ8OX4wNbpbBgcAYnEc4g)
Handle pci params.
This commit is contained in:
1 parent
45ad04b4e9
commit
b9e924d28e
1 file changed
+6
@@ -693,6 +693,12 @@ def vm_dev_pci(vm, val, index):
|
||||
func = sxp.child_value(val, 'func')
|
||||
if not func:
|
||||
raise VMError('pci: Missing func')
|
||||
try:
|
||||
bus = int(bus, 16)
|
||||
dev = int(dev, 16)
|
||||
func = int(func, 16)
|
||||
except:
|
||||
raise VMError('pci: invalid parameter')
|
||||
rc = xc.physdev_pci_access_modify(dom=vm.dom, bus=bus, dev=dev, func=func, enable=1)
|
||||
if rc < 0:
|
||||
#todo non-fatal
|
||||
|
||||