[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f16beeec3fba23a34c426f311239935c5be920ab.camel@intel.com>
Date: Fri, 15 Sep 2023 00:24:01 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Yang, Weijiang" <weijiang.yang@...el.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "peterz@...radead.org" <peterz@...radead.org>,
"Hansen, Dave" <dave.hansen@...el.com>,
"Gao, Chao" <chao.gao@...el.com>,
"john.allen@....com" <john.allen@....com>
Subject: Re: [PATCH v6 04/25] x86/fpu/xstate: Introduce kernel dynamic
xfeature set
On Thu, 2023-09-14 at 02:33 -0400, Yang Weijiang wrote:
> +static void __init init_kernel_dynamic_xfeatures(void)
> +{
> + unsigned short cid;
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(xsave_kernel_dynamic_xfeatures);
> i++) {
> + cid = xsave_kernel_dynamic_xfeatures[i];
> +
> + if (cid && boot_cpu_has(cid))
> + fpu_kernel_dynamic_xfeatures |= BIT_ULL(i);
> + }
> +}
> +
I think this can be part of the max_features calculation that uses
xsave_cpuid_features when you use use a fixed mask like Dave suggested
in the other patch.
Powered by blists - more mailing lists