Bug 501777 - kvm doesn't build on newer RHEL-5.4 kernels because of get_user_pages_fast()
kvm doesn't build on newer RHEL-5.4 kernels because of get_user_pages_fast()
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Eduardo Habkost
Lawrence Lim
:
: 504045 (view as bug list)
Depends On:
Blocks: 504038 504045
  Show dependency treegraph
 
Reported: 2009-05-20 12:35 EDT by Eduardo Habkost
Modified: 2014-03-25 20:56 EDT (History)
5 users (show)

See Also:
Fixed In Version: kvm-83-39.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 501809 504038 504045 504047 (view as bug list)
Environment:
Last Closed: 2009-09-02 05:33:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
external module: don't redefined get_user_pages_fast() on RHEL-5.4 (1.20 KB, patch)
2009-05-20 12:40 EDT, Eduardo Habkost
no flags Details | Diff
external module: don't redefined get_user_pages_fast() on RHEL-5.4 (2.03 KB, patch)
2009-05-20 14:14 EDT, Eduardo Habkost
no flags Details | Diff
Provides symbol exports required by kvm module under 5.4 kernel. (821 bytes, patch)
2009-06-02 09:42 EDT, john cooper
no flags Details | Diff
Modification to module compatibility code to correctly map to 5.4 kernel exports (2.79 KB, patch)
2009-06-02 10:48 EDT, john cooper
no flags Details | Diff
504038-add-smp-send-reschedule-and-get-user-pages-fast-to-kABI.patch (2.05 KB, application/octet-stream)
2009-06-15 02:29 EDT, Jon Masters
no flags Details

  None (edit)
Description Eduardo Habkost 2009-05-20 12:35:10 EDT
KVM doesn't build against newer RHEL-5.4 kernels because of the following error:

 CC [M]  /mnt/common/code/kvm/kvm-userspace/kernel/x86/svm.o
In file included from /mnt/common/code/kvm/kvm-userspace/kernel/x86/external-module-compat.h:9,
                 from <command line>:1:
/mnt/common/code/kvm/kvm-userspace/kernel/x86/../external-module-compat-comm.h:567: error: static declaration of ‘get_user_pages_fast’ follows non-static declaration
include/linux/mm.h:874: error: previous declaration of ‘get_user_pages_fast’ was here


external-module-compat.h needs to be fixed to detect when get_user_pages_fast() is available on RHEL-5.4 kernels.
Comment 1 Eduardo Habkost 2009-05-20 12:40:49 EDT
Created attachment 344842 [details]
external module: don't redefined get_user_pages_fast() on RHEL-5.4

Patch that is currently on the git patch queue.
Comment 2 Eduardo Habkost 2009-05-20 12:40:53 EDT
Patch posted for review and queued. Changing status to POST
Comment 3 Eduardo Habkost 2009-05-20 14:12:20 EDT
Comment on attachment 344842 [details]
external module: don't redefined get_user_pages_fast() on RHEL-5.4

Propose patch was broken. A new one was proposed by Chris Wright. http://post-office.corp.redhat.com/archives/virtualist/2009-May/msg00630.html
Comment 4 Eduardo Habkost 2009-05-20 14:14:58 EDT
Created attachment 344856 [details]
external module: don't redefined get_user_pages_fast() on RHEL-5.4

Patch that is currently on the git patch queue.
Comment 5 Eduardo Habkost 2009-05-20 14:18:14 EDT
Patches acked:
* Patch: external module: don't redefine get_user_pages_fast() on RHEL-5.4
  (Message-Id: <20090520173120.GE26525@x200.localdomain>)
  - Acked-by: Juan Quintela <quintela@redhat.com>
  - Acked-by: Eduardo Habkost <ehabkost@redhat.com>
  - Acked-by: Don Dutile <ddutile@redhat.com>
Comment 7 john cooper 2009-05-21 09:52:16 EDT
Parking this for now, but the following should
resolve the case:

We still need an export in arch/x86_64/mm/gup.c to
make get_user_pages_fast() visible to modules.
Also an addition to kernel/kabi_whitelist_x86_64
to include 'get_user_pages_fast'.  jcm will do
the latter:

<jcm> basically, you need to email jcm@redhat.com with a bugzilla containing the name of the symbols, and some info.
<jcm> I'll update those files.

I ran into some weird build problems with 
kvm-userspace-rhel5 which I don't have cycles
ATM to resolve, given there is a work around.
Comment 8 john cooper 2009-06-02 09:34:45 EDT
The attached patch addresses export of the required
symbols to kernel modules.  Associated brew build
may be found here:

https://brewweb.devel.redhat.com/taskinfo?taskID=1822468

Patch for kvm side to follow.
Comment 9 john cooper 2009-06-02 09:42:54 EDT
Created attachment 346250 [details]
Provides symbol exports required by kvm module under 5.4 kernel.
Comment 10 john cooper 2009-06-02 10:48:41 EDT
Created attachment 346267 [details]
Modification to module compatibility code to correctly map to 5.4 kernel exports
Comment 12 Eduardo Habkost 2009-06-09 13:34:03 EDT
*** Bug 504045 has been marked as a duplicate of this bug. ***
Comment 13 Jon Masters 2009-06-15 02:29:54 EDT
Created attachment 347895 [details]
504038-add-smp-send-reschedule-and-get-user-pages-fast-to-kABI.patch
Comment 14 Eduardo Habkost 2009-06-15 13:34:40 EDT
(In reply to comment #13)
> Created an attachment (id=347895) [details]
> 504038-add-smp-send-reschedule-and-get-user-pages-fast-to-kABI.patch  

This is a KVM build fix bug. For the kernel-side of the change, that includes the export of this symbol, see https://bugzilla.redhat.com/show_bug.cgi?id=504038
Comment 18 errata-xmlrpc 2009-09-02 05:33:09 EDT
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/RHEA-2009-1272.html

Note You need to log in before you can comment on or make changes to this bug.