x86/hvm: Adjust hvm_nx_enabled() to match how Xen behaves
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 5 Jul 2016 09:40:21 +0000 (10:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 2 Mar 2017 18:44:09 +0000 (18:44 +0000)
commit7bdb974a82c1631bfc7451b9dd9756858617aef4
tree360c60ddc29cff05972299570f35befe0059a56a
parentb95028e468f73528146d57e68ffca71aa47b4cbe
x86/hvm: Adjust hvm_nx_enabled() to match how Xen behaves

On Intel hardware, EFER is not fully switched between host and guest contexts.
In practice, this means that Xen's EFER.NX setting leaks into guest context,
and influences the behaviour of the hardware pagewalker.

When servicing a pagefault, Xen's model of guests behaviour should match
hardware's behaviour, to allow correct interpretation of the pagefault error
code, and to avoid creating observable difference in behaviour from the guests
point of view.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/hvm/hvm.h