Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jan Beulich and committed by
Boris Ostrovsky
9a58b352 344485a2

+3 -3
+3 -3
arch/x86/xen/setup.c
··· 425 425 } 426 426 427 427 /* 428 - * If the PFNs are currently mapped, the VA mapping also needs 429 - * to be updated to be 1:1. 428 + * If the PFNs are currently mapped, their VA mappings need to be 429 + * zapped. 430 430 */ 431 431 for (pfn = start_pfn; pfn <= max_pfn_mapped && pfn < end_pfn; pfn++) 432 432 (void)HYPERVISOR_update_va_mapping( 433 433 (unsigned long)__va(pfn << PAGE_SHIFT), 434 - mfn_pte(pfn, PAGE_KERNEL_IO), 0); 434 + native_make_pte(0), 0); 435 435 436 436 return remap_pfn; 437 437 }