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

Re: [Xen-users] cant start domU w/ pci [Error: function takes exactly 4

To: Hans Rakers <hans@xxxxxxxx>
Subject: Re: [Xen-users] cant start domU w/ pci [Error: function takes exactly 4 arguments (3 given)]
From: Sadique Puthen <sputhenp@xxxxxxxxxx>
Date: Thu, 13 Dec 2007 23:54:48 +0530
Cc: xen-users@xxxxxxxxxxxxxxxxxxx, Foo Bar <foobarox@xxxxxxxxx>
Delivery-date: Thu, 13 Dec 2007 10:25:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47616156.5040602@xxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <ea39c5930712130750u56678024g36077f37866dd982@xxxxxxxxxxxxxx> <47616156.5040602@xxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (X11/20070926)

I assume you are using either RHEL-5.1 or Centos 5.1 as dom0.

Apply the below patch on pciif.py and restart xend.

--- /usr/lib/python2.4/site-packages/xen/xend/server/pciif.py.orig      
2006-10-15 21:22:03.000000000 +0900
+++ /usr/lib/python2.4/site-packages/xen/xend/server/pciif.py   2007-10-16 
18:37:39.000000000 +0900
@@ -157,7 +157,7 @@ class PciController(DevController):

        for (start, size) in dev.ioports:
            log.debug('pci: enabling ioport 0x%x/0x%x'%(start,size))
-            rc = xc.domain_ioport_permission(dom = fe_domid, first_port = 
start,
+            rc = xc.domain_ioport_permission(domid = fe_domid, first_port = 
start,
                    nr_ports = size, allow_access = True)
            if rc<0:
                raise VmError(('pci: failed to configure I/O ports on device '+
@@ -171,7 +171,7 @@ class PciController(DevController):

            log.debug('pci: enabling iomem 0x%x/0x%x pfn 0x%x/0x%x'% \\
                    (start,size,start_pfn,nr_pfns))
-            rc = xc.domain_iomem_permission(dom = fe_domid,
+            rc = xc.domain_iomem_permission(domid = fe_domid,
                    first_pfn = start_pfn,
                    nr_pfns = nr_pfns,
                    allow_access = True)
@@ -181,7 +181,7 @@ class PciController(DevController):

        if dev.irq>0:
            log.debug('pci: enabling irq %d'%dev.irq)
-            rc = xc.domain_irq_permission(dom = fe_domid, pirq = dev.irq,
+            rc = xc.domain_irq_permission(domid = fe_domid, pirq = dev.irq,
                    allow_access = True)
            if rc<0:
                raise VmError(('pci: failed to configure irq on device '+



See details at http://lists.xensource.com/archives/html/xen-changelog/2006-11/msg00086.html

--Sadique

Hans Rakers wrote:

Woops forgot to cc the list

See:

http://bugs.centos.org/view.php?id=2485
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1053

Greetings,

Hans Rakers

Foo Bar wrote:
Hi all,
I'm trying to get a pci card working on a guest os (ast01)

 on dum0 I hided the pci card w/:
# modprobe pciback hide='(0b:08.0)'

then added this line to the guest os config file (/etc/xen/ast01)
pci = [ "0000:08:0e.0" ]

Whenever I try to start it fails w/:
# xm create ast01
Using config file "/etc/xen/ast01".
Error: function takes exactly 4 arguments (3 given)

"xm log" shows:
[2007-12-13 17:26:20 xend 8789] DEBUG (DevController:110) DevController: writing {\047protocol\047: \047x86_64-abi\047, \047state\047: \0471\047, \047backend-id\047: \0470\047, \047backend\047: \047/local/domain/0/backend/vkbd/6/0\047} to /local/domain/6/device/vkbd/0. [2007-12-13 17:26:20 xend 8789] DEBUG (DevController:112) DevController: writing {\047frontend-id\047: \0476\047, \047domain\047: \047ast01\047, \047frontend\047: \047/local/domain/6/device/vkbd/0\047, \047state\047: \0471\047, \047online\047: \0471\047} to /local/domain/0/backend/vkbd/6/0. [2007-12-13 17:26:20 xend 8789] DEBUG (blkif:24) exception looking up device number for xvda: [Errno 2] No such file or directory: \047/dev/xvda\047 [2007-12-13 17:26:20 xend 8789] DEBUG (DevController:110) DevController: writing {\047virtual-device\047: \04751712\047, \047device-type\047: \047disk\047, \047protocol\047: \047x86_64-abi\047, \047backend-id\047: \0470\047, \047state\047: \0471\047, \047backend\047: \047/local/domain/0/backend/tap/6/51712\047} to /local/domain/6/device/vbd/51712. [2007-12-13 17:26:20 xend 8789] DEBUG (DevController:112) DevController: writing {\047domain\047: \047ast01\047, \047frontend\047: \047/local/domain/6/device/vbd/51712\047, \047dev\047: \047xvda\047, \047state\047: \0471\047, \047params\047: \047aio:/tmp/ast01.img\047, \047mode\047: \047w\047, \047online\047: \0471\047, \047frontend-id\047: \0476\047, \047type\047: \047tap\047} to /local/domain/0/backend/tap/6/51712. [2007-12-13 17:26:20 xend 8789] INFO (pciquirk:91) NO quirks found for PCI device [1166:024b:1028:0205] [2007-12-13 17:26:20 xend 8789] DEBUG (pciquirk:131) Permissive mode NOT enabled for PCI device [1166:024b:1028:0205] [2007-12-13 17:26:20 xend 8789] DEBUG (pciif:159) pci: enabling ioport 0xecb0/0x8 [2007-12-13 17:26:20 xend.XendDomainInfo 8789] ERROR (XendDomainInfo:212) Domain construction failed
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 205, in create
    vm.initDomain()
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1463, in initDomain
    self.createDevices()
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1679, in createDevices
    self.createDevice(n, c)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1154, in createDevice
    return self.getDeviceController(deviceClass).createDevice(devconfig)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/DevController.py", line 80, in createDevice
    (devid, back, front) = self.getDeviceDetails(config)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py", line 90, in getDeviceDetails
    self.setupDevice(domain, bus, slot, func)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py", line 161, in setupDevice
    nr_ports = size, allow_access = True)
TypeError: function takes exactly 4 arguments (3 given)
[2007-12-13 17:26:20 xend.XendDomainInfo 8789] DEBUG (XendDomainInfo:1557) XendDomainInfo.destroy: domid=6 [2007-12-13 17:26:20 xend.XendDomainInfo 8789] DEBUG (XendDomainInfo:1566) XendDomainInfo.destroyDomain(6) [2007-12-13 17:26:21 xend 8789] ERROR (xmlrpclib2:184) function takes exactly 4 arguments (3 given)
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/util/xmlrpclib2.py", line 162, in _marshaled_dispatch
    response = self._dispatch(method, params)
File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch
    return func(*params)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/XMLRPCServer.py", line 64, in domain_create
    info = XendDomain.instance().domain_create(config)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line 228, in domain_create
    dominfo = XendDomainInfo.create(config)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 205, in create
    vm.initDomain()
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1463, in initDomain
    self.createDevices()
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1679, in createDevices
    self.createDevice(n, c)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1154, in createDevice
    return self.getDeviceController(deviceClass).createDevice(devconfig)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/DevController.py", line 80, in createDevice
    (devid, back, front) = self.getDeviceDetails(config)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py", line 90, in getDeviceDetails
    self.setupDevice(domain, bus, slot, func)
File "/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py", line 161, in setupDevice
    nr_ports = size, allow_access = True)
TypeError: function takes exactly 4 arguments (3 given)


the python file where it fails :
    158         for (start, size) in dev.ioports:
159 log.debug('pci: enabling ioport 0x%x/0x%x'%(start,size)) 160 rc = xc.domain_ioport_permission(dom = fe_domid, first_port = start,
    161                     nr_ports = size, allow_access = True)
    162             if rc<0:
163 raise VmError(('pci: failed to configure I/O ports on device '+ 164 '%s - errno=%d')%( dev.name <http://dev.name>,rc))


I tried out an other pci card to test, and got the same error.
Any ideas?
Thx
FB


------------------------------------------------------------------------

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



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



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