CHROMIUM: kaiser: x86_cr3_pcid_noflush and x86_cr3_pcid_user

Mostly this commit is just unshouting X86_CR3_PCID_KERN_VAR and
X86_CR3_PCID_USER_VAR: we usually name variables in lower-case.

But why does x86_cr3_pcid_noflush need to be __aligned(PAGE_SIZE)?
Ah, it's a leftover from when kaiser_add_user_map() once complained
about mapping the same page twice.  Make it __read_mostly instead.
(I'm a little uneasy about all the unrelated data which shares its
page getting user-mapped too, but that was so before, and not a big
deal: though we call it user-mapped, it's not mapped with _PAGE_USER.)

And there is a little change around the two calls to do_nmi().
Previously they set the NOFLUSH bit (if PCID supported) when
forcing to kernel context before do_nmi(); now they also have the
NOFLUSH bit set (if PCID supported) when restoring context after:
nothing done in do_nmi() should require a TLB to be flushed here.

BUG=chromium:781913
TEST=Build, deploy on soraka.

Originally-from: Dave Hansen <dave.hansen@intel.com>

Change-Id: I148587672c36207d7f781fd67b74897dd783f097
Signed-off-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/755919
Reviewed-by: Guenter Roeck <groeck@chromium.org>
(cherry picked from commit 9932194a686277480c94d04044c445719d14f043)
Signed-off-by: Daniel Wang <wonderfly@google.com>
Reviewed-on: https://chromium-review.googlesource.com/765042
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
3 files changed