x86/entry: Add some paranoid entry/exit CR3 handling comments
authorDave Hansen <dave.hansen@linux.intel.com>
Fri, 12 Oct 2018 23:21:18 +0000 (16:21 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 14 Oct 2018 09:11:22 +0000 (11:11 +0200)
commit16561f27f94e6193ee8f5b9b74801e1668c86efc
tree044d2cfaa1e2fe08feb08946233af179b05b2643
parentb59167ac7bafd804c91e49ad53c6d33a7394d4c8
x86/entry: Add some paranoid entry/exit CR3 handling comments

Andi Kleen was just asking me about the NMI CR3 handling and why
we restore it unconditionally.  I was *sure* we had documented it
well.  We did not.

Add some documentation.  We have common entry code where the CR3
value is stashed, but three places in two big code paths where we
restore it.  I put bulk of the comments in this common path and
then refer to it from the other spots.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: luto@kernel.org
Cc: bp@alien8.de
Cc: "H. Peter Anvin" <hpa@zytor.come
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/20181012232118.3EAAE77B@viggo.jf.intel.com
arch/x86/entry/entry_64.S