Received: by 10.223.176.46 with SMTP id f43csp2300764wra; Thu, 25 Jan 2018 07:52:53 -0800 (PST) X-Google-Smtp-Source: AH8x224O5QmKRIGObYwtzAbDuBStV/SUv2uR59dFdNYcwyX17w6/47DGlNGP9ir1ls2Xx+Xkgx2w X-Received: by 2002:a17:902:4401:: with SMTP id k1-v6mr2918898pld.136.1516895573186; Thu, 25 Jan 2018 07:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516895573; cv=none; d=google.com; s=arc-20160816; b=gCwhcF/2lefonTE5C0kH0Z0OpF9zl5E5BtrZPuza3zIlF0yQruwXR3sr+JcrV29XML tSHqbIspZMOmYhbZbjAHeQ8WmeS1j5yNSiEw6w1Y5wOzLMcgyaLMYkIvmH3LguILCU+L yAzLHLIXPbFD+k4H/3P2WNOt58ehix7jYEdMKtB/zA0cJKzY4OSxtwLnpexPjYoyhpF4 GN4cHSmXWQVa8vuBgarLXOagYKGiuHQparKtGzecVKuoFTZR06RU9ZDhy8sQZrX8yF6T gBD1x8V0iPEKzEL1RfetPycuYX2WLWkBqywzdsgl9ub3DV0WppVdQXBsX8rXqh9EqVBO H9Kg== 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:dkim-signature:arc-authentication-results; bh=WiK6cuW+HsqjxbbtDfYG6s4j5P4b9WDfsVREepoXjqo=; b=Z8/br6hkRwCVZQeiaEvSVBxov43OQFFYZpvXvjHVkpJcml5BceyRqzK3UlsrF3kbko aOXqgPuuBhyyehd4C1TkKijgqSqoIJxJ2BNJon4c8mfuULEaXmwV6fdB4haEaTFLOZZZ uX5NqMgP+C0wt18DD0AcUpTpuQBni+U62ogL0FMP90l/E50TAs27q1K7IirYFarrvONe DjJDSivDTAUPdfnp3JHG9T9Zozcg5bavPMD3RnM96QGJlxRo3m+SQRxbKmGOJVuUQS45 UMFPZLHMOSG199h65DuZb8H77kgx8f2tfrKAOyAc9C917pj2WXTpDC0DUBUnkqMchjGc sEHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=ny5kVzBz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si4810321pfh.170.2018.01.25.07.52.38; Thu, 25 Jan 2018 07:52:53 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=ny5kVzBz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751353AbeAYPuv (ORCPT + 99 others); Thu, 25 Jan 2018 10:50:51 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34593 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751254AbeAYPur (ORCPT ); Thu, 25 Jan 2018 10:50:47 -0500 Received: by mail-wm0-f67.google.com with SMTP id j21so23164576wmh.1 for ; Thu, 25 Jan 2018 07:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WiK6cuW+HsqjxbbtDfYG6s4j5P4b9WDfsVREepoXjqo=; b=ny5kVzBzsgHCmOgULcZD8y7ZRj7qbiDUtoQFPu7zpt3ajwaEN8gJclrwkgGL036hus m1AhGLe5Agp86xw2gryz603DQlQsBaCMKMCftonovIjgGcg/XOWojkot4rLDlOZAFYZG i+oDR4cNbQ/wu7wpIT9X7SHe9R3BUieRZE+YJv2kgQmnzA3bs5B5CGQkTHjnJ2dOEeC4 dsnu1oWKN2oOcPzdRJKNfn8c6UUWqXc3qfr2e0uCbR1gunToNtzp11VJxSUfkpmVIYjX lnjIGJXv9gU8O0bdO8VP7KUwCsggH+P8mDK+9kmdv6ervGEFicAMOw351YhxQ9ENU2tl xueQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WiK6cuW+HsqjxbbtDfYG6s4j5P4b9WDfsVREepoXjqo=; b=YjAu8G8M9gkt/9vmUigwlSXFrolufidwFI1OVWxliDOvU3o0Z7CtU3W3niUP5jJmxu DymayxIsWVOEaEmj31jqdT3LQyAorzkcNaZlxQEd7RZs/QO5XMigK4MNbjVg8nVrPkIi oWHj1FB0nw0yf4ZgMWdPoGQymAGXppU0DGNBSa9dkU+jgUCpjvSdFHDSryuwSTYGt593 5O99YEaurG/69ryLk17teB9s/QY7VwWWqWY6GjhtDQknCRkD9HAnlG5Bp1wyb1iq884R krCPfU6p4NHwQK76NNGlGXExL4VKARnkiR8JFxh22jPGnHbavUUJsuneztvHcP9v4Mih TRJQ== X-Gm-Message-State: AKwxyte7gGEKuSMscRA5Cz6HNfVjWxC3LsMIJxduhyQGKjq/ZHSTOC17 nE5qq45rv5olD4PWTs/M4cU1Bw== X-Received: by 10.80.200.139 with SMTP id d11mr29962966edh.199.1516895446520; Thu, 25 Jan 2018 07:50:46 -0800 (PST) Received: from node.shutemov.name ([178.121.236.183]) by smtp.gmail.com with ESMTPSA id f5sm1476228edb.65.2018.01.25.07.50.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 07:50:45 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id 293AA648D520; Thu, 25 Jan 2018 18:50:44 +0300 (+03) Date: Thu, 25 Jan 2018 18:50:44 +0300 From: "Kirill A. Shutemov" To: Baoquan He 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: <20180125155043.nj5b26yxutds7f37@node.shutemov.name> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117052454.GA2321@localhost.localdomain> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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