[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <388b09ea-7eb4-2878-5292-97475fde8a5a@intel.com>
Date: Tue, 11 Apr 2023 21:38:50 -0700
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: Fenghua Yu <fenghua.yu@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>
CC: linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>,
Chintan M Patel <chintan.m.patel@...el.com>,
Thiago Macieira <thiago.macieira@...el.com>
Subject: Re: [RFC PATCH] x86/fpu/xstate: Add more diagnostic information on
inconsistent xstate sizes
On 4/11/2023 6:21 PM, Fenghua Yu wrote:
>
> First of all, max_features is shown already.
Yes.
> Kernel_size from CPUID.0xd.0x1:EBX takes XCR0 | IA32_XSS as input.
> Platform may take wrong XCR0 or IA32_XSS and get wrong kernel_size. The > purpose of this patch is to provide more debug info to help debug
> platform/kernel issue. So instead of a whole max_features, xgetbv() to
> get XCR0 and xfeatures_mask_supervisor() to get IA32_XSS provides more
> debug info in case platform may have issue in XCR0 or IA32_XSS.
>
> In other words, splitting max_features into XCR0 and IA32_XSS and
> showing them individually provide more useful debug info than one single
> max_features value. >
> Does it make sense?
Hmm, I don't get it. I don't think whether the microcode takes those
register values wrong or miscalculates the size does matter here.
print_xstate_offset_size() or something can decode the mask and readily
shows off how it was calculated here. Then, probably that's it.
>> I still expect some acknowledgment of what is coded here for the
>> kernel calculation details.
>
> The kernel calculation is shown in
> + print_xstate_offset_size();
> + pr_info("x86/fpu: total size: %u bytes\n", size);
>
> Isn't that detailed enough to show offset and size of each xstate and
> sum of sizes?
>
> After that,
> + pr_info("x86/fpu: kernel_size from CPUID.0xd.0x%x:EBX: %u bytes\n",
> + compacted ? 1 : 0, kernel_size);
> shows how kernel_size is calculated from CPUID?
>
> Using the above debug info, a real platform CPUID issue is shown clearly.
>
> What other details are needed?
I recall it was also asked to show which features are off or mismatched
as compared to the CPU calculation. I'm not so sure about it.
Thanks,
Chang
Powered by blists - more mailing lists