Skip to contentSkip to conversation

fix missing Crash note in /proc/iomem

PATCH New Itsuro ODA 1 participant 1 message Jul 13, 2009

Subsystems (3)
lore
Share & tools
lore

Itsuro ODA

author
#0 lore raw

PATCH 1/1 fix missing Crash note in /proc/iomem

Hi,

Missing "Crash note" in /proc/iomem (dom 0) happens on the Xen 3.4.*. This causes a crash dump cannot be analyzed normally.

This patch fixes this problem.
This patch is for linux-2.6.18-xen.hg.

The range of "Crash note" is within the "Hypervisor code and data" on the Xen 3.3.* and before. The code assumed this.
It is not true for the Xen 3.4.

== example: before patch: one of two "Crash note" is missing

# cat /proc/iomem 
...
00100000-c779ffff : System RAM
  02000000-09ffffff : Crash kernel
  c7300000-c74aa35f : Hypervisor code and data
    c7456080-c7456213 : Crash note
c77a0000-c77adfff : ACPI Tables
...

== example: after patch: two "Crash note" are showed normally

# cat /proc/iomem 
...
00100000-c779ffff : System RAM
  02000000-09ffffff : Crash kernel
  c7300000-c74aa35f : Hypervisor code and data
    c7456080-c7456213 : Crash note
  c7791c00-c7791df3 : Crash note
c77a0000-c77adfff : ACPI Tables
...

This problem is occured on the x86_64 only. This patch has no bad effect for other architectures and is backword compatible.

Please apply this patch to the newer dom-0 kernel too.

Thanks.
Itsuro Oda

---

drivers/xen/core/machine_kexec.c +8 -0
diff -r b086278a4406 drivers/xen/core/machine_kexec.c
@@ -144,7 +144,15 @@ void __init xen_machine_kexec_setup_reso
 
 void __init xen_machine_kexec_register_resources(struct resource *res)
 {
+	int k;
+	struct resource *r;
+
 	request_resource(res, &xen_hypervisor_res);
+	for (k = 0; k < xen_max_nr_phys_cpus; k++) {
+		r = xen_phys_cpus + k;
+		if (r->parent == NULL) /* out of xen_hypervisor_res range */
+			request_resource(res, r);
+	} 
 	machine_kexec_register_resources(res);
 }
 
Signature · 1 line
Itsuro ODA <[email protected]>