From: "Jan Beulich" Subject: [PATCH] x86: make sure memory block is RAM before passing to the allocator Date: Mon, 04 Nov 2013 10:25:30 +0000 Message-ID: <5277842A02000078000FEF63@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part3102190A.0__=" Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VdHLk-0003TJ-0a for xen-devel@lists.xenproject.org; Mon, 04 Nov 2013 10:25:36 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part3102190A.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Memory blocks outside of the always visible 1:1 mapping range get passed to the allocator separately (once enough other setup was done). Skipping non-RAM regions, however, was forgotten in adc5afbf ("x86: support up to 16Tb"). Signed-off-by: Jan Beulich --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1155,6 +1155,8 @@ void __init __start_xen(unsigned long mb { uint64_t s, e; =20 + if ( boot_e820.map[i].type !=3D E820_RAM ) + continue; s =3D (boot_e820.map[i].addr + mask) & ~mask; e =3D (boot_e820.map[i].addr + boot_e820.map[i].size) & = ~mask; if ( PFN_DOWN(e) <=3D limit ) --=__Part3102190A.0__= Content-Type: text/plain; name="x86-extra-mem-check-RAM.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-extra-mem-check-RAM.patch" x86: make sure memory block is RAM before passing to the allocator=0A=0AMem= ory blocks outside of the always visible 1:1 mapping range get=0Apassed to = the allocator separately (once enough other setup was done).=0ASkipping = non-RAM regions, however, was forgotten in adc5afbf ("x86:=0Asupport up to = 16Tb").=0A=0ASigned-off-by: Jan Beulich =0A=0A--- = a/xen/arch/x86/setup.c=0A+++ b/xen/arch/x86/setup.c=0A@@ -1155,6 +1155,8 = @@ void __init __start_xen(unsigned long mb=0A {=0A = uint64_t s, e;=0A =0A+ if ( boot_e820.map[i].type !=3D E820_RAM = )=0A+ continue;=0A s =3D (boot_e820.map[i].addr = + mask) & ~mask;=0A e =3D (boot_e820.map[i].addr + boot_e820.ma= p[i].size) & ~mask;=0A if ( PFN_DOWN(e) <=3D limit )=0A --=__Part3102190A.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part3102190A.0__=--