Messages in this thread | | | Date | Sun, 04 May 2014 16:49:12 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [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
| |