mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
[LINUX] /proc/iomem should not be initialised from pseudophysical e820 map.
This is because it should only contain real I/O memory address ranges, otherwise we can get false conflicts between a real I/O range and a 'pseudophysical' RAM range, causing drivers to fail to work in a domU. Also prevent kernel code/data being requested as iomem resources -- they are not contiguous in 'io memory' space so this would not make sense. Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
8a1ca3b97e
commit
1a1adcfe49
3 files changed
+8
-6
No files matched your search
@@ -1380,8 +1380,10 @@ legacy_init_iomem_resources(struct e820entry *e820, int nr_map,
|
||||
* so we try it repeatedly and let the resource manager
|
||||
* test it.
|
||||
*/
|
||||
#ifndef CONFIG_XEN
|
||||
request_resource(res, code_resource);
|
||||
request_resource(res, data_resource);
|
||||
#endif
|
||||
#ifdef CONFIG_KEXEC
|
||||
request_resource(res, &crashk_res);
|
||||
#endif
|
||||
@@ -1454,11 +1456,8 @@ static void __init register_memory(void)
|
||||
int i;
|
||||
|
||||
/* Nothing to do if not running in dom0. */
|
||||
if (!is_initial_xendomain()) {
|
||||
legacy_init_iomem_resources(e820.map, e820.nr_map,
|
||||
&code_resource, &data_resource);
|
||||
if (!is_initial_xendomain())
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XEN
|
||||
machine_e820 = alloc_bootmem_low_pages(PAGE_SIZE);
|
||||
|
||||
@@ -255,8 +255,10 @@ void __init e820_reserve_resources(struct e820entry *e820, int nr_map)
|
||||
* so we try it repeatedly and let the resource manager
|
||||
* test it.
|
||||
*/
|
||||
#ifndef CONFIG_XEN
|
||||
request_resource(res, &code_resource);
|
||||
request_resource(res, &data_resource);
|
||||
#endif
|
||||
#ifdef CONFIG_KEXEC
|
||||
request_resource(res, &crashk_res);
|
||||
#endif
|
||||
|
||||
@@ -944,9 +944,10 @@ void __init setup_arch(char **cmdline_p)
|
||||
BUG_ON(HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap));
|
||||
|
||||
e820_reserve_resources(machine_e820, memmap.nr_entries);
|
||||
} else
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
e820_reserve_resources(e820.map, e820.nr_map);
|
||||
#endif
|
||||
|
||||
request_resource(&iomem_resource, &video_ram_resource);
|
||||
|
||||
|
||||