The series adds support for the new hypercall ABI which should be provided by Xen 4.3. Images are loaded into Xen directly with no kernel involvement. Do not apply until the hypervisor side patches are applied to Xen. Patch 1 is unrelated but kexec wouldn''t work for me without it. Not sure why I had problems, perhaps a toolstack specific issue? Patch 2 makes libxc 4.3 mandatory for Xen support. Patch 3 removes a use of /proc/iomem in favour of libxc. Patch 4 adds the support for loading an image into Xen. This series explicitly drops support for older version of libxc/Xen as supporting kexec on these hypervisors requires kernel support that will never be available upstream. David
>>> On 21.02.13 at 18:57, David Vrabel <david.vrabel@citrix.com> wrote: > The series adds support for the new hypercall ABI which should be > provided by Xen 4.3. Images are loaded into Xen directly with no > kernel involvement. > > Do not apply until the hypervisor side patches are applied to Xen. > > Patch 1 is unrelated but kexec wouldn''t work for me without it. Not > sure why I had problems, perhaps a toolstack specific issue? > > Patch 2 makes libxc 4.3 mandatory for Xen support.That doesn''t sound right. How do you envision this to be incorporated into existing distros that don''t right away switch to Xen 4.3? Jan> Patch 3 removes a use of /proc/iomem in favour of libxc. > > Patch 4 adds the support for loading an image into Xen. > > This series explicitly drops support for older version of libxc/Xen as > supporting kexec on these hypervisors requires kernel support that > will never be available upstream. > > David > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
On 22/02/13 08:14, Jan Beulich wrote:>>>> On 21.02.13 at 18:57, David Vrabel <david.vrabel@citrix.com> wrote: >> The series adds support for the new hypercall ABI which should be >> provided by Xen 4.3. Images are loaded into Xen directly with no >> kernel involvement. >> >> Do not apply until the hypervisor side patches are applied to Xen. >> >> Patch 1 is unrelated but kexec wouldn''t work for me without it. Not >> sure why I had problems, perhaps a toolstack specific issue? >> >> Patch 2 makes libxc 4.3 mandatory for Xen support. > > That doesn''t sound right. How do you envision this to be > incorporated into existing distros that don''t right away switch > to Xen 4.3?Eric Bierderman said in an earlier thread[1]: "Certainly /sbin/kexec will only support the new hypercall once the support has merged." David [1] http://lists.xen.org/archives/html/xen-devel/2013-01/msg00754.html
On 02/21/13 12:57, David Vrabel wrote:> The series adds support for the new hypercall ABI which should be > provided by Xen 4.3. Images are loaded into Xen directly with no > kernel involvement. > > Do not apply until the hypervisor side patches are applied to Xen. > > Patch 1 is unrelated but kexec wouldn''t work for me without it. Not > sure why I had problems, perhaps a toolstack specific issue? > > Patch 2 makes libxc 4.3 mandatory for Xen support. > > Patch 3 removes a use of /proc/iomem in favour of libxc. > > Patch 4 adds the support for loading an image into Xen. > > This series explicitly drops support for older version of libxc/Xen as > supporting kexec on these hypervisors requires kernel support that > will never be available upstream. > > David > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-develI 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. 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 -- 1.7.1
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
David, I have done some tests. I will send my thoughts and comments as reply to relevant emails. On Thu, Feb 21, 2013 at 05:57:36PM +0000, David Vrabel wrote:> The series adds support for the new hypercall ABI which should be > provided by Xen 4.3. Images are loaded into Xen directly with no > kernel involvement. > > Do not apply until the hypervisor side patches are applied to Xen. > > Patch 1 is unrelated but kexec wouldn''t work for me without it. Not > sure why I had problems, perhaps a toolstack specific issue? > > Patch 2 makes libxc 4.3 mandatory for Xen support. > > Patch 3 removes a use of /proc/iomem in favour of libxc. > > Patch 4 adds the support for loading an image into Xen. > > This series explicitly drops support for older version of libxc/Xen as > supporting kexec on these hypervisors requires kernel support that > will never be available upstream.Please do not do that. I agree with Jan that there are many distros in the wild which uses old interface (and they will be doing that long time) and we should not make their life more difficult. I have found that simple kexec does not work. It means that if you call kexec -e (after kexec -l) it displays: Nothing has been loaded! Linux on baremetal works without any issue. Daniel