From: Paul Durrant <Paul.Durrant@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Wei Liu <wei.liu2@citrix.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH 1/4] tools/libxendevicemodel: introduce the new library
Date: Mon, 20 Feb 2017 15:11:38 +0000 [thread overview]
Message-ID: <8d8b91ae198a4113ae128ba6c75bfa8e@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <20170220150732.dlx3zf2clovhwvbn@citrix.com>
> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@citrix.com]
> Sent: 20 February 2017 15:08
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel@lists.xenproject.org; Ian Jackson <Ian.Jackson@citrix.com>;
> Wei Liu <wei.liu2@citrix.com>; Samuel Thibault <samuel.thibault@ens-
> lyon.org>
> Subject: Re: [PATCH 1/4] tools/libxendevicemodel: introduce the new library
>
> On Fri, Feb 17, 2017 at 10:27:06AM +0000, Paul Durrant wrote:
> > The new xendevicemodel library is intended to be used by all Xen device
> > models such that the only hypercall that use will be the dm_op hypercall
> > added by commit 524a98c2.
> >
> > This patch adds the boilerplate for the new library, with only open() and
> > close() entry points, and calls to those from libxenctrl in preparation
> > for the compat layer added by a subsequent patch.
> >
> > NOTE: After applying this patch libxenctrl will depend on
> libxendevicemodel
> > and so patches [1] and [2] must be applied to qemu-xen-traditional
> > and mini-os respectively.
> >
> > [1] http://xenbits.xen.org/gitweb/?p=people/pauldu/qemu-xen-
> traditional.git;a=commit;h=a445da7e
> > [2] http://xenbits.xen.org/gitweb/?p=people/pauldu/mini-
> os.git;a=commit;h=41c9f2ae
> >
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> > ---
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Wei Liu <wei.liu2@citrix.com>
> > Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
> > ---
> > stubdom/Makefile | 17 ++++++-
> > tools/Makefile | 1 +
> > tools/Rules.mk | 10 +++-
> > tools/libs/Makefile | 1 +
> > tools/libs/devicemodel/Makefile | 66
> ++++++++++++++++++++++++
> > tools/libs/devicemodel/core.c | 68
> +++++++++++++++++++++++++
> > tools/libs/devicemodel/include/xendevicemodel.h | 40
> +++++++++++++++
> > tools/libs/devicemodel/libxendevicemodel.map | 6 +++
> > tools/libs/devicemodel/private.h | 22 ++++++++
> > tools/libxc/Makefile | 3 +-
> > tools/libxc/xc_private.c | 11 +++-
> > tools/libxc/xc_private.h | 4 ++
> > 12 files changed, 243 insertions(+), 6 deletions(-)
> > create mode 100644 tools/libs/devicemodel/Makefile
> > create mode 100644 tools/libs/devicemodel/core.c
> > create mode 100644 tools/libs/devicemodel/include/xendevicemodel.h
> > create mode 100644 tools/libs/devicemodel/libxendevicemodel.map
> > create mode 100644 tools/libs/devicemodel/private.h
> >
>
> I skimmed through all the Makefile changes, assuming they are copied
> from existing files, they look fine.
>
> > diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
> > index 37235e3..af5e49c 100644
> > --- a/tools/libxc/Makefile
> > +++ b/tools/libxc/Makefile
> > @@ -113,6 +113,7 @@ CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
> > CFLAGS += $(PTHREAD_CFLAGS)
> > CFLAGS += $(CFLAGS_libxentoollog)
> > CFLAGS += $(CFLAGS_libxenevtchn)
> > +CFLAGS += $(CFLAGS_libxendevicemodel)
> >
> > CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
> > CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
> > @@ -217,7 +218,7 @@ libxenctrl.so.$(MAJOR):
> libxenctrl.so.$(MAJOR).$(MINOR)
> > $(SYMLINK_SHLIB) $< $@
> >
> > libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
> > - $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -
> Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^
> $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxengnttab)
> $(LDLIBS_libxengntshr) $(LDLIBS_libxencall) $(LDLIBS_libxenforeignmemory)
> $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
> > + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -
> Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^
> $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxengnttab)
> $(LDLIBS_libxengntshr) $(LDLIBS_libxencall) $(LDLIBS_libxenforeignmemory)
> $(LDLIBS_libxendevicemodel) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
> >
> > # libxenguest
> >
> > diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
> > index f0e089c..32379b6 100644
> > --- a/tools/libxc/xc_private.c
> > +++ b/tools/libxc/xc_private.c
> > @@ -65,12 +65,18 @@ struct xc_interface_core
> *xc_interface_open(xentoollog_logger *logger,
> >
> > xch->fmem = xenforeignmemory_open(xch->error_handler, 0);
> >
> > - if ( xch->xcall == NULL )
> > + if ( xch->fmem == NULL )
> > + goto err;
> > +
>
> This is a bug fix that should be split out and backported.
Yeah, I forgot I fixed that along the way. I'll split it out.
>
> Other than this, the code looks fine.
>
Thanks,
Paul
> Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-20 15:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 10:27 [PATCH 1/4] tools/libxendevicemodel: introduce the new library Paul Durrant
2017-02-17 10:27 ` [PATCH 2/4] tools/libxendevicemodel: extract functions and add a compat layer Paul Durrant
2017-02-20 15:09 ` Wei Liu
2017-02-20 15:15 ` Paul Durrant
2017-02-17 10:27 ` [PATCH 3/4] tools/libxendevicemodel: introduce a Linux-specific implementation Paul Durrant
2017-02-20 15:09 ` Wei Liu
2017-02-17 10:27 ` [PATCH 4/4] tools/libxendevicemodel: add a call to restrict the handle Paul Durrant
2017-02-20 15:09 ` Wei Liu
2017-02-20 15:07 ` [PATCH 1/4] tools/libxendevicemodel: introduce the new library Wei Liu
2017-02-20 15:11 ` Paul Durrant [this message]
2017-02-20 15:12 ` Wei Liu
2017-02-20 15:14 ` Paul Durrant
2017-02-20 15:20 ` Wei Liu
2017-02-21 21:59 ` Samuel Thibault
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=8d8b91ae198a4113ae128ba6c75bfa8e@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).