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 410811

Summary: [Stratus 5.2 Regression] Xen 3.1.2 hypervisor corrupts reserved memory below 16M
Product: Red Hat Enterprise Linux 5 Reporter: Peter Martuccelli <peterm>
Component: kernel-xenAssignee: Chris Lalancette <clalance>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: high    
Version: 5.2CC: andriusb, smcgrath, xen-maint
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: RHBA-2008-0314 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:03:00 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: 217119    
Attachments:
Description Flags
Avoid handing reserved pages to the boot allocator none

Description Kimball Murray 2007-12-04 18:29:43 UTC
Description of problem:
The latest Xen hypervisor (3.1.2) adds all memory between 1M and 16M to its
boot-time allocator pool, regardless of whether or not any of that memory is
reserved by the BIOS.  The earlier (3.1.0) hypersior paid strict attention to
the e820 tables before adding any memory to the allocator pool.

Version-Release number of selected component (if applicable):
Xen 3.1.2

How reproducible:
100%

Steps to Reproduce:
1. Boot machine
2.
3.
  
Actual results:


Expected results:


Additional info:
The outward sympton was first observed on a Stratus platform, which has a
reserved BIOS area (256K located at 15M).  After any SMI was triggered, the
machine would slow down by a factor of 50 or so.  It turns out that on return
from SMI, the MTRRs had changed the cache policy on main memory from write-back,
to write-through.  Further investigation demonstrated that the reserved BIOS
area was being corrupted by the hypervisor itself at boot time.

The problem appears to have been introduced by the 15044 patch from upstream. 
This patch replaced code that paid attention to the e820 tables with this:

+    init_boot_pages(1<<20, 16<<20); /* Initial seed: 15MB */

That line adds all memory from 1M to 16M to the boot allocator.  Not good.

Comment 1 Kimball Murray 2007-12-04 18:50:09 UTC
Created attachment 277241 [details]
Avoid handing reserved pages to the boot allocator

Tested on 64-bit platform.  Needs testing on 32-bit.

Comment 2 Brian Stein 2007-12-04 22:30:08 UTC
Chris - Please review this w/ XS folks and help work it upstream.

Comment 3 Bill Burns 2007-12-11 13:59:36 UTC
Patch for this is upstream on the Xen 3.1.3 branch:
http://xenbits.xensource.com/xen-3.1-testing.hg?rev/9fb4696d37e4


Comment 6 Andrius Benokraitis 2007-12-17 23:14:55 UTC
Kimball, has this been POSTed yet? This looks like the last of the pieces that
are needed for full enablement of Stratus systems...

Comment 7 Chris Lalancette 2007-12-18 01:25:48 UTC
Andrius,
     Kimball and I just finished a last round of testing on this; there were
some bits that had to make it upstream, which they finally did this weekend.  I
expect to post the patches tomorrow.

Chris Lalancette

Comment 8 Andrius Benokraitis 2008-01-15 18:16:10 UTC
Chris/Kimball -- How is this looking to make Beta?

Comment 9 Chris Lalancette 2008-01-16 14:07:46 UTC
It looks like Kimball's original patch was included in the latest build, so it
should make beta.

Chris Lalancette

Comment 10 Andrius Benokraitis 2008-01-16 15:30:26 UTC
Hi Chris, great news. Can you post what version of the build it made, and
wouldn't this mean this is in MODIFIED state as well? Thanks!

Comment 12 Don Zickus 2008-01-21 17:29:43 UTC
in 2.6.18-71.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 16 errata-xmlrpc 2008-05-21 15:03:00 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 the 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/RHBA-2008-0314.html