From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753214AbdAZPDv (ORCPT ); Thu, 26 Jan 2017 10:03:51 -0500 Received: from mga04.intel.com ([192.55.52.120]:5434 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbdAZPDu (ORCPT ); Thu, 26 Jan 2017 10:03:50 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,289,1477983600"; d="scan'208";a="926923134" Subject: Re: [PATCH 2/2] x86/fpu: copy MXCSR & MXCSR_FLAGS with SSE/YMM state To: riel@redhat.com, linux-kernel@vger.kernel.org References: <20170126015759.25871-1-riel@redhat.com> <20170126015759.25871-3-riel@redhat.com> Cc: mingo@kernel.org, luto@kernel.org, yu-cheng.yu@intel.com, bp@suse.de From: Dave Hansen Message-ID: <21e288ef-8e89-ca61-f5e1-b546b0761538@linux.intel.com> Date: Thu, 26 Jan 2017 07:03:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170126015759.25871-3-riel@redhat.com> 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 On 01/25/2017 05:57 PM, riel@redhat.com wrote: > /* > + * Restoring SSE/YMM state requires that MXCSR & MXCSR_MASK are saved. > + * Those fields are part of the legacy FP state, and only get saved > + * above if XFEATURES_MASK_FP is set. > + * > + * Copy out those fields if we have SSE/YMM but no FP register data. > + */ Patch looks functionally good to me. One nit on the comment, though: Usually XSAVE "state" refers to the state in the CPU while the "area" refers to the buffer in memory. Probably best to talk about the "legacy FP area", not state. Maybe something like this for the first paragraph: MXCSR and MXCSR_MASK are part of the SSE and YMM states and are saved/restored along with those states. However, they are located in the legacy FP *area* of the XSAVE buffer.