From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753319AbdHQPoW (ORCPT ); Thu, 17 Aug 2017 11:44:22 -0400 Received: from mga07.intel.com ([134.134.136.100]:37795 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753303AbdHQPoU (ORCPT ); Thu, 17 Aug 2017 11:44:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,388,1498546800"; d="scan'208";a="1163669334" From: Andi Kleen To: hpa@zytor.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH v5 3/5] x86/cpuid: Make clearcpuid an early param Date: Thu, 17 Aug 2017 08:44:01 -0700 Message-Id: <20170817154403.15099-4-andi@firstfloor.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170817154403.15099-1-andi@firstfloor.org> References: <20170817154403.15099-1-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen Make clearcpuid= an early param, to make sure it is parsed before the XSAVE initialization. This allows to modify XSAVE state by clearing specific CPUID bits. Signed-off-by: Andi Kleen --- arch/x86/kernel/cpu/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 60b7aa6330ed..600e0cf714b9 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1285,7 +1285,7 @@ static __init int setup_disablecpuid(char *arg) return 1; } -__setup("clearcpuid=", setup_disablecpuid); +early_param("clearcpuid", setup_disablecpuid); #ifdef CONFIG_X86_64 struct desc_ptr idt_descr __ro_after_init = { -- 2.9.4