[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 16:25:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Chen Yu <yu.c.chen@...el.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, linux-pm@...r.kernel.org,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
Borislav Petkov <bp@...e.de>,
Zhu Guihua <zhugh.fnst@...fujitsu.com>,
Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when
resuming from hibernation
On Mon, Jun 06, 2016 at 10:19:09PM +0800, Chen Yu wrote:
> @@ -1595,8 +1596,21 @@ static inline void mwait_play_dead(void)
> * This should be a memory location in a cache line which is
> * unlikely to be touched by other processors. The actual
> * content is immaterial as it is not actually modified in any way.
> + *
> + * However in hibernation resume process, this address could be
> + * touched by BSP when restoring page frames, if the page table
> + * for this address is not coherent across hibernation(due to
> + * inconsistence of e820 memory map), access from APs might
> + * cause exception. So change the mwait address to zero page,
> + * which is located in .bss, in this way we can avoid illegal
> + * access from APs because page table for kernel mapping
> + * of text/data/bss should keeps unchanged according to
> + * hibernation semantic.
> */
> - mwait_ptr = ¤t_thread_info()->flags;
> + if (hibernation_in_resume())
> + mwait_ptr = empty_zero_page;
> + else
> + mwait_ptr = ¤t_thread_info()->flags;
Why is this conditional? Is there any case in which the zero page is not
also correct?
Powered by blists - more mailing lists