x86/setup: Do not reserve crashkernel high memory if low reservation failed
x86/setup: Do not reserve crashkernel high memory if low reservation failed

People reported that when allocating crashkernel memory using
the ",high" and ",low" syntax, there were cases where the
reservation of the high portion succeeds but the reservation of
the low portion fails.

Then kexec can load the kdump kernel successfully, but booting
the kdump kernel fails as there's no low memory.

The low memory allocation for the kdump kernel can fail on large
systems for a couple of reasons. For example, the manually
specified crashkernel low memory can be too large and thus no
adequate memblock region would be found.

Therefore, we try to reserve low memory for the crash kernel
*after* the high memory portion has been allocated. If that
fails, we free crashkernel high memory too and return. The user
can then take measures accordingly.

Tested-by: Joerg Roedel <61aff96566804ea1da8a65de5bcc892ce07caceb@suse.de>
Signed-off-by: Baoquan He <1b95acc14c82271bede46a8b6a84bd6be6240a7c@redhat.com>
[ Massage text. ]
Signed-off-by: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@suse.de>
Reviewed-by: Joerg Roedel <61aff96566804ea1da8a65de5bcc892ce07caceb@suse.de>
Cc: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Cc: Andy Lutomirski <2cc0d0d76de2e6f37b92deeb83c85cb306fc5dc1@amacapital.net>
Cc: Dave Young <5716cc40769303914dac486db0fc6ac4cba9419e@redhat.com>
Cc: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
Cc: Jiri Kosina <ed58f755cc8caaf10c3e8c731a8b86fb8f13d6cb@suse.cz>
Cc: Juergen Gross <29bbaec13092d36559e3abc6f27f7d09c395819f@suse.com>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Mark Salter <3186038803479a476d7152f26680d7b1b21c12c4@redhat.com>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
Cc: WANG Chao <c2aee7029fe382c8d64e1072d797631ac5391d91@redhat.com>
Cc: 30ac6023d09ec909e66e30f98e7a06d045840c75@hp.com
Cc: 0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org
Link: a38b85556d94ab752e95225fb459c3c6a851fb9f@alien8.de
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs