x86/mm: Move base_disallow_mask into __ro_after_init

base_disallow_mask is calculated once in arch_init_memory() and doesn't change
thereafter.  Write-protect it at runtime.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2024-07-22 18:18:00 +01:00
1 parent d834c3d241
commit c2770e51b4
1 file changed
+2 -1
+2 -1
View File
@@ -150,7 +150,8 @@ bool __read_mostly machine_to_phys_mapping_valid;
struct rangeset *__read_mostly mmio_ro_ranges;
static uint32_t base_disallow_mask;
static uint32_t __ro_after_init base_disallow_mask;
/* Global bit is allowed to be set on L1 PTEs. Intended for user mappings. */
#define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLOBAL)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.