Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp201637pxb; Wed, 3 Feb 2021 03:29:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9TxfFwPXsvDsdrsYA5bEO6M7EO1DNWGf5R1pwpfjrcFGLBvl2ttp+QrnVdPUBJ9H1k0dX X-Received: by 2002:a17:906:e48:: with SMTP id q8mr2675660eji.478.1612351748075; Wed, 03 Feb 2021 03:29:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612351748; cv=none; d=google.com; s=arc-20160816; b=X0xGde6MJEJ73Pa/ZgaKkUBNBuiVi5AqlecfcXuuBSSBQZlGyO4/vm+jl/dikxVhUl 93JnLmd7jkmiw/eqXmEeiybrc8AWWfQUWYDYM6CPsbj+kTzqKnxfasZe4uHPn5w++o6E e+XJIaAtDJd3OqFToqBJRtRbu7/y2Y2Dm4xfp1HN/Uw8ZaCaPx5GkPVWhv/3wOT00JIF vZaNf4GyckEvbmLlBJVmAFr8rohJv5qgqdMVNVTQbYTjZQq0hNBvE6t2lDs5bujGy4nz xNhLKezk/obJxhjKx5C9OsfS7RuqTnCHCoBwXFa8GY4FzJdF6o5wIZdKWyB4HZ1TJVvT eQPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9T8QyHxmabdENtPedvLiszTpvShyT7eMlRKjaIgL/Z4=; b=nc92RbLzkKfRmYKM0G6sgbQo4/dy+OYA3P+BgEKVhVRU6v+9VLRYXendFY+rKs6omu iTWptKmImaVs4SJAVCE2x6tzpt5e7csuThQGU93MqEEwlCC9vaRkFhR4BLi2ixaVY9zU 4CUNiB7dIgsm1E6/2jS4L6c4Zjvc1TMkDwSwpoKPm5ZhAeSy9LjZHE2aQbj84DSE87gT O6sMwVBKOvsU1MdDFAenfItXkhjvgy0qkvOn+bk3OrTWmPn11D55++tNkBC1YpRp8xlv 9jtG6u6jM6ifvCvCkTiSOFHNOl/almnyX6Ea2j596wlf/3x+9V1S5Rt9WvoDqXPCRnPD 5nSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa7si1145472ejb.28.2021.02.03.03.28.32; Wed, 03 Feb 2021 03:29:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234092AbhBCL1V (ORCPT + 99 others); Wed, 3 Feb 2021 06:27:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:36868 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234200AbhBCLYn (ORCPT ); Wed, 3 Feb 2021 06:24:43 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 11D50AD26; Wed, 3 Feb 2021 11:24:01 +0000 (UTC) Date: Wed, 3 Feb 2021 12:23:40 +0100 From: Borislav Petkov To: "Chang S. Bae" , Dave Hansen Cc: x86@kernel.org, luto@kernel.org, mingo@kernel.org, tglx@linutronix.de, len.brown@intel.com, dave.hansen@intel.com, ravi.v.shankar@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/fpu: Use consistent test for X86_FEATURE_XSAVES Message-ID: <20210203112340.GA11823@zn.tnic> References: <20210203024052.15789-1-chang.seok.bae@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210203024052.15789-1-chang.seok.bae@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2021 at 06:40:52PM -0800, Chang S. Bae wrote: > When XSAVES is present, the kernel always takes advantage of it, and XSAVES > always uses compacted format. > > The macro using_compacted_format() implies that using compacted format may Not a macro. > be possible without XSAVES (say by using XSAVEC), but that is not possible > here, so delete that confusing macro and simply test for what we want to > know in the first place -- if we have XSAVES or not. Who's "we"? > @@ -500,20 +500,6 @@ int xfeature_size(int xfeature_nr) > return eax; > } > > -/* > - * 'XSAVES' implies two different things: > - * 1. saving of supervisor/system state > - * 2. using the compacted format > - * > - * Use this function when dealing with the compacted format so > - * that it is obvious which aspect of 'XSAVES' is being handled > - * by the calling code. @dhansen, are you still hung up on that "obvious aspect" or can we kill this? -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg