* [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
@ 2009-07-29 2:09 Simon Horman
2009-07-29 2:27 ` Cui, Dexuan
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2009-07-29 2:09 UTC (permalink / raw)
To: xen-devel; +Cc: Dexuan Cui
* Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_name instead of pci_str in error message, pci_str does not exist
Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
This is an enhancement to the following changeset in xen-unstable.hg:
changeset: 19995:7faf35a248c0
user: Keir Fraser <keir.fraser@citrix.com>
date: Tue Jul 28 16:42:12 2009 +0100
summary: xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest
Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py 2009-07-29 10:41:52.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py 2009-07-29 12:04:42.000000000 +1000
@@ -679,14 +679,10 @@ class XendDomainInfo:
raise VmError("device is already inserted")
# Test whether the devices can be assigned with VT-d
- pci_name = '%04x:%02x:%02x.%x' % \
- (parse_hex(new_dev['domain']),\
- parse_hex(new_dev['bus']),\
- parse_hex(new_dev['slot']),\
- parse_hex(new_dev['func']))
+ pci_name = pci_dict_to_bdf_str(new_dev)
if pci_name in get_all_assigned_pci_devices():
raise VmError("failed to assign device %s that has"
- " already been assigned to other domain." % pci_str)
+ " already been assigned to other domain." % pci_name)
# Here, we duplicate some checkings (in some cases, we mustn't allow
# a device to be hot-plugged into an HVM guest) that are also done in
^ permalink raw reply [flat|nested] 2+ messages in thread* RE: [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
2009-07-29 2:09 [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create() Simon Horman
@ 2009-07-29 2:27 ` Cui, Dexuan
0 siblings, 0 replies; 2+ messages in thread
From: Cui, Dexuan @ 2009-07-29 2:27 UTC (permalink / raw)
To: Simon Horman, xen-devel@lists.xensource.com
ACK.
Thanks,
-- Dexuan
-----Original Message-----
From: Simon Horman [mailto:horms@verge.net.au]
Sent: 2009?7?29? 10:10
To: xen-devel@lists.xensource.com
Cc: Cui, Dexuan
Subject: [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_name instead of pci_str in error message, pci_str does not exist
Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
This is an enhancement to the following changeset in xen-unstable.hg:
changeset: 19995:7faf35a248c0
user: Keir Fraser <keir.fraser@citrix.com>
date: Tue Jul 28 16:42:12 2009 +0100
summary: xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest
Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py 2009-07-29 10:41:52.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py 2009-07-29 12:04:42.000000000 +1000
@@ -679,14 +679,10 @@ class XendDomainInfo:
raise VmError("device is already inserted")
# Test whether the devices can be assigned with VT-d
- pci_name = '%04x:%02x:%02x.%x' % \
- (parse_hex(new_dev['domain']),\
- parse_hex(new_dev['bus']),\
- parse_hex(new_dev['slot']),\
- parse_hex(new_dev['func']))
+ pci_name = pci_dict_to_bdf_str(new_dev)
if pci_name in get_all_assigned_pci_devices():
raise VmError("failed to assign device %s that has"
- " already been assigned to other domain." % pci_str)
+ " already been assigned to other domain." % pci_name)
# Here, we duplicate some checkings (in some cases, we mustn't allow
# a device to be hot-plugged into an HVM guest) that are also done in
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-29 2:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 2:09 [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create() Simon Horman
2009-07-29 2:27 ` Cui, Dexuan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.