WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [LINUX] /proc/iomem should not be initial

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] /proc/iomem should not be initialised from pseudophysical e820 map.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 03:50:11 +0000
Delivery-date: Wed, 30 Aug 2006 20:50:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 11626efd003c5c080bf9622fee0f1c3da508086a
# Parent  50aea0ec406bd03dad9da31255857e4a41f7efcc
[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@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c   |    7 +++----
 linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c  |    2 ++
 linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c |    5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff -r 50aea0ec406b -r 11626efd003c 
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Wed Aug 30 22:36:18 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Thu Aug 31 03:05:40 
2006 +0100
@@ -1380,8 +1380,10 @@ legacy_init_iomem_resources(struct e820e
                         *  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);
diff -r 50aea0ec406b -r 11626efd003c 
linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c        Wed Aug 30 
22:36:18 2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c        Thu Aug 31 
03:05:40 2006 +0100
@@ -255,8 +255,10 @@ void __init e820_reserve_resources(struc
                         *  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
diff -r 50aea0ec406b -r 11626efd003c 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Wed Aug 30 
22:36:18 2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Thu Aug 31 
03:05:40 2006 +0100
@@ -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);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LINUX] /proc/iomem should not be initialised from pseudophysical e820 map., Xen patchbot-unstable <=