[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7c7295a-ae5e-420a-837e-5bc6e18ee90c@intel.com>
Date: Thu, 30 Nov 2023 21:28:02 +0800
From: "Yang, Weijiang" <weijiang.yang@...el.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
CC: "Gao, Chao" <chao.gao@...el.com>,
"Hansen, Dave" <dave.hansen@...el.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"john.allen@....com" <john.allen@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mlevitsk@...hat.com" <mlevitsk@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>
Subject: Re: [PATCH v7 05/26] x86/fpu/xstate: Introduce fpu_guest_cfg for
guest FPU configuration
On 11/30/2023 1:08 AM, Edgecombe, Rick P wrote:
> On Wed, 2023-11-29 at 22:12 +0800, Yang, Weijiang wrote:
>> On 11/28/2023 10:58 PM, Edgecombe, Rick P wrote:
>>> On Fri, 2023-11-24 at 00:53 -0500, Yang Weijiang wrote:
>>>> + /*
>>>> + * Set guest's __user_state_size to
>>>> fpu_user_cfg.default_size
>>>> so that
>>>> + * existing uAPIs can still work.
>>>> + */
>>>> + fpu->guest_perm.__user_state_size =
>>>> fpu_user_cfg.default_size;
>>> It seems like an appropriate value, but where does this come into
>>> play
>>> exactly for guest FPUs?
>> I don't see there's special usage of this field for vCPU in VMM
>> userspace(QEMU).
>> Maybe it's mainly for AMX resulted usespace fault handling? For vCPU
>> thread,
>> it's only referenced when AMX is enabled via __xfd_enable_feature()
>> .
>>
> In that case the "so that existing uAPIs can still work" comment seems
> misleading. Maybe "this doesn't come into play for guest FPUs, but set
> it to a reasonable value"?
Ah, I mistook it for uabi_size and added comments. Will reword it properly.
Thank you for bringing it up!
Powered by blists - more mailing lists