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 08/17] xend: pass-through: Use PCIDevice as the param

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch 08/17] xend: pass-through: Use PCIDevice as the parameter for the constructor for PCIQuirk
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 17 Jun 2009 12:56:20 +1000
Cc: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>, Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>, Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>, Dexuan Cui <dexuan.cui@xxxxxxxxx>
Delivery-date: Tue, 16 Jun 2009 20:33:44 -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>
References: <20090617025612.786241401@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Cc: Dexuan Cui <dexuan.cui@xxxxxxxxx>
Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: xen-unstable.hg/tools/python/xen/xend/server/pciif.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/server/pciif.py  2009-06-05 
16:19:26.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/server/pciif.py       2009-06-07 
21:49:07.000000000 +1000
@@ -301,8 +301,7 @@ class PciController(DevController):
         # if arch.type != "ia64":
         #    dev.do_FLR()
 
-        PCIQuirk(dev.vendor, dev.device, dev.subvendor, dev.subdevice, domain, 
-                bus, slot, func)
+        PCIQuirk(dev)
 
         if not self.vm.info.is_hvm():
             # Setup IOMMU device assignment
Index: xen-unstable.hg/tools/python/xen/xend/server/pciquirk.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/server/pciquirk.py       
2009-06-05 16:19:20.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/server/pciquirk.py    2009-06-05 
17:01:20.000000000 +1000
@@ -11,18 +11,19 @@ PERMISSIVE_CONFIG_FILE = auxbin.xen_conf
 PERMISSIVE_SYSFS_NODE = "/sys/bus/pci/drivers/pciback/permissive"
 
 class PCIQuirk:
-    def __init__( self, vendor, device, subvendor, subdevice, domain, bus, 
slot, func):
-        self.vendor = vendor
-        self.device = device
-        self.subvendor = subvendor
-        self.subdevice = subdevice
-        self.domain = domain
-        self.bus = bus
-        self.slot = slot
-        self.func = func
-
-        self.devid = "%04x:%04x:%04x:%04x" % (vendor, device, subvendor, 
subdevice)
-        self.pciid = "%04x:%02x:%02x.%01x" % (domain, bus, slot, func)
+    def __init__(self, dev):
+        self.vendor = dev.vendor
+        self.device = dev.device
+        self.subvendor = dev.subvendor
+        self.subdevice = dev.subdevice
+        self.domain = dev.domain
+        self.bus = dev.bus
+        self.slot = dev.slot
+        self.func = dev.func
+
+        self.devid = "%04x:%04x:%04x:%04x" % (self.vendor, self.device,
+                                              self.subvendor, self.subdevice)
+        self.pciid = dev.name
         self.quirks = self.__getQuirksByID()
 
         self.__sendQuirks()

-- 

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

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