Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5007188pxv; Wed, 28 Jul 2021 00:21:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6EjdcvSs/s/ZOQUBy137XkC8sgGT6/lxn+HSDEq+buibyf/7AxaS+ngG7CoTZj1/jS/1e X-Received: by 2002:a05:6402:207b:: with SMTP id bd27mr31786336edb.195.1627456868345; Wed, 28 Jul 2021 00:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627456868; cv=none; d=google.com; s=arc-20160816; b=Tv4CHgY2pT0X5nQ1TuWmzrmYNxFxMKWiokdKqElcZVfaqtGG8kYIgKYPFUaeBNp2Fe PhPL7cM/FnnTvbvJZTiLl4a+RGXn/tNE+GaAcP1a7DYXYRBNnv6SLReD6OU8hErF/k2X 9tz3oOQcHiVSCEy15Zm2AfMmF+I/RpnzaoqT6xqG7X/GB2NJ+nlz+eSQqKp6u8HSsI5/ qhEsnWrtGrObjTrbSssPrbKxhXzPYazVdtSO2QXx5FlGwHbGXkMCJPzwhsn3J5Nwf2m5 ZBL+axHPtXSk6PKrUay0m6zc6EC1XmGcE+s1HDk1qBQOQhMY8P4nSTM/48x5TVdm9vtd qkHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tOPQe310C1R6lGRaT8SEcEnOXBpBtGXJdkCLP3ks6l0=; b=GEq5z/uMSm9HKKWcpPgkMw4omw2sfMNxo6b0NEoThLlHf6ETrxci03tvube606AwxV tlua9XfNdJwfbvZ6fX3Eadi72AeKKL0Vo5lOBDfl7HCnARjDHuUlSoTU+nkrYJFoyDp2 IBH6hyHx7OnpYtJrVwh/fGU976rc72IFFNPA6U5ea+QpLpFf/+KJLC0j9Pl0R9atAOC8 PC9X5bNQRs7/WqydrS69Y+DAyEYOxjyvdoUEpaUA/5DmWnVb/dI4neQeS6H+7JoIn7rZ zefxiFBwaKVsfHZ+wFWeENLI4apUNoQHNYzdokpU7nh5ZAFDFILcXqncfBLU0jUADy4j Uubw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si5009219ejv.514.2021.07.28.00.20.45; Wed, 28 Jul 2021 00:21:08 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233523AbhG1HTY (ORCPT + 99 others); Wed, 28 Jul 2021 03:19:24 -0400 Received: from mga07.intel.com ([134.134.136.100]:59815 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233209AbhG1HTX (ORCPT ); Wed, 28 Jul 2021 03:19:23 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10058"; a="276384402" X-IronPort-AV: E=Sophos;i="5.84,275,1620716400"; d="scan'208";a="276384402" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 00:19:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,275,1620716400"; d="scan'208";a="663199615" Received: from fedora29.sh.intel.com ([10.239.182.87]) by fmsmga006.fm.intel.com with ESMTP; 28 Jul 2021 00:19:13 -0700 Date: Wed, 28 Jul 2021 15:18:35 +0800 From: Pengfei Xu To: Dave Hansen Cc: Shuah Khan , linux-kselftest , linux-kernel , Heng Su , Yu Yu-cheng , Yu Fenghua , Luck Tony , Mehta Sohil , Chen Yu C Subject: Re: [RFC PATCH v1 0/2] Introduce XSAVE/XRSTOR self-test Message-ID: <20210728071835.GA12735@fedora29.sh.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, Thanks for comments! On 2021-07-27 at 10:46:45 -0700, Dave Hansen wrote: > On 7/26/21 8:34 PM, Pengfei Xu wrote: > > The XSAVE feature set supports the saving and restoring of state components > > such as FPU, which is used for process context switching. > > This sentence is really awkward. It reads at first as saying that the > FPU is used for context switching. Can you rephrase. > Thanks for advice, I will update it as below if it's appropriate: " The XSAVE feature set supports the saving and restoring of state components, which is used for process context switching. The state components include x87 state for FPU execution environment, SSE state, AVX state and so on. " > > In order to ensure that XSAVE works correctly, add XSAVE basic test for > > XSAVE architecture functionality. > > This sentence needs to be start on the same line as the previous one, > *or* be in a new paragraph. Please rewrap it. > Will rewrap it. > > This patch set tests XSAVE/XRSTOR instructions on x86 platforms and verify if > > the XSAVE/XRSTOR works correctly during signal handling. > > This reads to me like you are going to test the XSAVE/XRSTOR > instructions *in* a signal handler, instead of testing the XSAVE/XRSTOR > instructions that the kernel uses at signal entry/exit. > > Also, the kernel does *NOT* *USE* XSAVE/XRSTOR in many cases to > save/restore signal state. The changelog could be read as implying that > it does. > Yes, how about updating it as below: " This patch set tests and verifies the basic functions of XSAVE/XRSTOR in user space; during and after signal processing on the x86 platform, the XSAVE contents of the process should not be changed. " > > Cases such as signal handling, process creation, other xstate(except FPU) > > tests for XSAVE check, etc. will be added to the Linux kernel self-test. > > If appropriate, it is even planned to add the [1] mentioned XSAVE issues > > reproduce and some XSAVE anomaly tests to the kernel self-test. > > This is not clear whether it is talking about *this* series int he > future tense (will be added) or whether it is talking about future *work*. > > Maybe something like this: > > This series introduces only the most basic XSAVE tests. In the > future, the intention is to continue expanding the scope of > these selftests to include more kernel XSAVE-related > functionality and XSAVE-managed features like AMX and shadow > stacks. Thanks for advice, will update it. -Pengfei BR.