From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754839AbbHFQD1 (ORCPT ); Thu, 6 Aug 2015 12:03:27 -0400 Received: from mga11.intel.com ([192.55.52.93]:10994 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbbHFQD0 (ORCPT ); Thu, 6 Aug 2015 12:03:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,623,1432623600"; d="scan'208";a="537198866" Message-ID: <55C3854A.3000401@linux.intel.com> Date: Thu, 06 Aug 2015 09:03:22 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Dave Hansen , Ingo Molnar , Linus Torvalds CC: Peter Anvin , Denys Vlasenko , Thomas Gleixner , linux-kernel@vger.kernel.org, Andy Lutomirski , bp@alien8.de, Peter Zijlstra , fenghua.yu@intel.com, x86@kernel.org Subject: Re: [PATCH] x86, fpu: correct XSAVE xstate size calculation References: <20150728172143.6DDFECA7@viggo.jf.intel.com> <20150805103227.GA3233@gmail.com> <55C21EFC.3060802@sr71.net> <20150806071545.GB2194@gmail.com> <20150806082746.GA10974@gmail.com> <55C3758A.50005@sr71.net> In-Reply-To: <55C3758A.50005@sr71.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here's a correction about what we do today, and it's an important point. The code I was ripping out in the patch was *really* just for the XSAVES/compacted case, does *NOT* do anything today since we've disabled XSAVES. So perhaps the title here should be: [PATCH] x86, fpu: correct XSAVES xstate size calculation /* Option 1, what we have today */ if (!cpu_has_xsaves) { cpuid(0xD0, 0, &total_blob_size, ...); return; } /* * This breaks if offset[i]+size[i] != offset[i+1] * or if alignment is in play. Silly hardware breaks * this today. */ for (i = 0; i < nr_xstates; i++) { if (!enabled_xstate(i)) continue; total_blob_size += xstate_sizes[i]; }