]> git.baikalelectronics.ru Git - kernel.git/commit
x86-64/Xen: eliminate W+X mappings
authorJan Beulich <JBeulich@suse.com>
Mon, 18 Dec 2017 16:37:45 +0000 (09:37 -0700)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 19 Dec 2017 16:33:25 +0000 (11:33 -0500)
commit1e14555381848e7ffdec2e6ab05a89fe0577f12e
tree032d75fffa1848d5780f9b4b47e7ae25c52c6a98
parent9146cf08d1c658f0a8f61880f0ddffb56cf9d7dc
x86-64/Xen: eliminate W+X mappings

A few thousand such pages are usually left around due to the re-use of
L1 tables having been provided by the hypervisor (Dom0) or tool stack
(DomU). Set NX in the direct map variant, which needs to be done in L2
due to the dual use of the re-used L1s.

For x86_configure_nx() to actually do what it is supposed to do, call
get_cpu_cap() first. This was broken by commit fd8a6781ad ("x86, mm:
Clean up and simplify NX enablement") when switching away from the
direct EFER read.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/xen/enlighten_pv.c
arch/x86/xen/mmu_pv.c