Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 154921 Details for
Bug 240429
RHEL5 Kernel crash when specifying mem= or highmem= kernel parameter
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to fix mem= kernel parameter
linux-2.6.18-xen-i386-fix-mem-parm5.patch (text/plain), 2.98 KB, created by
Chris Lalancette
on 2007-05-17 14:40:55 UTC
(
hide
)
Description:
Patch to fix mem= kernel parameter
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2007-05-17 14:40:55 UTC
Size:
2.98 KB
patch
obsolete
>--- linux-2.6.18.noarch/arch/x86_64/kernel/setup-xen.c.orig 2007-05-17 06:23:15.000000000 -0400 >+++ linux-2.6.18.noarch/arch/x86_64/kernel/setup-xen.c 2007-05-17 06:27:28.000000000 -0400 >@@ -783,6 +783,29 @@ > { > int i, j, k, fpp; > >+ if (xen_start_info->nr_pages > max_pfn) { >+ /* >+ * the max_pfn was shrunk (probably by mem= or highmem= >+ * kernel parameter); shrink reservation with the HV >+ */ >+ struct xen_memory_reservation reservation = { >+ .address_bits = 0, >+ .extent_order = 0, >+ .domid = DOMID_SELF >+ }; >+ unsigned int difference; >+ int ret; >+ >+ difference = xen_start_info->nr_pages - max_pfn; >+ >+ set_xen_guest_handle(reservation.extent_start, >+ ((unsigned long *)xen_start_info->mfn_list) + max_pfn); >+ reservation.nr_extents = difference; >+ ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, >+ &reservation); >+ BUG_ON (ret != difference); >+ } >+ > if (!xen_feature(XENFEAT_auto_translated_physmap)) { > /* Make sure we have a large enough P->M table. */ > phys_to_machine_mapping = alloc_bootmem_pages( >@@ -791,10 +814,10 @@ > end_pfn * sizeof(unsigned long)); > memcpy(phys_to_machine_mapping, > (unsigned long *)xen_start_info->mfn_list, >- xen_start_info->nr_pages * sizeof(unsigned long)); >+ max_pfn * sizeof(unsigned long)); > free_bootmem( > __pa(xen_start_info->mfn_list), >- PFN_PHYS(PFN_UP(xen_start_info->nr_pages * >+ PFN_PHYS(PFN_UP(max_pfn * > sizeof(unsigned long)))); > > /* >--- linux-2.6.18.noarch/arch/i386/kernel/setup-xen.c.orig 2007-05-09 08:34:25.000000000 -0400 >+++ linux-2.6.18.noarch/arch/i386/kernel/setup-xen.c 2007-05-17 06:24:49.000000000 -0400 >@@ -1693,6 +1693,29 @@ > find_smp_config(); > #endif > >+ if (xen_start_info->nr_pages > max_pfn) { >+ /* >+ * the max_pfn was shrunk (probably by mem= or highmem= >+ * kernel parameter); shrink reservation with the HV >+ */ >+ struct xen_memory_reservation reservation = { >+ .address_bits = 0, >+ .extent_order = 0, >+ .domid = DOMID_SELF >+ }; >+ unsigned int difference; >+ int ret; >+ >+ difference = xen_start_info->nr_pages - max_pfn; >+ >+ set_xen_guest_handle(reservation.extent_start, >+ ((unsigned long *)xen_start_info->mfn_list) + max_pfn); >+ reservation.nr_extents = difference; >+ ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, >+ &reservation); >+ BUG_ON (ret != difference); >+ } >+ > /* Make sure we have a correctly sized P->M table. */ > if (!xen_feature(XENFEAT_auto_translated_physmap)) { > phys_to_machine_mapping = alloc_bootmem_low_pages( >@@ -1701,10 +1724,10 @@ > max_pfn * sizeof(unsigned long)); > memcpy(phys_to_machine_mapping, > (unsigned long *)xen_start_info->mfn_list, >- xen_start_info->nr_pages * sizeof(unsigned long)); >+ max_pfn * sizeof(unsigned long)); > free_bootmem( > __pa(xen_start_info->mfn_list), >- PFN_PHYS(PFN_UP(xen_start_info->nr_pages * >+ PFN_PHYS(PFN_UP(max_pfn * > sizeof(unsigned long)))); > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240429
:
154921
|
154933
|
335116