* kexec and kdump on Xen? @ 2014-04-14 3:38 Zhang, Yang Z 2014-04-14 8:11 ` kexec and kdump on Xen?? Daniel Kiper 2014-04-14 9:51 ` kexec and kdump on Xen? David Vrabel 0 siblings, 2 replies; 15+ messages in thread From: Zhang, Yang Z @ 2014-04-14 3:38 UTC (permalink / raw) To: Daniel Kiper; +Cc: xen-devel Hi Daniel Are kexec/kdump supported by latest Xen + upstream Linux? I remember it only works with xen+2.6.18 linux. I know you are working on enable it. So I wonder to know what the current status is. Thanks. best regards yang ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-14 3:38 kexec and kdump on Xen? Zhang, Yang Z @ 2014-04-14 8:11 ` Daniel Kiper 2014-04-14 8:15 ` Zhang, Yang Z 2014-04-14 9:51 ` kexec and kdump on Xen? David Vrabel 1 sibling, 1 reply; 15+ messages in thread From: Daniel Kiper @ 2014-04-14 8:11 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: xen-devel, Daniel Kiper Hi, On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: > Hi Daniel > > Are kexec/kdump supported by latest Xen + upstream Linux? > I remember it only works with xen+2.6.18 linux. I know you > are working on enable it. So I wonder to know what the > current status is. Thanks. Xen 4.4 has new kexec implementation written by David Vrabel. It does not require any specific Linux Kernel version because this implementation is self contained. However, please do not forget to use latest stable version of kexec-tools too. Daniel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-14 8:11 ` kexec and kdump on Xen?? Daniel Kiper @ 2014-04-14 8:15 ` Zhang, Yang Z 2014-04-14 13:26 ` Daniel Kiper 0 siblings, 1 reply; 15+ messages in thread From: Zhang, Yang Z @ 2014-04-14 8:15 UTC (permalink / raw) To: Daniel Kiper; +Cc: xen-devel Daniel Kiper wrote on 2014-04-14: > Hi, > > On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: >> Hi Daniel >> >> Are kexec/kdump supported by latest Xen + upstream Linux? >> I remember it only works with xen+2.6.18 linux. I know you are >> working on enable it. So I wonder to know what the current status is. Thanks. > > Xen 4.4 has new kexec implementation written by David Vrabel. > It does not require any specific Linux Kernel version because this > implementation is self contained. However, please do not forget to use Cool.. > latest stable version of kexec-tools too. Is there any BKM to use it? I saw an old wiki page but not sure whether it is still suitable. > > Daniel Best regards, Yang ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-14 8:15 ` Zhang, Yang Z @ 2014-04-14 13:26 ` Daniel Kiper 2014-04-15 2:13 ` Zhang, Yang Z 2014-04-15 6:57 ` Zhang, Yang Z 0 siblings, 2 replies; 15+ messages in thread From: Daniel Kiper @ 2014-04-14 13:26 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: xen-devel, Daniel Kiper Hey, On Mon, Apr 14, 2014 at 08:15:35AM +0000, Zhang, Yang Z wrote: > Daniel Kiper wrote on 2014-04-14: > > Hi, > > > > On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: > >> Hi Daniel > >> > >> Are kexec/kdump supported by latest Xen + upstream Linux? > >> I remember it only works with xen+2.6.18 linux. I know you are > >> working on enable it. So I wonder to know what the current status is. Thanks. > > > > Xen 4.4 has new kexec implementation written by David Vrabel. > > It does not require any specific Linux Kernel version because this > > implementation is self contained. However, please do not forget to use > > Cool.. > > > latest stable version of kexec-tools too. > > Is there any BKM to use it? I saw an old wiki page but > not sure whether it is still suitable. I assume that you are asking about kexec/kdump support in dom0. Just build kexec-tools with Xen support enabled (you must provide relevant Xen header files and libraries). Then add crashkernel argument to Xen (e.g. crashkernel=512m@64m) and reboot machine. Use kexec-tools like on bare metal machines. Daniel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-14 13:26 ` Daniel Kiper @ 2014-04-15 2:13 ` Zhang, Yang Z 2014-04-16 11:10 ` Daniel Kiper 2014-04-15 6:57 ` Zhang, Yang Z 1 sibling, 1 reply; 15+ messages in thread From: Zhang, Yang Z @ 2014-04-15 2:13 UTC (permalink / raw) To: Daniel Kiper; +Cc: xen-devel Daniel Kiper wrote on 2014-04-14: > Hey, > > On Mon, Apr 14, 2014 at 08:15:35AM +0000, Zhang, Yang Z wrote: >> Daniel Kiper wrote on 2014-04-14: >>> Hi, >>> >>> On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: >>>> Hi Daniel >>>> >>>> Are kexec/kdump supported by latest Xen + upstream Linux? >>>> I remember it only works with xen+2.6.18 linux. I know you are >>>> working on enable it. So I wonder to know what the current status is. > Thanks. >>> >>> Xen 4.4 has new kexec implementation written by David Vrabel. >>> It does not require any specific Linux Kernel version because this >>> implementation is self contained. However, please do not forget to >>> use >> >> Cool.. >> >>> latest stable version of kexec-tools too. >> >> Is there any BKM to use it? I saw an old wiki page but not sure >> whether it is still suitable. > > I assume that you are asking about kexec/kdump support in dom0. > > Just build kexec-tools with Xen support enabled (you must provide > relevant Xen header files and libraries). > Then add crashkernel argument to Xen (e.g. crashkernel=512m@64m) and > reboot machine. Use kexec-tools like on bare metal machines. I am trying to kexec from Xen to Linux. But it fails to work. ./kexec -l /boot/vmlinuz-2.6.32-358.el6.x86_64 kexec_load failed: Invalid argument entry = 0x7fff6760 flags = 0x3e0000 nr_segments = 3 segment[0].buf = 0x138f660 segment[0].bufsz = 0x3641 segment[0].mem = 0x3000 segment[0].memsz = 0x4000 segment[1].buf = 0x7fc68badf610 segment[1].bufsz = 0x3d8110 segment[1].mem = 0x1000000 segment[1].memsz = 0x3d9000 segment[2].buf = 0x1387540 segment[2].bufsz = 0x80e0 segment[2].mem = 0x7fff6000 segment[2].memsz = 0xa000 Here is my environment: Xen version: latest Xen Xen boot command: kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all guest_loglvl=all conring_size=4M crashkernel=128M@64M module (hd0,0)/boot/vmlinuz-xen o root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 3 debug module (hd0,0)/boot/initrd-xen.img kexec version with Xen enabled: kexec-tools 2.0.6 released 18 April 2014 Also, it shows error when trying to kexec (Xen -> Xen) ./kexec -l /boot/xen.gz Segmentation fault (core dumped) BTW: kexec from Linux to Linux works well. Best regards, Yang ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-15 2:13 ` Zhang, Yang Z @ 2014-04-16 11:10 ` Daniel Kiper 2014-04-17 1:19 ` Zhang, Yang Z 0 siblings, 1 reply; 15+ messages in thread From: Daniel Kiper @ 2014-04-16 11:10 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: xen-devel, Daniel Kiper On Tue, Apr 15, 2014 at 02:13:56AM +0000, Zhang, Yang Z wrote: > Daniel Kiper wrote on 2014-04-14: > > Hey, > > > > On Mon, Apr 14, 2014 at 08:15:35AM +0000, Zhang, Yang Z wrote: > >> Daniel Kiper wrote on 2014-04-14: > >>> Hi, > >>> > >>> On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: > >>>> Hi Daniel > >>>> > >>>> Are kexec/kdump supported by latest Xen + upstream Linux? > >>>> I remember it only works with xen+2.6.18 linux. I know you are > >>>> working on enable it. So I wonder to know what the current status is. > > Thanks. > >>> > >>> Xen 4.4 has new kexec implementation written by David Vrabel. > >>> It does not require any specific Linux Kernel version because this > >>> implementation is self contained. However, please do not forget to > >>> use > >> > >> Cool.. > >> > >>> latest stable version of kexec-tools too. > >> > >> Is there any BKM to use it? I saw an old wiki page but not sure > >> whether it is still suitable. > > > > I assume that you are asking about kexec/kdump support in dom0. > > > > Just build kexec-tools with Xen support enabled (you must provide > > relevant Xen header files and libraries). > > Then add crashkernel argument to Xen (e.g. crashkernel=512m@64m) and > > reboot machine. Use kexec-tools like on bare metal machines. > > I am trying to kexec from Xen to Linux. But it fails to work. > ./kexec -l /boot/vmlinuz-2.6.32-358.el6.x86_64 What about --append or --command-line? > kexec_load failed: Invalid argument > entry = 0x7fff6760 flags = 0x3e0000 > nr_segments = 3 > segment[0].buf = 0x138f660 > segment[0].bufsz = 0x3641 > segment[0].mem = 0x3000 > segment[0].memsz = 0x4000 > segment[1].buf = 0x7fc68badf610 > segment[1].bufsz = 0x3d8110 > segment[1].mem = 0x1000000 > segment[1].memsz = 0x3d9000 > segment[2].buf = 0x1387540 > segment[2].bufsz = 0x80e0 > segment[2].mem = 0x7fff6000 > segment[2].memsz = 0xa000 Could you configure kexec-tools in following way: ./configure CFLAGS=-DDEBUG Then build it as usual. > Here is my environment: > Xen version: latest Xen > Xen boot command: > kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all guest_loglvl=all conring_size=4M crashkernel=128M@64M > module (hd0,0)/boot/vmlinuz-xen o root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 3 debug > module (hd0,0)/boot/initrd-xen.img > kexec version with Xen enabled: kexec-tools 2.0.6 released 18 April 2014 > > Also, it shows error when trying to kexec (Xen -> Xen) > ./kexec -l /boot/xen.gz > Segmentation fault (core dumped) We were focusing more on kdump than on other scenarios. I suppose that kexec-tools assume that this compressed ELF file is Linux Kernel and tries load it as usual which of course is completely wrong. You should load Xen with at least "-t multiboot-x86" argument (read help printed by kexec). However, I am not sure that this loader is actively maintained and works. Daniel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-16 11:10 ` Daniel Kiper @ 2014-04-17 1:19 ` Zhang, Yang Z 2014-04-17 9:50 ` Andrew Cooper ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Zhang, Yang Z @ 2014-04-17 1:19 UTC (permalink / raw) To: Daniel Kiper, david.vrabel; +Cc: xen-devel Daniel Kiper wrote on 2014-04-16: > On Tue, Apr 15, 2014 at 02:13:56AM +0000, Zhang, Yang Z wrote: >> Daniel Kiper wrote on 2014-04-14: >>> Hey, >>> >>> On Mon, Apr 14, 2014 at 08:15:35AM +0000, Zhang, Yang Z wrote: >>>> Daniel Kiper wrote on 2014-04-14: >>>>> Hi, >>>>> >>>>> On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: >>>>>> Hi Daniel >>>>>> >>>>>> Are kexec/kdump supported by latest Xen + upstream Linux? >>>>>> I remember it only works with xen+2.6.18 linux. I know you are >>>>>> working on enable it. So I wonder to know what the current status is. >>> Thanks. >>>>> >>>>> Xen 4.4 has new kexec implementation written by David Vrabel. >>>>> It does not require any specific Linux Kernel version because >>>>> this implementation is self contained. However, please do not >>>>> forget to use >>>> >>>> Cool.. >>>> >>>>> latest stable version of kexec-tools too. >>>> >>>> Is there any BKM to use it? I saw an old wiki page but not sure >>>> whether it is still suitable. >>> >>> I assume that you are asking about kexec/kdump support in dom0. >>> >>> Just build kexec-tools with Xen support enabled (you must provide >>> relevant Xen header files and libraries). >>> Then add crashkernel argument to Xen (e.g. crashkernel=512m@64m) >>> and reboot machine. Use kexec-tools like on bare metal machines. >> >> I am trying to kexec from Xen to Linux. But it fails to work. >> ./kexec -l /boot/vmlinuz-2.6.32-358.el6.x86_64 > > What about --append or --command-line? > >> kexec_load failed: Invalid argument >> entry = 0x7fff6760 flags = 0x3e0000 >> nr_segments = 3 >> segment[0].buf = 0x138f660 >> segment[0].bufsz = 0x3641 >> segment[0].mem = 0x3000 >> segment[0].memsz = 0x4000 >> segment[1].buf = 0x7fc68badf610 >> segment[1].bufsz = 0x3d8110 >> segment[1].mem = 0x1000000 >> segment[1].memsz = 0x3d9000 >> segment[2].buf = 0x1387540 >> segment[2].bufsz = 0x80e0 >> segment[2].mem = 0x7fff6000 >> segment[2].memsz = 0xa000 > > Could you configure kexec-tools in following way: > > ./configure CFLAGS=-DDEBUG > > Then build it as usual. > >> Here is my environment: >> Xen version: latest Xen >> Xen boot command: >> kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all >> guest_loglvl=all > conring_size=4M crashkernel=128M@64M >> module (hd0,0)/boot/vmlinuz-xen o > root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 > 3 debug >> module (hd0,0)/boot/initrd-xen.img kexec version with Xen enabled: >> kexec-tools 2.0.6 released 18 April 2014 >> >> Also, it shows error when trying to kexec (Xen -> Xen) ./kexec -l >> /boot/xen.gz Segmentation fault (core dumped) > > We were focusing more on kdump than on other scenarios. > I suppose that kexec-tools assume that this compressed ELF file is > Linux Kernel and tries load it as usual which of course is completely > wrong. You should load Xen with at least "-t multiboot-x86" argument (read help printed by kexec). > However, I am not sure that this loader is actively maintained and works. > > Daniel Thanks for your comments. After investigation, I found some bugs (One is the segment overlap check failure and another one is related to x2apic). With some workarounds, now I am able to kexec from Xen into Linux. But it still fails to run kdump(Xen->linux). I add some debug messages in the key code path. It shows kexec_reloc() will cause machine reboot. Is it a known issue? BTW: Have you ever tried kdump(Xen->linux) successfully? If yes, can you share some BKMs? Thanks. Best regards, Yang ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-17 1:19 ` Zhang, Yang Z @ 2014-04-17 9:50 ` Andrew Cooper 2014-04-18 1:45 ` Zhang, Yang Z 2014-04-17 10:01 ` David Vrabel 2014-04-22 10:14 ` David Vrabel 2 siblings, 1 reply; 15+ messages in thread From: Andrew Cooper @ 2014-04-17 9:50 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: david.vrabel, Daniel Kiper, xen-devel On 17/04/14 02:19, Zhang, Yang Z wrote: > >>> Here is my environment: >>> Xen version: latest Xen >>> Xen boot command: >>> kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all >>> guest_loglvl=all >> conring_size=4M crashkernel=128M@64M >>> module (hd0,0)/boot/vmlinuz-xen o >> root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 >> 3 debug >>> module (hd0,0)/boot/initrd-xen.img kexec version with Xen enabled: >>> kexec-tools 2.0.6 released 18 April 2014 >>> >>> Also, it shows error when trying to kexec (Xen -> Xen) ./kexec -l >>> /boot/xen.gz Segmentation fault (core dumped) >> We were focusing more on kdump than on other scenarios. >> I suppose that kexec-tools assume that this compressed ELF file is >> Linux Kernel and tries load it as usual which of course is completely >> wrong. You should load Xen with at least "-t multiboot-x86" argument (read help printed by kexec). >> However, I am not sure that this loader is actively maintained and works. >> >> Daniel > Thanks for your comments. > > After investigation, I found some bugs (One is the segment overlap check failure and another one is related to x2apic). With some workarounds, now I am able to kexec from Xen into Linux. > But it still fails to run kdump(Xen->linux). I add some debug messages in the key code path. It shows kexec_reloc() will cause machine reboot. Is it a known issue? > > BTW: Have you ever tried kdump(Xen->linux) successfully? If yes, can you share some BKMs? Thanks. > > Best regards, > Yang You are going to have to be more descriptive than this with setups and problems. As for real examples, XenServer unconditionally sets up a native crash kernel and does use it in the case of a Xen/dom0 crash. It does work reliably and repeatedly[1] and is routinely tested. ~Andrew [1] We are aware of one hardware specific bug whereby the crash kernel fails to set up a timer interrupt. Investigating it is on my todo list. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-17 9:50 ` Andrew Cooper @ 2014-04-18 1:45 ` Zhang, Yang Z 2014-04-18 12:50 ` Don Slutz 2014-04-18 16:26 ` Andrew Cooper 0 siblings, 2 replies; 15+ messages in thread From: Zhang, Yang Z @ 2014-04-18 1:45 UTC (permalink / raw) To: Andrew Cooper; +Cc: david.vrabel, Daniel Kiper, xen-devel [-- Attachment #1: Type: text/plain, Size: 2501 bytes --] Andrew Cooper wrote on 2014-04-17: > On 17/04/14 02:19, Zhang, Yang Z wrote: >> >>>> Here is my environment: >>>> Xen version: latest Xen >>>> Xen boot command: >>>> kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all >>>> guest_loglvl=all >>> conring_size=4M crashkernel=128M@64M >>>> module (hd0,0)/boot/vmlinuz-xen o >>> root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 3 >>> debug >>>> module (hd0,0)/boot/initrd-xen.img kexec version with Xen enabled: >>>> kexec-tools 2.0.6 released 18 April 2014 >>>> >>>> Also, it shows error when trying to kexec (Xen -> Xen) ./kexec -l >>>> /boot/xen.gz Segmentation fault (core dumped) >>> We were focusing more on kdump than on other scenarios. I suppose that >>> kexec-tools assume that this compressed ELF file is Linux Kernel and >>> tries load it as usual which of course is completely wrong. You should >>> load Xen with at least "-t multiboot-x86" argument (read help printed >>> by kexec). However, I am not sure that this loader is actively >>> maintained and works. >>> >>> Daniel >> Thanks for your comments. >> >> After investigation, I found some bugs (One is the segment overlap >> check > failure and another one is related to x2apic). With some workarounds, > now I am able to kexec from Xen into Linux. >> But it still fails to run kdump(Xen->linux). I add some debug >> messages in the > key code path. It shows kexec_reloc() will cause machine reboot. Is it > a known issue? >> >> BTW: Have you ever tried kdump(Xen->linux) successfully? If yes, can >> you share some BKMs? Thanks. >> >> Best regards, >> Yang > > You are going to have to be more descriptive than this with setups and > problems. The previous mail(attached) has the details. > > As for real examples, XenServer unconditionally sets up a native > crash kernel and does use it in the case of a Xen/dom0 crash. It does > work reliably and repeatedly[1] and is routinely tested. I think XenServer uses the old approach to do the kexec. What I am trying is the new kexec/kdump feature which enabled in Xen4.4. One question, I remember kexec support is missing in 2.6.32-pvops kernel. If XenServer works well, do you know where can I find the patch to enable it for 2.6.32 kernel? > > ~Andrew > > [1] We are aware of one hardware specific bug whereby the crash kernel > fails to set up a timer interrupt. Investigating it is on my todo list. Best regards, Yang [-- Attachment #2: Type: message/rfc822, Size: 3257 bytes --] From: "Zhang, Yang Z" <yang.z.zhang@intel.com> To: Daniel Kiper <dkiper@net-space.pl> Cc: "Konrad Rzeszutek Wilk (konrad.wilk@oracle.com)" <konrad.wilk@oracle.com>, "xen-devel@lists.xen.org" <xen-devel@lists.xen.org> Subject: RE: kexec and kdump on Xen?? Date: Tue, 15 Apr 2014 02:13:55 +0000 Daniel Kiper wrote on 2014-04-14: > Hey, > > On Mon, Apr 14, 2014 at 08:15:35AM +0000, Zhang, Yang Z wrote: >> Daniel Kiper wrote on 2014-04-14: >>> Hi, >>> >>> On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: >>>> Hi Daniel >>>> >>>> Are kexec/kdump supported by latest Xen + upstream Linux? >>>> I remember it only works with xen+2.6.18 linux. I know you are >>>> working on enable it. So I wonder to know what the current status is. > Thanks. >>> >>> Xen 4.4 has new kexec implementation written by David Vrabel. >>> It does not require any specific Linux Kernel version because this >>> implementation is self contained. However, please do not forget to >>> use >> >> Cool.. >> >>> latest stable version of kexec-tools too. >> >> Is there any BKM to use it? I saw an old wiki page but not sure >> whether it is still suitable. > > I assume that you are asking about kexec/kdump support in dom0. > > Just build kexec-tools with Xen support enabled (you must provide > relevant Xen header files and libraries). > Then add crashkernel argument to Xen (e.g. crashkernel=512m@64m) and > reboot machine. Use kexec-tools like on bare metal machines. I am trying to kexec from Xen to Linux. But it fails to work. ./kexec -l /boot/vmlinuz-2.6.32-358.el6.x86_64 kexec_load failed: Invalid argument entry = 0x7fff6760 flags = 0x3e0000 nr_segments = 3 segment[0].buf = 0x138f660 segment[0].bufsz = 0x3641 segment[0].mem = 0x3000 segment[0].memsz = 0x4000 segment[1].buf = 0x7fc68badf610 segment[1].bufsz = 0x3d8110 segment[1].mem = 0x1000000 segment[1].memsz = 0x3d9000 segment[2].buf = 0x1387540 segment[2].bufsz = 0x80e0 segment[2].mem = 0x7fff6000 segment[2].memsz = 0xa000 Here is my environment: Xen version: latest Xen Xen boot command: kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all guest_loglvl=all conring_size=4M crashkernel=128M@64M module (hd0,0)/boot/vmlinuz-xen o root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 3 debug module (hd0,0)/boot/initrd-xen.img kexec version with Xen enabled: kexec-tools 2.0.6 released 18 April 2014 Also, it shows error when trying to kexec (Xen -> Xen) ./kexec -l /boot/xen.gz Segmentation fault (core dumped) BTW: kexec from Linux to Linux works well. Best regards, Yang [-- Attachment #3: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-18 1:45 ` Zhang, Yang Z @ 2014-04-18 12:50 ` Don Slutz 2014-04-18 16:26 ` Andrew Cooper 1 sibling, 0 replies; 15+ messages in thread From: Don Slutz @ 2014-04-18 12:50 UTC (permalink / raw) To: Zhang, Yang Z, Andrew Cooper; +Cc: david.vrabel, Daniel Kiper, xen-devel On 04/17/14 21:45, Zhang, Yang Z wrote: > Andrew Cooper wrote on 2014-04-17: >> On 17/04/14 02:19, Zhang, Yang Z wrote: >> As for real examples, XenServer unconditionally sets up a native >> crash kernel and does use it in the case of a Xen/dom0 crash. It does >> work reliably and repeatedly[1] and is routinely tested. > I think XenServer uses the old approach to do the kexec. What I am trying is the new kexec/kdump feature which enabled in Xen4.4. > One question, I remember kexec support is missing in 2.6.32-pvops kernel. If XenServer works well, do you know where can I find the patch to enable it for 2.6.32 kernel? > Verizon is using the new 4.4 way to do kdump. So far all Xen/dom0 crashes have produced dumps. This is using an unchanged kernel 3.8.11-100.fc17.x86_64. -Don Slutz >> ~Andrew >> >> [1] We are aware of one hardware specific bug whereby the crash kernel >> fails to set up a timer interrupt. Investigating it is on my todo list. > > Best regards, > Yang > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-18 1:45 ` Zhang, Yang Z 2014-04-18 12:50 ` Don Slutz @ 2014-04-18 16:26 ` Andrew Cooper 1 sibling, 0 replies; 15+ messages in thread From: Andrew Cooper @ 2014-04-18 16:26 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: david.vrabel, Daniel Kiper, xen-devel On 18/04/14 02:45, Zhang, Yang Z wrote: > Andrew Cooper wrote on 2014-04-17: >> On 17/04/14 02:19, Zhang, Yang Z wrote: >> As for real examples, XenServer unconditionally sets up a native >> crash kernel and does use it in the case of a Xen/dom0 crash. It does >> work reliably and repeatedly[1] and is routinely tested. > I think XenServer uses the old approach to do the kexec. Older versions of XenServer did. While investigating an issue, David discovered quite how broken^W fragile it was and reimplemented the Xen side, which is the code present in Xen 4.4 We then backported the Xen side fixes to XenServer 6.2, which otherwise uses Xen 4.1.5 and 2.6.32-classic dom0. Since doing so, I am not aware of a single customer crash report which has arrived without proper set of crash logs, taken from the crash environment. > What I am trying is the new kexec/kdump feature which enabled in Xen4.4. > One question, I remember kexec support is missing in 2.6.32-pvops kernel. If XenServer works well, do you know where can I find the patch to enable it for 2.6.32 kernel? It is, but that is the point. The new Xen 4.4 code bypasses the dom0 kernel entirely, and /sbin/kexec uses a libxc interface for loading the hypervisor crash/load images. ~Andrew ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-17 1:19 ` Zhang, Yang Z 2014-04-17 9:50 ` Andrew Cooper @ 2014-04-17 10:01 ` David Vrabel 2014-04-22 10:14 ` David Vrabel 2 siblings, 0 replies; 15+ messages in thread From: David Vrabel @ 2014-04-17 10:01 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: xen-devel, Daniel Kiper On 17/04/14 02:19, Zhang, Yang Z wrote: > > After investigation, I found some bugs (One is the segment overlap > check failure and another one is related to x2apic). With some > workarounds, now I am able to kexec from Xen into Linux. But it still > fails to run kdump(Xen->linux). I add some debug messages in the key > code path. It shows kexec_reloc() will cause machine reboot. Is it a > known issue? Rebooting after the kexec_reloc() call could be triggered from Xen, purgatory or the kernel. Can you turn on purgatory debug output (--console-serial --serial-baud=115200 options to kexec for serial) and earlyprintk in the kernel? You may also want to specify a crashregion location. e.g., we use the Xen option "crashkernel=128M@32M". David ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-17 1:19 ` Zhang, Yang Z 2014-04-17 9:50 ` Andrew Cooper 2014-04-17 10:01 ` David Vrabel @ 2014-04-22 10:14 ` David Vrabel 2 siblings, 0 replies; 15+ messages in thread From: David Vrabel @ 2014-04-22 10:14 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: xen-devel, Daniel Kiper On 17/04/14 02:19, Zhang, Yang Z wrote: > > > After investigation, I found some bugs (One is the segment overlap > check failure and another one is related to x2apic). With some > workarounds, now I am able to kexec from Xen into Linux. But it still > fails to run kdump(Xen->linux). I add some debug messages in the key > code path. It shows kexec_reloc() will cause machine reboot. Is it a > known issue? How did you fix these bugs? Perhaps you inadvertently broke something else? David ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen?? 2014-04-14 13:26 ` Daniel Kiper 2014-04-15 2:13 ` Zhang, Yang Z @ 2014-04-15 6:57 ` Zhang, Yang Z 1 sibling, 0 replies; 15+ messages in thread From: Zhang, Yang Z @ 2014-04-15 6:57 UTC (permalink / raw) To: Daniel Kiper, David Vrabel; +Cc: xen-devel Zhang, Yang Z wrote on 2014-04-15: > Daniel Kiper wrote on 2014-04-14: >> Hey, >> >> On Mon, Apr 14, 2014 at 08:15:35AM +0000, Zhang, Yang Z wrote: >>> Daniel Kiper wrote on 2014-04-14: >>>> Hi, >>>> >>>> On Mon, Apr 14, 2014 at 03:38:26AM +0000, Zhang, Yang Z wrote: >>>>> Hi Daniel >>>>> >>>>> Are kexec/kdump supported by latest Xen + upstream Linux? >>>>> I remember it only works with xen+2.6.18 linux. I know you are >>>>> working on enable it. So I wonder to know what the current status is. >> Thanks. >>>> >>>> Xen 4.4 has new kexec implementation written by David Vrabel. >>>> It does not require any specific Linux Kernel version because this >>>> implementation is self contained. However, please do not forget to >>>> use >>> >>> Cool.. >>> >>>> latest stable version of kexec-tools too. >>> >>> Is there any BKM to use it? I saw an old wiki page but not sure >>> whether it is still suitable. >> >> I assume that you are asking about kexec/kdump support in dom0. >> >> Just build kexec-tools with Xen support enabled (you must provide >> relevant Xen header files and libraries). >> Then add crashkernel argument to Xen (e.g. crashkernel=512m@64m) and >> reboot machine. Use kexec-tools like on bare metal machines. > > I am trying to kexec from Xen to Linux. But it fails to work. > ./kexec -l /boot/vmlinuz-2.6.32-358.el6.x86_64 > > kexec_load failed: Invalid argument > entry = 0x7fff6760 flags = 0x3e0000 > nr_segments = 3 > segment[0].buf = 0x138f660 > segment[0].bufsz = 0x3641 > segment[0].mem = 0x3000 > segment[0].memsz = 0x4000 > segment[1].buf = 0x7fc68badf610 > segment[1].bufsz = 0x3d8110 > segment[1].mem = 0x1000000 > segment[1].memsz = 0x3d9000 > segment[2].buf = 0x1387540 > segment[2].bufsz = 0x80e0 > segment[2].mem = 0x7fff6000 > segment[2].memsz = 0xa000 > > > Here is my environment: > Xen version: latest Xen > Xen boot command: > kernel (hd0,0)/boot/xen.gz dom0_mem=4096M loglvl=all guest_loglvl=all > conring_size=4M crashkernel=128M@64M > module (hd0,0)/boot/vmlinuz-xen o > root=UUID=03a5e7c4-b8d0-45b4-a090-c34b06821cea pci=noaer max_loop=64 > 3 debug > module (hd0,0)/boot/initrd-xen.img kexec version with Xen enabled: > kexec-tools 2.0.6 released 18 April 2014 > > Also, it shows error when trying to kexec (Xen -> Xen) ./kexec -l > /boot/xen.gz Segmentation fault (core dumped) > > BTW: kexec from Linux to Linux works well. The reason is that the first segment in my box (Actually I am using nested Xen to try) starts from 0x3000 to 0x7000, but kexec will map 0 - 1MiB unconditionally: /* * Ensure 0 - 1 MiB is mapped and accessible by the image. * * This allows access to the VGA memory and the region * purgatory copies in the crash case. */ set_xen_guest_handle(xen_segs[s].buf.h, HYPERCALL_BUFFER_NULL); xen_segs[s].buf_size = 0; xen_segs[s].dest_maddr = 0; xen_segs[s].dest_size = 1 * 1024 * 1024; Then overlap happens. Any idea? Best regards, Yang ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kexec and kdump on Xen? 2014-04-14 3:38 kexec and kdump on Xen? Zhang, Yang Z 2014-04-14 8:11 ` kexec and kdump on Xen?? Daniel Kiper @ 2014-04-14 9:51 ` David Vrabel 1 sibling, 0 replies; 15+ messages in thread From: David Vrabel @ 2014-04-14 9:51 UTC (permalink / raw) To: Zhang, Yang Z; +Cc: Daniel Kiper, xen-devel On 14/04/14 04:38, Zhang, Yang Z wrote: > Hi Daniel > > Are kexec/kdump supported by latest Xen + upstream Linux? I remember > it only works with xen+2.6.18 linux. I know you are working on enable > it. So I wonder to know what the current status is. Thanks. It depends on what you're asking for. Xen kexec is available in Xen 4.4 using the latest kexec-tools. The kexec tool works the same as for bare metal. In guest kexec works for PVHVM/HVM guests but does not work for PV guests. David ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-04-22 10:14 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-04-14 3:38 kexec and kdump on Xen? Zhang, Yang Z 2014-04-14 8:11 ` kexec and kdump on Xen?? Daniel Kiper 2014-04-14 8:15 ` Zhang, Yang Z 2014-04-14 13:26 ` Daniel Kiper 2014-04-15 2:13 ` Zhang, Yang Z 2014-04-16 11:10 ` Daniel Kiper 2014-04-17 1:19 ` Zhang, Yang Z 2014-04-17 9:50 ` Andrew Cooper 2014-04-18 1:45 ` Zhang, Yang Z 2014-04-18 12:50 ` Don Slutz 2014-04-18 16:26 ` Andrew Cooper 2014-04-17 10:01 ` David Vrabel 2014-04-22 10:14 ` David Vrabel 2014-04-15 6:57 ` Zhang, Yang Z 2014-04-14 9:51 ` kexec and kdump on Xen? David Vrabel
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.