[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 12/24] Implement gnttab on NetBSD


  • To: Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 4 Jan 2021 18:24:11 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hnUAMHaoljILWgfC+ylf5X6xuslvAkjPN2r+eA3ot9Y=; b=SQzZ+GsalsLRSjewbPPyYQoXzi7bHnZBL2VyODYFleqofNcC4jQsSbi/9D0XvhO09p7yIUgXwIImUXqb9m6fH1uppr3Z6aV+28sJMiRbn9EdCCvU84GwNCVF7d61XTXSfX5sTUue5hVOZWliTj67F9VvK3feYHAw4ZJ8nF2c7rMucrpImqdto323Jt6icEjq1cbjavYSAnNNS8iC0LNRgeH7teNK2tpdM84TgVqZJ6416xnMVe4I+C+4/VBSSIJPSgGRSqNs5XyNtWj/bYMu6lTsHU0mgsnPYvwMEGQdlr7hrSJoWKkbHkMYmvqzHZ2BkJpND/Nj4lMQyo8PxKCbkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I3P+fYmnQh7LBR+CieJQOYx7gCNI7LaHSyROEu3N6dZtNjz/2AhrgXZmwz0e5Gn42Du79hKgRow12qbdNNw4Q95bucI7+siFFa9o8ePyzLk94UzFCjPqXhkbFuf4nEP0/BJ3eGxlnBBsFA++/YsKntjhoQZ6GHv4UWjkavh4FaJFYWhiQJGy8Jc9lPv/4tqPuBA2p8FpjMvDmvfNqu3zAkUFJ4xyn20zfRVvZhf68zxJU+3zSnQPk3Pm73MfasIffUtul/hbqbYlz8AKXqwaYLnxH84KfDpXUbIqYa9/cAfNplAunsdQIJSoaZ5TfPHuTmbLOB06SNhxFR+IQ7hajg==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 04 Jan 2021 17:24:23 +0000
  • Ironport-sdr: gzSaRCWrXe/bCF564QU+wyEPzXkrRarQGp9kK6LFqJF+HIr3bkD/UBHfjPKCfc1PwlHd1vDr4f 4Lzx9OzZIJZHr0/NuBtdzPcR73aR/CFIQC1l5GJNp+qX+hWJgsOBJK0fDQRaW+SOS7nv5cUuso daBGuV1cLZOHk7MClIDRNMQ2Oi5Q3eIYTBuuSeIko5YXqSwwsanpVLaXBKm8qEZGL+zqT1UVkb Vqbog+LFYsvYz+gBfYZIUagP02z8SE0A93zTKvYF1FXwiWQQmpjEFwZg9lvqhXUzEkIwIdoIlc q2g=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Jan 04, 2021 at 11:29:51AM +0100, Manuel Bouyer wrote:
> On Tue, Dec 29, 2020 at 12:16:01PM +0100, Roger Pau Monné wrote:
> > Might need some kind of log message, and will also required your
> > Signed-off-by (or from the original author of the patch).
> > 
> > On Mon, Dec 14, 2020 at 05:36:11PM +0100, Manuel Bouyer wrote:
> > > ---
> > >  tools/libs/gnttab/Makefile |   2 +-
> > >  tools/libs/gnttab/netbsd.c | 267 +++++++++++++++++++++++++++++++++++++
> > >  2 files changed, 268 insertions(+), 1 deletion(-)
> > >  create mode 100644 tools/libs/gnttab/netbsd.c
> > > 
> > > diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile
> > > index d86c49d243..ae390ce60f 100644
> > > --- a/tools/libs/gnttab/Makefile
> > > +++ b/tools/libs/gnttab/Makefile
> > > @@ -10,7 +10,7 @@ SRCS-GNTSHR            += gntshr_core.c
> > >  SRCS-$(CONFIG_Linux)   += $(SRCS-GNTTAB) $(SRCS-GNTSHR) linux.c
> > >  SRCS-$(CONFIG_MiniOS)  += $(SRCS-GNTTAB) gntshr_unimp.c minios.c
> > >  SRCS-$(CONFIG_FreeBSD) += $(SRCS-GNTTAB) $(SRCS-GNTSHR) freebsd.c
> > > +SRCS-$(CONFIG_NetBSD)  += $(SRCS-GNTTAB) $(SRCS-GNTSHR) netbsd.c
> > >  SRCS-$(CONFIG_SunOS)   += gnttab_unimp.c gntshr_unimp.c
> > > -SRCS-$(CONFIG_NetBSD)  += gnttab_unimp.c gntshr_unimp.c
> > >  
> > >  include $(XEN_ROOT)/tools/libs/libs.mk
> > > diff --git a/tools/libs/gnttab/netbsd.c b/tools/libs/gnttab/netbsd.c
> > > new file mode 100644
> > > index 0000000000..2df7058cd7
> > > --- /dev/null
> > > +++ b/tools/libs/gnttab/netbsd.c
> > 
> > I think this is mostly (if not equal) to the FreeBSD version, in which
> > case we could rename freebsd.c to plain bsd.c and use it for
> > both FreeBSD and NetBSD?
> 
> I can't see why they won't diverge in the future ...

True, but then let's diverge when we have to cross that bridge I would
say.

There's IMO no point in having two verbatim copies of the same code in
different places, it's just more churn to maintain and to remember to
apply duplicate fixes.

Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.