x86/boot: Map the trampoline as read-only
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Jan 2020 13:36:30 +0000 (13:36 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 8 Jan 2020 18:47:54 +0000 (18:47 +0000)
commit30e6fb5b90a1bb56c7985b8d1600fb9d8da9d34d
tree825ca05fff95a1d8c1011a2722b634ef67a01f8f
parentaefb07395ff4b320ee245b5995496c8d396fce99
x86/boot: Map the trampoline as read-only

c/s ec92fcd1d08, which caused the trampoline GDT Access bits to be set,
removed the final writes which occurred between enabling paging and switching
to the high mappings.  There don't plausibly need to be any memory writes in
few instructions is takes to perform this transition.

As a consequence, we can remove the RWX mapping of the trampoline.  It is RX
via its identity mapping below 1M, and RW via the directmap.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/mm.c