Daniel Kiper
2011-Aug-21 13:51 UTC
[Xen-devel] [PATCH 1/4] xen: Take into account Xen control interface changes since Xen Ver. 4.1
xc_interface_open() receive three arguments instead of void and returns pointer to xc_interface type instead of int since Xen Ver. 4.1. Take into account that and allow kexec-tools compilation with all versions of Xen. Signed-off-by: Daniel Kiper <dkiper@net-space.pl> --- kexec/crashdump-xen.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c index b347764..9dfabf8 100644 --- a/kexec/crashdump-xen.c +++ b/kexec/crashdump-xen.c @@ -126,19 +126,32 @@ unsigned long xen_architecture(struct crash_elf_info *elf_info) { unsigned long machine = elf_info->machine; #ifdef HAVE_LIBXENCTRL - int xc, rc; + int rc; xen_capabilities_info_t capabilities; +#ifdef XENCTRL_HAS_XC_INTERFACE + xc_interface *xc; +#else + int xc; +#endif if (!xen_present()) goto out; memset(capabilities, ''0'', XEN_CAPABILITIES_INFO_LEN); +#ifdef XENCTRL_HAS_XC_INTERFACE + xc = xc_interface_open(NULL, NULL, 0); + if ( !xc ) { + fprintf(stderr, "failed to open xen control interface.\n"); + goto out; + } +#else xc = xc_interface_open(); if ( xc == -1 ) { fprintf(stderr, "failed to open xen control interface.\n"); goto out; } +#endif rc = xc_version(xc, XENVER_capabilities, &capabilities[0]); if ( rc == -1 ) { -- 1.5.6.5 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2011-Aug-22 03:56 UTC
[Xen-devel] Re: [PATCH 1/4] xen: Take into account Xen control interface changes since Xen Ver. 4.1
> xc_interface_open() receive three arguments instead of void and returns > pointer to xc_interface type instead of int since Xen Ver. 4.1. Take into > account that and allow kexec-tools compilation with all versions of Xen. > > Signed-off-by: Daniel Kiper <dkiper@net-space.pl> > --- > kexec/crashdump-xen.c | 15 ++++++++++++++- > 1 files changed, 14 insertions(+), 1 deletions(-) > > diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c > index b347764..9dfabf8 100644 > --- a/kexec/crashdump-xen.c > +++ b/kexec/crashdump-xen.c > @@ -126,19 +126,32 @@ unsigned long xen_architecture(struct crash_elf_info*elf_info)> { > unsigned long machine = elf_info->machine; > #ifdef HAVE_LIBXENCTRL > - int xc, rc; > + int rc; > xen_capabilities_info_t capabilities; > +#ifdef XENCTRL_HAS_XC_INTERFACE > + xc_interface *xc; > +#else > + int xc; > +#endifWhere is the #endif for HAVE_LIBXENCTRL?> > if (!xen_present()) > goto out; > > memset(capabilities, ''0'', XEN_CAPABILITIES_INFO_LEN); > > +#ifdef XENCTRL_HAS_XC_INTERFACE > + xc = xc_interface_open(NULL, NULL, 0); > + if ( !xc ) { > + fprintf(stderr, "failed to open xen control interface.\n"); > + goto out; > + } > +#else > xc = xc_interface_open(); > if ( xc == -1 ) { > fprintf(stderr, "failed to open xen control interface.\n"); > goto out; > } > +#endif > > rc = xc_version(xc, XENVER_capabilities, &capabilities[0]); > if ( rc == -1 ) { > -- > 1.5.6.5 >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rajendra Bele
2011-Aug-22 06:24 UTC
Re: [Xen-devel] [PATCH 1/4] xen: Take into account Xen control interface changes since Xen Ver. 4.1
Dear Friends, I am pursuing Ph.D. in virtualization, I want to study detail architecture and implementation of Xen As I wanted to start from scratch ,can you suggest some guidance or resource for it. Thanking you Rajendra Bele Pune,India On Sun, Aug 21, 2011 at 7:36 PM, Daniel Kiper <dkiper@net-space.pl> wrote:> xc_interface_open() receive three arguments instead of void and returns > pointer to xc_interface type instead of int since Xen Ver. 4.1. Take into > account that and allow kexec-tools compilation with all versions of Xen. > > Signed-off-by: Daniel Kiper <dkiper@net-space.pl> > --- > kexec/crashdump-xen.c | 15 ++++++++++++++- > 1 files changed, 14 insertions(+), 1 deletions(-) > > diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c > index b347764..9dfabf8 100644 > --- a/kexec/crashdump-xen.c > +++ b/kexec/crashdump-xen.c > @@ -126,19 +126,32 @@ unsigned long xen_architecture(struct crash_elf_info > *elf_info) > { > unsigned long machine = elf_info->machine; > #ifdef HAVE_LIBXENCTRL > - int xc, rc; > + int rc; > xen_capabilities_info_t capabilities; > +#ifdef XENCTRL_HAS_XC_INTERFACE > + xc_interface *xc; > +#else > + int xc; > +#endif > > if (!xen_present()) > goto out; > > memset(capabilities, ''0'', XEN_CAPABILITIES_INFO_LEN); > > +#ifdef XENCTRL_HAS_XC_INTERFACE > + xc = xc_interface_open(NULL, NULL, 0); > + if ( !xc ) { > + fprintf(stderr, "failed to open xen control interface.\n"); > + goto out; > + } > +#else > xc = xc_interface_open(); > if ( xc == -1 ) { > fprintf(stderr, "failed to open xen control interface.\n"); > goto out; > } > +#endif > > rc = xc_version(xc, XENVER_capabilities, &capabilities[0]); > if ( rc == -1 ) { > -- > 1.5.6.5 > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Mon, Aug 22, 2011 at 12:09:45PM +0545, Rajendra Bele wrote:> Dear Friends, > I am pursuing Ph.D. in virtualization, > I want to study detail architecture and implementation of Xen > As I wanted to start from scratch ,can you suggest some guidance or > resource for it.Hello, I think it''s better to discuss this kind of subjects on xen-users mailinglist.. Also in the future please start a new thread by writing a new email, now you replied to existing discussion thread.. Take a look at XCP 1.0 if you want to get an easy start, other than that you can google for tutorials how to install Xen on the Linux distro you''re familiar with. Hopefully that helps, -- Pasi> Thanking you > Rajendra Bele > Pune,India > > On Sun, Aug 21, 2011 at 7:36 PM, Daniel Kiper <[1]dkiper@net-space.pl> > wrote: > > xc_interface_open() receive three arguments instead of void and returns > pointer to xc_interface type instead of int since Xen Ver. 4.1. Take > into > account that and allow kexec-tools compilation with all versions of Xen. > > Signed-off-by: Daniel Kiper <[2]dkiper@net-space.pl> > --- > Â kexec/crashdump-xen.c | Â 15 ++++++++++++++- > Â 1 files changed, 14 insertions(+), 1 deletions(-) >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel Kiper
2011-Aug-22 13:25 UTC
[Xen-devel] Re: [PATCH 1/4] xen: Take into account Xen control interface changes since Xen Ver. 4.1
On Sun, Aug 21, 2011 at 11:56:50PM -0400, Konrad Rzeszutek Wilk wrote:> > xc_interface_open() receive three arguments instead of void and returns > > pointer to xc_interface type instead of int since Xen Ver. 4.1. Take into > > account that and allow kexec-tools compilation with all versions of Xen. > > > > Signed-off-by: Daniel Kiper <dkiper@net-space.pl> > > --- > > kexec/crashdump-xen.c | 15 ++++++++++++++- > > 1 files changed, 14 insertions(+), 1 deletions(-) > > > > diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c > > index b347764..9dfabf8 100644 > > --- a/kexec/crashdump-xen.c > > +++ b/kexec/crashdump-xen.c > > @@ -126,19 +126,32 @@ unsigned long xen_architecture(struct crash_elf_info > *elf_info) > > { > > unsigned long machine = elf_info->machine; > > #ifdef HAVE_LIBXENCTRL > > - int xc, rc; > > + int rc; > > xen_capabilities_info_t capabilities; > > +#ifdef XENCTRL_HAS_XC_INTERFACE > > + xc_interface *xc; > > +#else > > + int xc; > > +#endif > > Where is the #endif for HAVE_LIBXENCTRL?At the end of this function. It is not included in this patch. Daniel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel