[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2551d35b-e5cf-4a8d-8667-b0f6720408aa@intel.com>
Date: Tue, 28 Nov 2023 16:00:04 +0800
From: "Yang, Weijiang" <weijiang.yang@...el.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
CC: "Hansen, Dave" <dave.hansen@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"john.allen@....com" <john.allen@....com>,
"peterz@...radead.org" <peterz@...radead.org>,
"Gao, Chao" <chao.gao@...el.com>,
"mlevitsk@...hat.com" <mlevitsk@...hat.com>
Subject: Re: [PATCH v7 04/26] x86/fpu/xstate: Introduce
XFEATURE_MASK_KERNEL_DYNAMIC xfeature set
On 11/28/2023 9:46 AM, Edgecombe, Rick P wrote:
> On Fri, 2023-11-24 at 00:53 -0500, Yang Weijiang wrote:
>> Define new XFEATURE_MASK_KERNEL_DYNAMIC set including the features
>> can be
>> optionally enabled by kernel components, i.e., the features are
>> required by
>> specific kernel components.
> The above is a bit tough to parse. Does any of this seem clearer?
>
> Define a new XFEATURE_MASK_KERNEL_DYNAMIC mask to specify the features
> that can be optionally enabled by kernel components. This is similar to
> XFEATURE_MASK_KERNEL_DYNAMIC in that it contains optional xfeatures
> that can allows the FPU buffer to be dynamically sized. The difference
> is that the KERNEL variant contains supervisor features and will be
> enabled by kernel components that need them, and not directly by the
> user.
Definitely the wording is much better, I'll apply it to next version, thanks a lot!
>> Currently it's used by KVM to configure guest
>> dedicated fpstate for calculating the xfeature and fpstate storage
>> size etc.
>>
>> The kernel dynamic xfeatures now only contain XFEATURE_CET_KERNEL,
>> which is
>> supported by host as they're enabled in xsaves/xrstors operating
>> xfeature set
>> (XCR0 | XSS), but the relevant CPU feature, i.e., supervisor shadow
>> stack, is
>> not enabled in host kernel so it can be omitted for normal fpstate by
>> default.
>>
>> Remove the kernel dynamic feature from
>> fpu_kernel_cfg.default_features so that
>> the bits in xstate_bv and xcomp_bv are cleared and xsaves/xrstors can
>> be
>> optimized by HW for normal fpstate.
> Thanks for breaking these into small patches.
Powered by blists - more mailing lists