Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 521081

Summary: [RHEL5.4 RC2] KMP for xen kernel cannot be applied
Product: Red Hat Enterprise Linux 5 Reporter: Jon Thomas <jthomas>
Component: kernel-xenAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Chao Yang <chyang>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.4CC: andriusb, clalance, ddugger, ddutile, dexuan.cui, dhoward, dzickus, emcnabb, jpirko, jtluka, pbonzini, qcai, syeghiay, tao, xen-maint
Target Milestone: rc   
Target Release: 5.4   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 528752 (view as bug list) Environment:
Last Closed: 2010-03-30 06:57:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 499522, 526946, 532029    
Attachments:
Description Flags
patch to add the symbols to the whitelist none

Description Jon Thomas 2009-09-03 14:38:40 UTC
Description of problem:
When creating KMP that includes the driver that uses "pci_enable_msi/pci_disable_msi" function
for xen kernel and applying it, the following messages are printed out and KMP cannot be applied.

---
error: Failed dependencies:
        ksym(pci_enable_msi) = 7e2b784b is needed by kmod-stex-xen-4.6.0102.3-1.i686
        ksym(pci_disable_msi) = e6abde88 is needed by kmod-stex-xen-4.6.0102.3-1.i686
---

This problem occurs on both i386 and x86_64.
This problem does not occur on RHEL5.3 GA, and it is a regression.

Version-Release number of selected component (if applicable):
RHEL5.4 RC2
 kernel-2.6.18-162.el5
 kernel-xen-devel-2.6.18-162.el5

How reproducible:
Always

Steps to Reproduce:
The below steps describes how to reproduce this problem using the stex.c
source code that comes with kernel-2.6.18-162.el5.

1. Install RHEL5.4 RC2, and reboot.

2. Install kernel-devel packages.

  # rpm -ivh kernel-devel-2.6.18-162.el5.i686.rpm
  # rpm -ivh kernel-PAE-devel-2.6.18-162.el5.i686.rpm
  # rpm -ivh kernel-xen-devel-2.6.18-162.el5.i686.rpm

3. Install the attached file(stex-4.6.0102.3-1.src.rpm).

  Note that stex.c is the same as the one in kernel-2.6.18-162.el5.

  # rpm -ivh stex-4.6.0102.3-1.src.rpm

4. Create KMP package.

  # rpmbuild -ba --target i686 /usr/src/redhat/SPECS/stex_rhel.spec

5. Confirm that KMP package is created in /usr/src/redhat/RPMS/i686

6. Apply KMP package in the environment that kernel-xen package is installed.

  # rpm -ivh kmod-stex-xen-4.6.0102.3-1.i686.rpm

Actual results:
The following messages are printed out and KMP cannot be applied.

---
error: Failed dependencies:
        ksym(pci_enable_msi) = 7e2b784b is needed by kmod-stex-xen-4.6.0102.3-1.i686
        ksym(pci_disable_msi) = e6abde88 is needed by kmod-stex-xen-4.6.0102.3-1.i686
---

Expected results:
KMP can be applied normally.

Business impact:
Even if user creates KMP for xen kernel, they cannot apply it.

Hardware info:
Hardware independent

Additional info:
- This problem does not occur if kernel-xen-devel package of RHEL5.3 is used.
- This problem seems to occur because there is the following description in Module.symvers
 included in kernel-xen-devel of RHEL5.4.
 When we deleted the following descriptions and created KMP, KMP could be applied normally.

 ---
 0x8054f4a4 pci_enable_msi vmlinux EXPORT_SYMBOL
 0x99841044 pci_disable_msi vmlinux EXPORT_SYMBOL

Comment 1 Jon Thomas 2009-09-03 14:41:04 UTC
Here some additional info. A fix was suggested in the IT.


------------
It seems that fix for /drivers/pci/Kconfig is neeeded as follows.

http://lists.xensource.com/archives/html/xen-merge/2005-12/msg00015.html

Index: 2005-12-16/drivers/pci/Kconfig
===================================================================
--- 2005-12-16.orig/drivers/pci/Kconfig 2005-11-21 16:41:39.000000000 +0100
+++ 2005-12-16/drivers/pci/Kconfig 2005-12-19 14:31:37.939450896 +0100
@@ -4,7 +4,7 @@
config PCI_MSI
bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI
- depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
+ depends on (X86_LOCAL_APIC && X86_IO_APIC && !XEN) || IA64
help
 This allows device drivers to enable MSI (Message Signaled
 Interrupts).  Message Signaled Interrupts enable a device to



Though Xen in the kernel doesn't support MSI, but seems CONFIG_PCI_MSI is set to "y" on RHEL, and
we verified KMP compiled correctly when setting CONFIG_PCI_MSI to "n" in kernel build .config file.
Because Module.symvers is generated by setting CONFIG_PCI_MSI to "n".

Comment 2 Don Dutile (Red Hat) 2009-09-03 18:57:13 UTC
PCI_MSI may be needed for PCI device-assignment -- the assignment of a PCI(e) device to a domU/pv guest.  
This can be limited to X86_64, so it gets around the above
issue for an i686 kmod, but I don't believe that removing it
from all XEN dom0's will be ok.
Adding ddugger from Intel to get their input.

- Don (Dutile)

Comment 3 Chris Lalancette 2009-09-04 08:13:33 UTC
(In reply to comment #2)
> PCI_MSI may be needed for PCI device-assignment -- the assignment of a PCI(e)
> device to a domU/pv guest.  
> This can be limited to X86_64, so it gets around the above
> issue for an i686 kmod, but I don't believe that removing it
> from all XEN dom0's will be ok.
> Adding ddugger from Intel to get their input.

Right, agreed, that doesn't sound like the right thing to do.  Hopefully we can get a bit more information from Intel here.

Chris Lalancette

Comment 4 Don Dugger 2009-09-04 14:20:56 UTC
PCI_MSI is needed for some devices (the Kawela NIC on the Tylersberg platform comes to mind) but I don't believe that it is required in all cases.  Adding Dexuan to see if he can comment on the specifics of this issue.

Comment 5 Dexuan Cui 2009-09-04 17:54:01 UTC
Sorry, I don't know KMP and kmod-stex, but I think we do need CONFIG_PCI_MSI to assign MSI/MSI-X capable device to PV DomU.

Comment 9 Chris Lalancette 2009-09-10 11:57:52 UTC
Right, I took a quick look at this.  Since I don't know the versioning stuff really, this is just a guess, but I would guess the problem is that we don't have pci_enable_msi/pci_disable_msi on the kabi whitelist for RHEL-5 Xen.  I don't think there's anything we can do about it at the moment, other than:

1)  Recommend the --nodeps workaround
2)  Add those symbols to RHEL-5.5 (and possibly 5.4 z-stream)

Chris Lalancette

Comment 14 Paolo Bonzini 2009-10-13 15:21:25 UTC
Created attachment 364613 [details]
patch to add the symbols to the whitelist

Comment 15 Paolo Bonzini 2009-10-13 15:22:45 UTC
Not a regression anyway.

Comment 16 Paolo Bonzini 2009-10-13 15:48:09 UTC
Bringing over correct flags and dependencies from bug 528752

Comment 18 Don Zickus 2009-11-03 22:52:52 UTC
in kernel-2.6.18-172.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 24 errata-xmlrpc 2010-03-30 06:57:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html