Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756830AbbEEULZ (ORCPT ); Tue, 5 May 2015 16:11:25 -0400 Received: from mga11.intel.com ([192.55.52.93]:16020 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753193AbbEEULY (ORCPT ); Tue, 5 May 2015 16:11:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,374,1427785200"; d="scan'208";a="724198269" Message-ID: <554923C6.1070308@linux.intel.com> Date: Tue, 05 May 2015 13:10:46 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ingo Molnar , linux-kernel@vger.kernel.org CC: Andy Lutomirski , Borislav Petkov , Fenghua Yu , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: Re: [PATCH 200/208] x86/fpu/xstate: Don't assume the first zero xfeatures zero bit means the end References: <1430848712-28064-1-git-send-email-mingo@kernel.org> <1430848712-28064-40-git-send-email-mingo@kernel.org> In-Reply-To: <1430848712-28064-40-git-send-email-mingo@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 843 Lines: 26 On 05/05/2015 10:58 AM, Ingo Molnar wrote: > - do { > + for (leaf = 2; leaf < xfeatures_nr; leaf++) { > cpuid_count(XSTATE_CPUID, leaf, &eax, &ebx, &ecx, &edx); > > - if (eax == 0) > - break; > - > xstate_offsets[leaf] = ebx; > xstate_sizes[leaf] = eax; > > + printk(KERN_INFO "x86/fpu: xstate_offset[%d]: %04x, xstate_sizes[%d]: %04x\n", leaf, ebx, leaf, eax); > leaf++; > - } while (1); > + } We're going to have to revisit this. There's a new SDM out that makes this incorrect. It says: "If support for state component i is limited to XSAVES and XRSTORS, EBX returns 0." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/