kexec-tools/kexec-tools-proc-iomem-xen.diff
Petr Tesařík 62134d33a6 Accepting request 20658 from home:dl9pf:branches:openSUSE:Factory
Copy from home:dl9pf:branches:openSUSE:Factory/kexec-tools via accept of submit request 20658 revision 2.

OBS-URL: https://build.opensuse.org/request/show/20658
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=4
2009-10-09 15:36:18 +00:00

31 lines
957 B
Diff

From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Don't use /sys/firmware/memmap with Xen
On Xen (Dom0) kernels, the /sys/firmware/memmap is wrong. Just use the old
/proc/iomem there.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
kexec/arch/i386/kexec-x86-common.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -147,7 +147,13 @@ int get_memory_ranges(struct memory_rang
{
int ret, i;
- if (have_sys_firmware_memmap())
+ /*
+ * When using Xen, /sys/firmware/memmap (i.e., the E820 map) is
+ * wrong, it just provides one large memory are and that cannot
+ * be used for Kdump. Use always the /proc/iomem interface there
+ * even if we have /sys/firmware/memmap.
+ */
+ if (!xen_present() && have_sys_firmware_memmap())
ret = get_memory_ranges_sysfs(range, ranges);
else
ret = get_memory_ranges_proc_iomem(range, ranges);