Received: by 10.223.176.46 with SMTP id f43csp128153wra; Thu, 25 Jan 2018 18:49:35 -0800 (PST) X-Google-Smtp-Source: AH8x227LGEL8PxLRwg7TZCOibatLSAVHAqgu0aVR3G9K7ByrLoXjygiWKqXn0VYfIHmgymD1En1D X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr13014440plu.40.1516934975054; Thu, 25 Jan 2018 18:49:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516934975; cv=none; d=google.com; s=arc-20160816; b=T3hyvfhnH08Lp0aXhH7oCaiCwUW7Bm+oQqHQlvcO9O70+IfZCTtvItRJkOl0dB2U+F d7N0xydM6512I9geG4oYTQ2tcD/TNyNHgjuQML1TcOmsN8IZoptddFO6AFXj0jpCLDaY bSjfB4dk3ECp/DtXVlo32l47wFNZ83+Zxvqcbj6BQJ5z+QgP1VqOzewt13AGFLG8QQOy tbVE24mzGBTEvBbRNTtrUqbIFy0sCgOiBOoBU0a6JV5TGnDDsYqP3zbidprQRB4z3EuO vLO8K/liqE4P2D+XUHp3KAgYcEmDPtuIS19T0Va37EKIEibVKmf9YaZtFO9AF3RWjxdx wIYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6laVt5zXP4iMNI1u3lfSs46ZNEM6uYmIIMRJsUDEj8M=; b=aUa2jfukcB8moi/arS47GHThKpZ8cEDUAnF+3YSyGafQDk5CtmUE/P6SE06a4Ot+D3 OdlyPU2bWxOb/Y994PXvE1J+vvZcBOaTTvDWxWneSZOzFr9I14IYiciTGQ+AOmuwlm7f OYUvMtVQOOY8DfsBpRt2t6dBajBW7RXxj0gyeYW+a91aFoRiKsWY0PpBccSO4m3ckKr6 0YCxRcxc/6bqZK6T7GYYG3OHAnauYa0h4N+frixphxR5RLfuEbyI8eUIZrVG1mCOuyiK pYv4bJ8qp5X/HCulQkCbbapiQolLuKxpeLNQROTaVUgo3bUTwSpxhsaE0x6ursji0t2t 9igQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e63si5526931pfm.297.2018.01.25.18.49.21; Thu, 25 Jan 2018 18:49:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751816AbeAZCst (ORCPT + 99 others); Thu, 25 Jan 2018 21:48:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34324 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbeAZCsr (ORCPT ); Thu, 25 Jan 2018 21:48:47 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27E52356C5; Fri, 26 Jan 2018 02:48:47 +0000 (UTC) Received: from localhost (ovpn-8-21.pek2.redhat.com [10.72.8.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 39A5560A9D; Fri, 26 Jan 2018 02:48:43 +0000 (UTC) Date: Fri, 26 Jan 2018 10:48:41 +0800 From: Baoquan He To: "Kirill A. Shutemov" Cc: Ingo Molnar , Mike Galbraith , Andrew Morton , Peter Zijlstra , Greg Kroah-Hartman , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Andy Lutomirski , linux-mm@kvack.org, Vivek Goyal , Cyrill Gorcunov , Thomas Gleixner , Borislav Petkov , Linus Torvalds , "Kirill A. Shutemov" Subject: Re: [PATCH 4.14 023/159] mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y Message-ID: <20180126024841.GA1759@localhost.localdomain> References: <20171222084623.668990192@linuxfoundation.org> <20171222084625.007160464@linuxfoundation.org> <1515302062.6507.18.camel@gmx.de> <20180108160444.2ol4fvgqbxnjmlpg@gmail.com> <20180108174653.7muglyihpngxp5tl@black.fi.intel.com> <20180109001303.dy73bpixsaegn4ol@node.shutemov.name> <20180117052454.GA2321@localhost.localdomain> <20180125155043.nj5b26yxutds7f37@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180125155043.nj5b26yxutds7f37@node.shutemov.name> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 26 Jan 2018 02:48:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/18 at 06:50pm, Kirill A. Shutemov wrote: > On Wed, Jan 17, 2018 at 01:24:54PM +0800, Baoquan He wrote: > > Hi Kirill, > > > > I setup qemu 2.9.0 to test 5-level on kexec/kdump support. While both > > kexec and kdump reset to BIOS immediately after triggering. I saw your > > patch adding 5-level paging support for kexec. Wonder if your test > > succeeded to jump into kexec/kdump kernel, and what else I need to > > make it. By the way, I just tested the latest upstream kernel. > > > > commit 7f6890418 x86/kexec: Add 5-level paging support > > > > [ ~]$ qemu-system-x86_64 --version > > QEMU emulator version 2.9.0(qemu-2.9.0-1.fc26.1) > > Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers > > Sorry for delay. > > I didn't tested it in 5-level paging mode :-/ > > The patch below helps in my case. Could you test it? Thanks, Kirill. Seems it doesn't work. I have some confusion about the process, will send you a private mail. Thanks Baoquan > > diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S > index 307d3bac5f04..65a98cf2307d 100644 > --- a/arch/x86/kernel/relocate_kernel_64.S > +++ b/arch/x86/kernel/relocate_kernel_64.S > @@ -126,8 +126,12 @@ identity_mapped: > /* > * Set cr4 to a known state: > * - physical address extension enabled > + * - 5-level paging, if enabled > */ > movl $X86_CR4_PAE, %eax > +#ifdef CONFIG_X86_5LEVEL > + orl $X86_CR4_LA57, %eax > +#endif > movq %rax, %cr4 > > jmp 1f > -- > Kirill A. Shutemov