lkml.org 
[lkml]   [2014]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/HACK] x86: Fast return to kernel
On 05/04/2014 04:46 PM, Paolo Bonzini wrote:
>
> Your suggested trick of splitting the return paths for IF=0/IF=1 can be
> also done like this:
>
> movq EFLAGS-ARGOFFSET(%rsp), %rdi
> btrq $9, %rdi # Clear IF, save old value in CF
> movq %rdi, (%rsi)
> ...
> popfq
> jnc 1f # If IF was 0, just return
> sti # Using STI gets us an interrupt shadow
> 1f:
> retq
>

That doesn't work, because CF gets restored by the popfq as well.
Unfortunately.

-hpa




\
 
 \ /
  Last update: 2014-05-05 02:01    [W:0.105 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site