Re: [PATCH 01/23] x86, kaiser: prepare assembly for entry/exit CR3 switching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/01/2017 02:01 PM, Thomas Gleixner wrote:
> On Tue, 31 Oct 2017, Dave Hansen wrote:
>>  
>> +	pushq	%rdi
>> +	SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi
>> +	popq	%rdi
> 
> Can you please have a macro variant which does:
> 
>     SWITCH_TO_KERNEL_CR3_PUSH reg=%rdi
> 
> So the pushq/popq is inside the macro. This has two reasons:
> 
>    1) If KAISER=n the pointless pushq/popq go away
> 
>    2) We need a boottime switch for that stuff, so we better have all
>       related code in the various macros in order to patch it in/out.

After Boris's comments, these push/pops are totally unnecessary.  We
just delay the CR3 until after we stashed off pt_regs and are allowed to
clobber things.

> Also, please wrap these macros in #ifdef KAISER right away and provide the
> stubs as well. It does not make sense to have them in patch 7 when patch 1
> introduces them.

Will do.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux