From: Itsuro ODA Subject: [PATCH] fix missing Crash note in /proc/iomem Date: Mon, 13 Jul 2009 13:01:41 +0900 Message-ID: <20090713112628.9F01.277DD91C@valinux.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: kexec@lists.infradead.org List-Id: xen-devel@lists.xenproject.org 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"=20 on the Xen 3.3.* and before. The code assumed this. It is not true for the Xen 3.4. =3D=3D example: before patch: one of two "Crash note" is missing # cat /proc/iomem=20 =2E.. 00100000-c779ffff : System RAM 02000000-09ffffff : Crash kernel c7300000-c74aa35f : Hypervisor code and data c7456080-c7456213 : Crash note c77a0000-c77adfff : ACPI Tables =2E.. =3D=3D example: after patch: two "Crash note" are showed normally # cat /proc/iomem=20 =2E.. 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 =2E.. This problem is occured on the x86_64 only. This patch has no bad effect fo= r other architectures and is backword compatible. Please apply this patch to the newer dom-0 kernel too. Thanks. Itsuro Oda --- Signed-off-by: Itsuro Oda diff -r b086278a4406 drivers/xen/core/machine_kexec.c --- a/drivers/xen/core/machine_kexec.c Mon Jun 29 10:57:46 2009 +0100 +++ b/drivers/xen/core/machine_kexec.c Fri Jul 10 16:57:34 2009 +0900 @@ -144,7 +144,15 @@ void __init xen_machine_kexec_setup_reso =20 void __init xen_machine_kexec_register_resources(struct resource *res) { + int k; + struct resource *r; + request_resource(res, &xen_hypervisor_res); + for (k =3D 0; k < xen_max_nr_phys_cpus; k++) { + r =3D xen_phys_cpus + k; + if (r->parent =3D=3D NULL) /* out of xen_hypervisor_res range */ + request_resource(res, r); + }=20 machine_kexec_register_resources(res); } --=20 Itsuro ODA