WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: pass-through Use pci_dict_to_bdf_st

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 29 Jul 2009 01:30:17 -0700
Delivery-date: Wed, 29 Jul 2009 01:30:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1248855553 -3600
# Node ID 92eec6f672fe34eb68c9b72992d32a9e9076225d
# Parent  0ed80e4e2780396b37cf62fd564df53e46b8cf59
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

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
Acked-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff -r 0ed80e4e2780 -r 92eec6f672fe tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Jul 28 16:48:06 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Jul 29 09:19:13 2009 +0100
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create(), Xen patchbot-unstable <=