[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] kexec and kdump on Xen??



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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.