[PATCH 4.17 49/67] xen: remove global bit from __default_kernel_pte_mask for pv guests
From: Greg Kroah-Hartman
Date: Mon Jul 16 2018 - 03:39:15 EST
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Juergen Gross <jgross@xxxxxxxx>
commit e69b5d308da72cbf4e7911c3979f9a46d28532af upstream.
When removing the global bit from __supported_pte_mask do the same for
__default_kernel_pte_mask in order to avoid the WARN_ONCE() in
check_pgprot() when setting a kernel pte before having called
init_mem_mapping().
Cc: <stable@xxxxxxxxxxxxxxx> # 4.17
Reported-by: Michael Young <m.a.young@xxxxxxxxxxxx>
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
arch/x86/xen/enlighten_pv.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -1228,6 +1228,7 @@ asmlinkage __visible void __init xen_sta
/* Prevent unwanted bits from being set in PTEs. */
__supported_pte_mask &= ~_PAGE_GLOBAL;
+ __default_kernel_pte_mask &= ~_PAGE_GLOBAL;
/*
* Prevent page tables from being allocated in highmem, even