summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-09-30 14:37:19 +0200
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2021-11-02 13:45:43 +0100
commit9a58b352e9e8a8c897acf6aae5cacd7d481965f9 (patch)
tree3dcf7374de6f84ae997c148bcc2c13c408a48057 /arch
parentxen/x86: there's no highmem anymore in PV mode (diff)
downloadlinux-9a58b352e9e8a8c897acf6aae5cacd7d481965f9.tar.xz
linux-9a58b352e9e8a8c897acf6aae5cacd7d481965f9.zip
xen/x86: restrict PV Dom0 identity mapping
When moving away RAM pages, there having been a mapping of those is not a proper indication that instead MMIO should be mapped there. At the point in time this effectively covers the low megabyte only. Mapping of that is, however, the job of init_mem_mapping(). Comparing the two one can also spot that we've been wrongly (or at least inconsistently) using PAGE_KERNEL_IO here. Simply zap any such mappings instead. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Link: https://lore.kernel.org/r/038b8c02-3621-d66a-63ae-982ccf67ae88@suse.com Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index c1eba7e1d242..b5a6c2031f6e 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -425,13 +425,13 @@ static unsigned long __init xen_set_identity_and_remap_chunk(
}
/*
- * If the PFNs are currently mapped, the VA mapping also needs
- * to be updated to be 1:1.
+ * If the PFNs are currently mapped, their VA mappings need to be
+ * zapped.
*/
for (pfn = start_pfn; pfn <= max_pfn_mapped && pfn < end_pfn; pfn++)
(void)HYPERVISOR_update_va_mapping(
(unsigned long)__va(pfn << PAGE_SHIFT),
- mfn_pte(pfn, PAGE_KERNEL_IO), 0);
+ native_make_pte(0), 0);
return remap_pfn;
}