xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: Oldest supported Xen version in upstream QEMU (Was: Re: [Minios-devel] [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries)
Date: Fri, 25 Sep 2015 09:27:36 +0100	[thread overview]
Message-ID: <1443169656.25250.36.camel@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1509242318050.2672@kaball.uk.xensource.com>

On Thu, 2015-09-24 at 23:19 +0100, Stefano Stabellini wrote:
> On Thu, 24 Sep 2015, Ian Campbell wrote:
> > On Thu, 2015-09-24 at 20:33 +0100, Stefano Stabellini wrote:
> > > On Thu, 24 Sep 2015, Ian Campbell wrote:
> > > > On Wed, 2015-09-23 at 18:36 +0100, Stefano Stabellini wrote:
> > > > > On Wed, 23 Sep 2015, Ian Campbell wrote:
> > > > > > On Tue, 2015-09-22 at 22:31 +0100, Stefano Stabellini wrote: 
> > > > > > > The oldest Xen version I build-test for every pull request is
> > > Xen 4.0.0,
> > > > 
> > > > I setup a build trees for 4.0 thru 4.6 yesterday to test this, what
> > > a
> > > > pain 4.1 and 4.0 are to build with a modern gcc! (Mostly newer
> > > compiler
> > > > warnings and mostly, but not all, fixes which I could just backport
> > > > from newer Xen, the exceptions were a couple of things which were
> > > > removed before they needed to be fixed)
> > > > 
> > > > > > > I think it is very reasonable to remove anything older than
> > > that.
> > > > > > > I am OK with removing Xen 4.0.0 too, but I would like a
> > > warning to be
> > > > > > > sent ahead of time to qemu-devel to see if anybody complains.
> > > > > > 
> > > > > > There is not much point in removing <=3.4 support and keeping
> > > 4.0, since
> > > > > > 4.0.0 was the last one which used a plain int as a handle,
> > > anything older
> > > > > > than 4.0.0 is trivial if 4.0.0 is supported.
> > > > > > 
> > > > > > One approach I am considering in order to keep 4.0.0 support
> > > and earlier
> > > > > > was to turn the "int fd" for <=4.0 into a pointer by having the
> > > open
> > > > > > wrapper do malloc(sizeof int) and the using wrappers do
> > > xc_foo(*handle).
> > > > > > 
> > > > > > This way all the different variants take pointers and we have
> > > less hoops to
> > > > > > jump through to typedef everything in the correct way for each
> > > variant.
> > > > > > 
> > > > > > If you would rather avoid doing that then I think dropping
> > > 4.0.0 support
> > > > > > would be the way to go and I'll send a mail to qemu-devel.
> > > > >  
> > > > > I would rather drop 4.0 support.
> > > > 
> > > > Supporting 4.0 didn't turn out quite as ugly as I had feared.
> > > > 
> > > > So before I send an email to qemu-devel to propose dropping 4.0
> > > what do
> > > > you think of the following which handles the evtchn case, there is
> > > a
> > > > similar patch for gnttab and a (yet to be written) patch for the
> > > > foreign memory mapping case.
> > > > 
> > > > The relevant bit for this discussion is the 4.0.0 definition of
> > > > xenevtchn_open in xen_common.h, the rest is just adjusting it to
> > > use
> > > > the API of the new library (for reasons explained in the commit
> > > > message).
> > > 
> > > I think that it is OK in principle.
> > > 
> > > 
> > > > diff --git a/include/hw/xen/xen_common.h
> > > b/include/hw/xen/xen_common.h
> > > > index 5923290..5700c1b 100644
> > > > --- a/include/hw/xen/xen_common.h
> > > > +++ b/include/hw/xen/xen_common.h
> > > > @@ -39,17 +39,37 @@ static inline void *xc_map_foreign_bulk(int
> > > xc_handle, uint32_t dom, int prot,
> > > >  #if CONFIG_XEN_CTRL_INTERFACE_VERSION < 410
> > > >  
> > > >  typedef int XenXC;
> > > > -typedef int XenEvtchn;
> > > > +typedef int xenevtchn_handle;
> > > >  typedef int XenGnttab;
> > >  
> > > ...
> > > 
> > > > @@ -108,17 +128,20 @@ static inline void xs_close(struct xs_handle
> > > *xsh)
> > > >  #else
> > > >  
> > > >  typedef xc_interface *XenXC;
> > > > -typedef xc_evtchn *XenEvtchn;
> > > > +typedef xc_evtchn xenevtchn_handle;
> > > >  typedef xc_gnttab *XenGnttab;
> > > >  
> > > 
> > > There is no reasons why we couldn't have a small compat shim on Xen >
> > > 4.6 too, so I would change the definition of XenEvtchn for newer
> > > versions of Xen and avoid some of the renaming in this patch to
> > > reduce
> > > the changes.
> > > 
> > > For example, why not define xc_evtchn_fd as xenevtchn_fd for Xen >
> > > 4.6?
> > > So that we don't need to go and rename all the call sites?
> > 
> > The idea was that the code would use the new stable API names from the
> > stable libraries going forward, rather than using a shim to turn the
> > stable APIs back into the old ones.
> 
> I don't think that is very important from QEMU's point of view, using a
> shim is just fine, especially if it reduces the patch size to 5 lines of
> code :-)

Is patch size really the major consideration here? IMHO it is simply less
confusing to have no shim (since one doesn't need to translate the names
when reading differing code bases) and with time the shim layers can drop
away leading to less complexity.

Also, I've already written all the patches, the renamings were very
mechanical and at this point it would actually take me longer to undo them.

I'll do that if you insist, but I think the justification for sticking with
a shim is very flimsy.

Ian.

  reply	other threads:[~2015-09-25  8:27 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 15:46 [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 01/15] docs: Partial toolstack library API/ABI stabilisation Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 02/15] tools/Rules.mk: Properly handle libraries with recursive dependcies Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 03/15] tools: Refactor "xentoollog" into its own library Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 04/15] tools/libxc: Remove osdep indirection for xc_evtchn Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 05/15] tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn Ian Campbell
2015-09-21 15:53   ` Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 06/15] tools: Arrange to check public headers for ANSI compatiblity Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 07/15] tools/libxc: Remove osdep indirection for xc_gnt{shr, tab} Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 08/15] tools: Refactor /dev/xen/gnt{dev, shr} wrappers into libxengnttab Ian Campbell
2015-09-22 11:25   ` Ian Campbell
2015-09-22 11:36     ` Andrew Cooper
2015-09-22 12:41       ` Ian Jackson
2015-09-22 12:51         ` Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 09/15] tools/libxc: Remove osdep indirection for privcmd Ian Campbell
     [not found]   ` <01C96D24-A13F-46A6-A8A9-5C04E2E199AF@citrix.com>
2015-07-16  7:59     ` Dave Scott
2015-07-16  8:35       ` Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 10/15] tools: Refactor hypercall calling wrappers into libxencall Ian Campbell
2015-07-15 15:46 ` [PATCH XEN v2 11/15] tools/libxc: drop xc_map_foreign_bulk_compat wrappers Ian Campbell
2015-07-15 15:47 ` [PATCH XEN v2 12/15] tools: Remove xc_map_foreign_batch Ian Campbell
2015-07-15 16:08   ` George Dunlap
2015-07-15 15:47 ` [PATCH XEN v2 13/15] tools: Implement xc_map_foreign_range(s) in terms of common helper Ian Campbell
2015-07-15 15:47 ` [PATCH XEN v2 14/15] tools: Refactor foreign memory mapping into libxenforeignmemory Ian Campbell
2015-07-15 15:47 ` [PATCH XEN v2 15/15] HACK: Add a .config to pull all the right bits Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 1/5] qemu-xen-traditional: Use xentoollog as a separate library Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 2/5] qemu-xen-traditional: Use libxenevtchn Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 3/5] qemu-xen-traditional: Use libxengnttab Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 4/5] qemu-xen-traditional: Add libxencall to rpath-link Ian Campbell
2015-07-15 15:47 ` [PATCH QEMUT v2 5/5] qemu-xen-traditional: Add libxenforeignmemory " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 1/5] mini-os: Include libxentoollog with libxc Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 2/5] mini-os: Include libxenevtchn " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 3/5] mini-os: Include libxengnttab " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 4/5] mini-os: Include libxencall " Ian Campbell
2015-07-15 15:48 ` [PATCH MINI-OS v2 5/5] mini-os: Include libxenforeignmemory " Ian Campbell
2015-07-15 15:53 ` [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries Andrew Cooper
2015-07-22 11:12   ` Ian Campbell
2015-07-22 12:58     ` Andrew Cooper
2015-07-22 13:05       ` Ian Campbell
2015-07-27  8:57     ` Ian Campbell
2015-09-22 15:03 ` Oldest supported Xen version in upstream QEMU (Was: Re: [Minios-devel] [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries) Ian Campbell
2015-09-22 21:31   ` Stefano Stabellini
2015-09-23  8:29     ` Ian Campbell
2015-09-23 14:09       ` Konrad Rzeszutek Wilk
2015-09-23 14:17         ` Juergen Gross
2015-09-23 14:21           ` Konrad Rzeszutek Wilk
2015-09-23 14:26             ` Ian Campbell
2015-09-23 17:36       ` Stefano Stabellini
2015-09-24  7:15         ` Ian Campbell
2015-09-24  9:03           ` Fabio Fantoni
2015-09-24 19:33           ` Stefano Stabellini
2015-09-24 21:11             ` Ian Campbell
2015-09-24 22:19               ` Stefano Stabellini
2015-09-25  8:27                 ` Ian Campbell [this message]
2015-09-25 20:31                   ` Stefano Stabellini
2015-09-24 16:47 ` [Minios-devel] [PATCH v2 0/15+5+5] Begin to disentangle libxenctrl and provide some stable libraries Ian Campbell

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=1443169656.25250.36.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --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;
as well as URLs for NNTP newsgroup(s).