From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2662EC433E6 for ; Fri, 22 Jan 2021 11:59:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1E4D2376F for ; Fri, 22 Jan 2021 11:59:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727748AbhAVL6y (ORCPT ); Fri, 22 Jan 2021 06:58:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:50684 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbhAVK5S (ORCPT ); Fri, 22 Jan 2021 05:57:18 -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 52E83AF5B; Fri, 22 Jan 2021 10:56:32 +0000 (UTC) Date: Fri, 22 Jan 2021 11:56:32 +0100 From: Borislav Petkov To: "Bae, Chang Seok" Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , x86-ml , "Brown, Len" , "Hansen, Dave" , "Liu, Jing2" , "Shankar, Ravi V" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 05/21] x86/fpu/xstate: Add a new variable to indicate dynamic user states Message-ID: <20210122105632.GA5123@zn.tnic> References: <20201223155717.19556-1-chang.seok.bae@intel.com> <20201223155717.19556-6-chang.seok.bae@intel.com> <20210115133924.GE11337@zn.tnic> <20210119155758.GF27634@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2021 at 06:57:26PM +0000, Bae, Chang Seok wrote: > This series attempts to save the AMX state in the context switch buffer only What is the context switch buffer? I think you mean simply the xstate per-task buffer which is switched on context switches... > when needed -- so it is called out ‘dynamic’ user states. > > The LBR state is saved in the perf buffer [1], and this state is named > 'dynamic' supervisor states [2]. But some naming in the change has ‘dynamic’ > state only. > > So, these two kinds of dynamic states are different and need to be named > clearly. Oh well, this is going to be a mess, there's also CET coming but at least stuff is properly documented with comments - I guess thanks dhansen :) - so we can fix it up later if something's still amiss. > How about the changelog message like this: > > " > The context switch buffer is in preparation to be dynamic for user states. > Introduce a new mask variable to indicate the 'dynamic' user states. The value > is determined at boot time. > > The perf subsystem has a separate buffer to save some states only when needed, > not in every context switch. The states are named as 'dynamic' supervisor > states. Some define and helper are not named with dynamic supervisor states, > so rename them. > > No functional change. > “ Yah, better. Thx. -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg