View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002485 | CentOS-5 | xen | public | 2007-12-03 13:52 | 2009-11-28 00:21 |
Reporter | hrak | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.1 | ||||
Summary | 0002485: Xen ioport and irq mapping functionality broken in 3.0.3-41.el5 | ||||
Description | After upgrading to CentOS 5.1, Xen's functionality to map i/o ports and irq's (f.e. to access a serial port in DomU) is broken. This is due to upstream bug http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1053 The fix is simple, see attached patch for iopif.py and irqif.py. | ||||
Tags | No tags attached. | ||||
2007-12-03 13:52
|
xenpatch.diff (1,019 bytes)
--- iopif.py.orig 2007-12-03 14:47:29.000000000 +0100 +++ iopif.py 2007-12-03 14:47:29.000000000 +0100 @@ -72,7 +72,7 @@ raise VmError('ioports: Invalid i/o range: %s - %s' % (io_from, io_to)) - rc = xc.domain_ioport_permission(dom = self.getDomid(), + rc = xc.domain_ioport_permission(domid = self.getDomid(), first_port = io_from, nr_ports = io_to - io_from + 1, allow_access = True) --- irqif.py.orig 2007-12-03 14:47:40.000000000 +0100 +++ irqif.py 2007-12-03 14:47:40.000000000 +0100 @@ -61,7 +61,7 @@ pirq = get_param('irq') - rc = xc.domain_irq_permission(dom = self.getDomid(), + rc = xc.domain_irq_permission(domid = self.getDomid(), pirq = pirq, allow_access = True) |
Same goes for pciif.py btw, which i missed initially. This also contains 3 occurances of 'dom' on line 160, 174 and 184 which should actually be 'domid'. | |
After having changed the iopif.py, irqif.py and pciif.py the problem persist. No way to use serial port in domU. |
|
same here, problem persists after applying the patch. Linux localhost.localdomain 2.6.18-53.1.14.el5xen #1 SMP Wed Mar 5 12:08:17 EST 2008 x86_64 x86_64 x86_64 GNU/Linux |
|
2008-04-17 18:40
|
xen-2485.patch (3,262 bytes)
diff -Nur old/usr/lib64/python2.4/site-packages/xen/xend/server/iopif.py new/usr/lib64/python2.4/site-packages/xen/xend/server/iopif.py --- old/usr/lib64/python2.4/site-packages/xen/xend/server/iopif.py 2008-04-17 18:23:07.705409282 +0200 +++ new/usr/lib64/python2.4/site-packages/xen/xend/server/iopif.py 2008-04-17 18:48:24.960231782 +0200 @@ -72,7 +72,7 @@ raise VmError('ioports: Invalid i/o range: %s - %s' % (io_from, io_to)) - rc = xc.domain_ioport_permission(dom = self.getDomid(), + rc = xc.domain_ioport_permission(domid = self.getDomid(), first_port = io_from, nr_ports = io_to - io_from + 1, allow_access = True) diff -Nur old/usr/lib64/python2.4/site-packages/xen/xend/server/irqif.py new/usr/lib64/python2.4/site-packages/xen/xend/server/irqif.py --- old/usr/lib64/python2.4/site-packages/xen/xend/server/irqif.py 2008-04-17 19:12:11.305372782 +0200 +++ new/usr/lib64/python2.4/site-packages/xen/xend/server/irqif.py 2008-04-17 19:15:50.363063032 +0200 @@ -61,7 +61,7 @@ pirq = get_param('irq') - rc = xc.domain_irq_permission(dom = self.getDomid(), + rc = xc.domain_irq_permission(domid = self.getDomid(), pirq = pirq, allow_access = True) diff -Nur old/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py new/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py --- old/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py 2008-04-17 18:23:07.717410032 +0200 +++ new/usr/lib64/python2.4/site-packages/xen/xend/server/pciif.py 2008-04-17 18:48:24.960231782 +0200 @@ -155,9 +155,9 @@ PCIQuirk(dev.vendor, dev.device, dev.subvendor, dev.subdevice, domain, bus, slot, func) - for (start, size) in dev.ioports: + 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 @@ 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 @@ 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 '+ |
After applying xen-2485.patch on latest packages of centos 5.1 problem has been solved. | |
xen-2485.patch seems to be applied xen-3.0.3-94.el5_4.2 (maybe earlier, but this is the version that I have at hand). I guess we could/should close the bug ? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2007-12-03 13:52 | hrak | New Issue | |
2007-12-03 13:52 | hrak | File Added: xenpatch.diff | |
2007-12-04 13:48 | hrak | Note Added: 0006470 | |
2008-02-20 19:13 | mlodi72 | Note Added: 0006915 | |
2008-04-02 04:58 | darkfader | Note Added: 0007079 | |
2008-04-17 18:40 | andree | File Added: xen-2485.patch | |
2008-04-17 18:43 | andree | Note Added: 0007146 | |
2009-11-28 00:21 |
|
Note Added: 0010424 |