lkml.org 
[lkml]   [2015]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 0/2] x86/fpu: avoid "xstate_fault" in xsave_user/xrestore_user
On Tue, Mar 17, 2015 at 10:47:50AM +0100, Borislav Petkov wrote:
>
> We can even go a step further and add a static_cpu_has_safe thing which
> checks two features instead of one. The penalty we'd get is a single
> inconditional JMP which in the face of XSAVE* is nothing.
>

What was the argument against adding a check_alternative_input(...) so the
ex_table entry are managed inside the macro directly? It leaves less room
for errors and would still be reable IMO:

err = check_alternative_input_2(XSAVE,
XSAVESOPT, X86_FEATURE_XSAVEOPT
XSAVES, X86_FEATURE_XSAVES,
<inputs>, <outputs>, <clobbers>);
if (err)
do_something();

That hypothetical check_alternative_input_2() would call a rework of
check_insn() supporting an arbitrary numbers of inputs, outputs and
clobbers as drafted in my previous e-mail.

Quentin


\
 
 \ /
  Last update: 2015-03-17 11:21    [W:0.089 / U:3.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site