Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp585418imm; Wed, 29 Aug 2018 07:18:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZGbRZfwSC7+4sgUMhUH7/7xdJgUg70/Oh8nUu9kgZ0deCVpJ7iz9FrQ2yl/aW+GM9oe/PH X-Received: by 2002:a62:1605:: with SMTP id 5-v6mr6210048pfw.11.1535552292433; Wed, 29 Aug 2018 07:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535552292; cv=none; d=google.com; s=arc-20160816; b=DhAcUuGxmx9i4gn7JdUqmA6HIZqgKTxt85PqV5l9kSx+TDmdicblJm/zrwU0fD0WoW J7qFONphfMH5A76YM7TRdhqx+KY+knfBpLUSuLojvGgSlI2dLAQzBjpjFouN2GneexEt NwH4WzOrGm489hKv8zv/trAlnPdv1T9/y8kZTxHOpFlP48sTL1W6it/ReM5IcvxXXtId YUGRGgVu3reD873s9LJ/Ew3Qf7jKyuCHy3ock8uXIb6kdSrs1UFpWNr8zWnqSqZRp84J pRzE2duNFYHKDLAkogoEk4EkOZvS0PTMUC5MpyxVKiQrA/bbIPG5B/n0e5k4C94Ortbr IIsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=FgLDLJPe/S0Ohtys+l69NXYLHLCKBr8oiXEn861pJv0=; b=fxYGCrwTjo1fRAkIJ59gCgyTsP2nlBZye4HKa6YcWHhODVPgMwPdzQGBXz6KokzBPz eVrJef4HCMks46LSAuJCMYpKOhKkJClmMEMMnl2L+PlgaZJKRBRgCtofymesykL9EtGm H6kbEeMbnU+MY7revTyrT5OW4DchBHmTYPrZfJjNUWokpA82eQmWzOt3H+vRUVoTYLT6 rJX+tYTjY4P+X7n8VpKSgSnFA0ZyGX8ZXeomIEpolvf9QuGRhzzkdGe33Qlv5vZp/cAA 4P50Q5fUWzoQMiHRGRPBTEVYcq14SaSSp+p3ilzswVKpBV2pLT57NFoVdl+UVhf96tov BCag== 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 n1-v6si3874601pfe.66.2018.08.29.07.17.57; Wed, 29 Aug 2018 07:18:12 -0700 (PDT) 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 S1728799AbeH2SNp (ORCPT + 99 others); Wed, 29 Aug 2018 14:13:45 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59086 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727444AbeH2SNp (ORCPT ); Wed, 29 Aug 2018 14:13:45 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18C0A40241C0; Wed, 29 Aug 2018 14:16:35 +0000 (UTC) Received: from 192.168.1.2 (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2238710EE838; Wed, 29 Aug 2018 14:16:30 +0000 (UTC) From: Baoquan He To: tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, kirill.shutemov@linux.intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, Baoquan He Subject: [PATCH 1/3] x86/boot: Add bit fields into xloadflags for 5-level kernel checking Date: Wed, 29 Aug 2018 22:16:22 +0800 Message-Id: <20180829141624.13985-2-bhe@redhat.com> In-Reply-To: <20180829141624.13985-1-bhe@redhat.com> References: <20180829141624.13985-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 29 Aug 2018 14:16:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 29 Aug 2018 14:16:35 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'bhe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add two bit fields XLF_5LEVEL and XLF_5LEVEL_ENABLED for 5-level kernel. Bit XLF_5LEVEL indicates if 5-level related code is contained in this kernel. Bit XLF_5LEVEL_ENABLED indicates if CONFIG_X86_5LEVEL=y is set. They are being used in later patch to check if kexec/kdump kernel is loaded in right place. Signed-off-by: Baoquan He --- arch/x86/boot/header.S | 12 +++++++++++- arch/x86/include/uapi/asm/bootparam.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index 850b8762e889..be19f4199727 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S @@ -419,7 +419,17 @@ xloadflags: # define XLF4 0 #endif - .word XLF0 | XLF1 | XLF23 | XLF4 +#ifdef CONFIG_X86_64 +#ifdef CONFIG_X86_5LEVEL +#define XLF56 (XLF_5LEVEL|XLF_5LEVEL_ENABLED) +#else +#define XLF56 XLF_5LEVEL +#endif +#else +#define XLF56 0 +#endif + + .word XLF0 | XLF1 | XLF23 | XLF4 | XLF56 cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command line, #added with boot protocol diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index a06cbf019744..d76b2773d0c4 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -29,6 +29,8 @@ #define XLF_EFI_HANDOVER_32 (1<<2) #define XLF_EFI_HANDOVER_64 (1<<3) #define XLF_EFI_KEXEC (1<<4) +#define XLF_5LEVEL (1<<5) +#define XLF_5LEVEL_ENABLED (1<<6) #ifndef __ASSEMBLY__ -- 2.13.6