x86/boot: Adjust .text/.rodata/etc permissions in one place
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 20:04:11 +0000 (20:04 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 2 Dec 2021 20:02:55 +0000 (20:02 +0000)
commit8de86b5cd4353bf2cc415e4563f973f071b4e8a3
tree90d0a361afd26613aac8f17ca931a4297546585e
parentc182e89d0b341d2efc930c2e1211d3e866c0effb
x86/boot: Adjust .text/.rodata/etc permissions in one place

At the moment, we have two locations selecting restricted permissions, not
very far apart on boot, dependent on opposite answers from using_2M_mapping().
The later location however can shatter superpages if needed, while the former
cannot.

Collect together all the permission adjustments at the slightly later point in
boot, as we likely need to shatter a superpage to support __ro_after_init.

No functional change.

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