automatic dump when guest linux on HVM domain panics
PATCH 1/1 automatic dump when guest linux on HVM domain panics
Hi,
Attached patch adds a function to automatically dump core file when guest linux on HVM domain panics, in the same way as PV domain.
I tested this patch with kernel 2.6.9 and 2.6.18 on both of x86 and ia64 (to buid for ia64, some patches in the ia64 tree are needed) by the following steps, and confirmed it works well:
1. Build xen-platform-pci.ko.
2. In /etc/xen/xend-config.sxp, set (enable-dump yes).
3. On guest linux, execute insmod:
# insmod xen-platform-pci.ko 4. When guest linux panics, a core file is dumped.
Regards,
Tetsu Yamamoto
Signed-off-by Tetsu Yamamoto <[email protected]>
unmodified_drivers/linux-2.6/platform-pci/Kbuild +1 -0
@@ -7,6 +7,7 @@ xen-platform-pci-objs := evtchn.o platfo xen-platform-pci-objs := evtchn.o platform-pci.o gnttab.o xen_support.o xen-platform-pci-objs += features.o platform-compat.o xen-platform-pci-objs += reboot.o machine_reboot.o +xen-platform-pci-objs += panic-handler.o xen-platform-pci-objs += ../xenbus/xenbus_comms.o xen-platform-pci-objs += ../xenbus/xenbus_xs.o
unmodified_drivers/linux-2.6/platform-pci/panic-handler.c new file +54 -0
54 lines not on this page · raw message
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +4 -0
@@ -249,6 +249,7 @@ int xen_irq_init(struct pci_dev *pdev);int xen_irq_init (struct pci_dev *pdev);int xenbus_init (void );int xen_reboot_init (void ); +int xen_panic_handler_init (void );int gnttab_init (void ); static int __devinit platform_pci_init(struct pci_dev *pdev,
@@ -317,6 +318,9 @@ static int __devinit platform_pci_init(sif ((ret =xen_reboot_init ())) goto out; +if ((ret =xen_panic_handler_init ())) + goto out; + out:if (ret) {release_mem_region (mmio_addr, mmio_len);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel