[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec953e80-a39e-4d42-b75e-6f995289a669@intel.com>
Date: Tue, 1 Apr 2025 10:17:08 -0700
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: Chao Gao <chao.gao@...el.com>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>, <tglx@...utronix.de>,
<dave.hansen@...el.com>, <seanjc@...gle.com>, <pbonzini@...hat.com>
CC: <peterz@...radead.org>, <rick.p.edgecombe@...el.com>,
<weijiang.yang@...el.com>, <john.allen@....com>, <bp@...en8.de>,
<xin3.li@...el.com>, Ingo Molnar <mingo@...hat.com>, Dave Hansen
<dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>, "Aruna
Ramakrishna" <aruna.ramakrishna@...cle.com>, Mitchell Levy
<levymitchell0@...il.com>, Adamos Ttofari <attofari@...zon.de>, Uros Bizjak
<ubizjak@...il.com>
Subject: Re: [PATCH v4 8/8] x86/fpu/xstate: Warn if guest-only supervisor
states are detected in normal fpstate
On 3/18/2025 8:31 AM, Chao Gao wrote:
>
> + WARN_ON_FPU(!fpstate->is_guest && (mask & XFEATURE_MASK_SUPERVISOR_GUEST));
Did you check xfeatures_mask_supervisor()? I think you might want to
introduce a similar wrapper to reference the enabled features
(max_features) here.
Also, have you audited other code paths to ensure that no additional
guard like this is needed? Can you summarize your audit process?
Thanks,
Chang
Powered by blists - more mailing lists