From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbdJMRsw (ORCPT ); Fri, 13 Oct 2017 13:48:52 -0400 Received: from mga11.intel.com ([192.55.52.93]:44380 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbdJMRsv (ORCPT ); Fri, 13 Oct 2017 13:48:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,371,1503385200"; d="scan'208";a="146204294" Date: Fri, 13 Oct 2017 10:48:50 -0700 From: Andi Kleen To: Ingo Molnar Cc: Andi Kleen , x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH v9 4/5] x86/xsave: Make XSAVE check the base CPUID features before enabling Message-ID: <20171013174850.GR5109@tassilo.jf.intel.com> References: <20171007000328.12843-1-andi@firstfloor.org> <20171007000328.12843-5-andi@firstfloor.org> <20171012081126.g4shmny3qumwzf4m@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171012081126.g4shmny3qumwzf4m@gmail.com> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > + /* > > + * Clear XSAVE features that are disabled in the normal CPUID. > > + */ > > + for (i = 0; i < ARRAY_SIZE(xsave_cpuid_features); i++) { > > + if (!boot_cpu_has(xsave_cpuid_features[i])) > > + xfeatures_mask &= ~BIT(i); > > + } > > + > > xfeatures_mask &= fpu__get_supported_xfeatures_mask(); > > > > /* Enable xstate instructions to be able to continue with initialization: */ > > This patch has similar problems to the ones I reported against 2/5. I'm not clear what I'm supposed to change here. The array cannot be __initdata because it is used at cpu hotplug. Nothing else seems to apply. -Andi