From: "H. Peter Anvin" <hpa@zytor.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: mingo@elte.hu, tglx@linutronix.de,
Linus Torvalds <torvalds@linux-foundation.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RFC] x86-64: properly handle FPU code/data selectors
Date: Wed, 16 Oct 2013 10:13:13 -0700 [thread overview]
Message-ID: <525EC929.5030001@zytor.com> (raw)
In-Reply-To: <525ED5F602000078000FB948@nat28.tlf.novell.com>
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
prev parent reply other threads:[~2013-10-16 17:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 12:00 [PATCH, RFC] x86-64: properly handle FPU code/data selectors Jan Beulich
2013-10-16 15:19 ` Linus Torvalds
2013-10-16 15:36 ` Jan Beulich
2013-10-16 15:50 ` Linus Torvalds
2013-10-16 16:13 ` Jan Beulich
2013-10-16 18:43 ` Linus Torvalds
2013-10-17 7:09 ` Jan Beulich
2013-10-17 9:27 ` Gleb Natapov
2013-10-17 9:33 ` Jan Beulich
2013-10-17 9:41 ` Gleb Natapov
2013-10-17 9:51 ` Jan Beulich
2013-10-17 10:23 ` Gleb Natapov
2013-10-17 10:37 ` Jan Beulich
2013-10-17 10:39 ` Gleb Natapov
2013-10-16 15:39 ` H. Peter Anvin
2013-10-16 16:07 ` Jan Beulich
2013-10-16 17:13 ` H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525EC929.5030001@zytor.com \
--to=hpa@zytor.com \
--cc=JBeulich@suse.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox