lkml.org 
[lkml]   [2018]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC v2 PATCH 6/7] x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS
On Wed, Feb 7, 2018 at 12:15 PM, Dominik Brodowski
<linux@dominikbrodowski.net> wrote:
>
> Note: The testb $3, CS(%rsp) instruction in idtentry() does not need
> modification. Previously %rsp was manually decreased by 15*8; with
> this patch, %rsp is decreased by 15 pushq instructions. Moreover,
> error_entry did and does the exact same test (with offset=8) after
> the registers have been moved/pushed and cleared.

So this has the problem that now those save/clear instructions will
all be done in that idtentry macro.

So now that code will be duplicated for all the users of that macro.

The old code did the saving in the common error_entry and
paranoid_entry routines, in order to be able to share all the code,
and making the duplicated stub functions generated by the idtentry
macro smaller.

Now, admittedly the new push sequence is much smaller than the old
movq sequence, so the duplication doesn't hurt as much, but it's still
likely quite noticeable.

So this removes lines of asm code, but it adds a lot of instructions
to the end result thanks to the macro, I think.

Linus

\
 
 \ /
  Last update: 2018-02-07 21:45    [W:1.609 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site