[Xen-devel] [PATCH 0/4] kexec-tools: add support for Xen 4.3

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

 



On 25/02/13 18:34, Don Slutz wrote:
> 
> I did not find a fix/change to get_xen_vmcoreinfo() to call on 
> xc_kexec_get_range(xc, KEXEC_RANGE_MA_VMCOREINFO, ...
> 
> I found the following to work.
>     -Don Slutz
> 
>  From 2cabc018d7613b0d2ac487cbf2a2e9438a441a8d Mon Sep 17 00:00:00 2001
> From: Don Slutz <Don at CloudSwitch.com>
> Date: Fri, 22 Feb 2013 22:27:03 -0500
> Subject: [PATCH 1/2] Switch to use xc_kexec_get_range for 
> get_xen_vmcoreinfo.

Thanks.  I'll add this to my series.

David

> Signed-off-by: Don Slutz <Don at CloudSwitch.com>
> ---
>   kexec/crashdump-xen.c |   20 ++++++++++++++++++++
>   kexec/crashdump.c     |    2 ++
>   2 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c
> index 56b0653..8179b72 100644
> --- a/kexec/crashdump-xen.c
> +++ b/kexec/crashdump-xen.c
> @@ -161,6 +161,26 @@ unsigned long xen_architecture(struct 
> crash_elf_info *elf_info)
>   }
> 
>   #ifdef HAVE_LIBXENCTRL
> +int get_xen_vmcoreinfo(uint64_t *addr, uint64_t *len)
> +{
> +       xc_interface *xc;
> +        int ret = 0;
> +
> +       xc = xc_interface_open(NULL, NULL, 0);
> +       if ( !xc ) {
> +               fprintf(stderr, "failed to open xen control interface.\n");
> +               return -1;
> +       }
> +
> +        ret = xc_kexec_get_range(xc, KEXEC_RANGE_MA_VMCOREINFO, 0, len, 
> addr);
> +
> +       xc_interface_close(xc);
> +
> +        if (ret < 0)
> +            return -1;
> +        return 0;
> +}
> +
>   int xen_get_nr_phys_cpus(void)
>   {
>          xc_interface *xc;
> diff --git a/kexec/crashdump.c b/kexec/crashdump.c
> index 847d080..3d2c1b9 100644
> --- a/kexec/crashdump.c
> +++ b/kexec/crashdump.c
> @@ -142,7 +142,9 @@ int get_kernel_vmcoreinfo(uint64_t *addr, uint64_t *len)
>          return get_vmcoreinfo("/sys/kernel/vmcoreinfo", addr, len);
>   }
> 
> +#ifndef HAVE_LIBXENCTRL
>   int get_xen_vmcoreinfo(uint64_t *addr, uint64_t *len)
>   {
>          return get_vmcoreinfo("/sys/hypervisor/vmcoreinfo", addr, len);
>   }
> +#endif




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux