RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 743590 - x86_64 xen guest crash when booting with maxmem = 128Gb
Summary: x86_64 xen guest crash when booting with maxmem = 128Gb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 653816 716498 748554
TreeView+ depends on / blocked
 
Reported: 2011-10-05 13:14 UTC by Igor Mammedov
Modified: 2011-12-06 14:15 UTC (History)
7 users (show)

Fixed In Version: kernel-2.6.32-209.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 14:15:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
[RHEL6.2 PATCH] xen: use maximum reservation to limit amount of usable RAM (4.69 KB, patch)
2011-10-06 08:02 UTC, Igor Mammedov
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 716498 0 low CLOSED bump domain memory limits 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2011:1530 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux 6 kernel security, bug fix and enhancement update 2011-12-06 01:45:35 UTC

Internal Links: 716498

Description Igor Mammedov 2011-10-05 13:14:52 UTC
x86_64 xen guest will hit BUG_ON at arch/x86/xen/mmu.c:185
xen_memory_setup=>xen_add_extra_mem=>__set_phys_to_machine=>p2m_top_index

   BUG_ON(pfn >= MAX_DOMAIN_PAGES);

Affects RHEL6.2 since 27109d2 commit due to introduction of PV ballooning code "xen_add_extra_mem=>...".

Problem description:

Xen starts pv guest setting guest's e820 RAM entry size to maxmem + 8Mb.
When memory == maxmem = 128Gb, the guest will see HV supplied e820 map with 128Gb+8Mb entry (0x2000800 pages). But xen_start_info->nr_pages will have value 0x2000000 (128Gb in pages). So guest assumes that extra 0x800 pages are ballooning memory and tries to initialize it. However this extra pages are located beyond of guest supported MAX_DOMAIN_PAGES. Which leads to BUG_ON.


Expected behaviour:
 Guest should not crash if host provided e820 map has more RAM then supported by guest.

Comment 1 Igor Mammedov 2011-10-05 13:23:17 UTC
Could be fixed by capping the RAM region size to supported limit:

Relevant upstream commits to backport:
  d312ae878b6 xen: use maximum reservation to limit amount of usable RAM
  e3b73c4a25e xen/e820: if there is no dom0_mem=, don't tweak extra_pages

Comment 2 RHEL Program Management 2011-10-05 13:31:43 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 3 Igor Mammedov 2011-10-06 08:02:35 UTC
Created attachment 526642 [details]
[RHEL6.2 PATCH] xen: use maximum reservation to limit amount of usable RAM

Comment 4 Aristeu Rozanski 2011-10-13 15:27:10 UTC
Patch(es) available on kernel-2.6.32-209.el6

Comment 8 Qin Guan 2011-10-31 04:08:48 UTC
Verify this problem with kernel-2.6.32-211.el6. 

Host:
2.6.18-294.el5xen
xen-3.0.3-135.el5

Guest:
kernel-2.6.32-211.el6

Steps:
1. Create a RHEL6.2 PV guest with memory set as 128G(131072M)
2. Check dmesg after guest started up 
3. Do some sanity check for the guest, such as reboot, halt, pause/unpause
4. Save and restore the guest
5. Do guest live migration with "xenheap_megabytes=48" set in xen.gz cmd line (rhbz #728877 comment 13)

No any problem found during the testing.

Comment 9 errata-xmlrpc 2011-12-06 14:15:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1530.html


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