From: David Vrabel <david.vrabel@citrix.com>
To: Don Slutz <Don@CloudSwitch.Com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Xen-devel] [PATCH 0/4] kexec-tools: add support for Xen 4.3
Date: Mon, 25 Feb 2013 19:34:20 +0000 [thread overview]
Message-ID: <512BBCBC.8050404@citrix.com> (raw)
In-Reply-To: <512BAEB3.4010708@CloudSwitch.Com>
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@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@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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-02-25 19:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 17:57 [PATCH 0/4] kexec-tools: add support for Xen 4.3 David Vrabel
2013-02-21 17:57 ` [PATCH 1/4] purgatory: put variables altered by kexec in .data not .bss David Vrabel
2013-02-21 17:57 ` [PATCH 2/4] kexec/xen: require libxc from Xen 4.3 David Vrabel
2013-02-21 17:57 ` [PATCH 3/4] kexec/xen: use libxc to get location of crash notes David Vrabel
2013-02-26 13:53 ` [Xen-devel] " Don Slutz
2013-02-21 17:57 ` [PATCH 4/4] kexec/xen: directly load images images into Xen David Vrabel
2013-03-12 11:29 ` Daniel Kiper
2013-02-22 8:14 ` [Xen-devel] [PATCH 0/4] kexec-tools: add support for Xen 4.3 Jan Beulich
2013-02-22 11:39 ` David Vrabel
2013-02-25 18:34 ` Don Slutz
2013-02-25 19:34 ` David Vrabel [this message]
2013-03-08 10:30 ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512BBCBC.8050404@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Don@CloudSwitch.Com \
--cc=daniel.kiper@oracle.com \
--cc=kexec@lists.infradead.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox