lkml.org 
[lkml]   [2013]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] x86-64: properly handle FPU code/data selectors
On 10/16/2013 09:07 AM, Jan Beulich wrote:
>
>> Furthermore, you define X86_FEATURE_NO_FPU_SEL, but you don't set it
>> anywhere. At least that bit needs to be factored out into a separate patch.
>
> That's already being done in get_cpu_cap(), as it's part of
> x86_capability[9].
>

Ah, sorry, my bad. For some reason I thought you added it to word 3,
but this is a hardware-provided CPUID bit. I, if anyone, should have
known :)

>> + if (config_enabled(CONFIG_IA32_EMULATION) &&
>> + test_tsk_thread_flag(tsk, TIF_IA32))
>>
>> is_ia32_task()?
>
> That'd imply that "tsk == current" in all cases, which I don't
> think is right here.

True. It wold be good to have an equivalent predicate function for
another task, though.

This assumes the process doesn't switch modes on us, which it is allowed
to do. For that it really would be better to look at the CS.L bit,
which can be done with the LAR instruction for the current task;
otherwise we'd have to walk the descriptor tables.

-hpa



\
 
 \ /
  Last update: 2013-10-16 19:41    [W:0.098 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site