From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbaCZNW5 (ORCPT ); Wed, 26 Mar 2014 09:22:57 -0400 Received: from nat28.tlf.novell.com ([130.57.49.28]:48664 "EHLO nat28.tlf.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753545AbaCZNWy convert rfc822-to-8bit (ORCPT ); Wed, 26 Mar 2014 09:22:54 -0400 Message-Id: <5332E2B9020000780000255D@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.0 Date: Wed, 26 Mar 2014 13:22:49 +0000 From: "Jan Beulich" To: "Matt Fleming" Cc: , , , , , , , , , , , "Daniel Kiper" , , , , , , , Subject: Re: [PATCH v3 3/5] x86: Call efi_memblock_x86_reserve_range() on native EFI platform only References: <1395781076-12000-1-git-send-email-daniel.kiper@oracle.com> <1395781076-12000-4-git-send-email-daniel.kiper@oracle.com> <20140326130009.GB24856@console-pimps.org> In-Reply-To: <20140326130009.GB24856@console-pimps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 26.03.14 at 14:00, wrote: > On Tue, 25 Mar, at 09:57:54PM, Daniel Kiper wrote: >> Call efi_memblock_x86_reserve_range() on native EFI platform only. >> This is not needed and even it should not be called on platforms >> which wraps EFI infrastructure like Xen. >> >> Signed-off-by: Daniel Kiper >> --- >> arch/x86/kernel/setup.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c >> index ce72964..992b67a 100644 >> --- a/arch/x86/kernel/setup.c >> +++ b/arch/x86/kernel/setup.c >> @@ -933,7 +933,7 @@ void __init setup_arch(char **cmdline_p) >> set_bit(EFI_64BIT, &x86_efi_facility); >> } >> >> - if (efi_enabled(EFI_BOOT)) >> + if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, "EL", 2)) >> efi_memblock_x86_reserve_range(); >> #endif > > This could do with a little bit more explanation. Why is it not > necessary to mark the EFI memory map that was passed to the kernel as > reserved in memblock? Because that's in memory Dom0 doesn't even see: The EFI memory map is visible to the hypervisor only. Jan