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-devel

[Xen-devel] [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 29 Jul 2009 12:09:33 +1000
Cc: Dexuan Cui <dexuan.cui@xxxxxxxxx>
Delivery-date: Tue, 28 Jul 2009 19:10:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
* 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@xxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

--- 

This is an enhancement to the following changeset in xen-unstable.hg:

changeset:   19995:7faf35a248c0
user:        Keir Fraser <keir.fraser@xxxxxxxxxx>
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

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

<Prev in Thread] Current Thread [Next in Thread>