[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, 11 Jan 2021 18:04:41 +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=q8GT9nWdKrqVquB2JAJVotLQcqVdBNo/f/slwfxYONE=; b=XeE8kxc0dEGivdglAkqXPRe2KJBvLJWj2FfAx3SgNBytzRrAQETm0zJOyXXwF57IMpgkjQERrMIk/Gk2q2QfBXV2clVIm7ZKPOVP0U4jSrdzi8x3FCqpcNlqCoJcwvkaGdVmcQ57O5q0FdWwJwsXKgZ1gguV3sfnXK/A+fT2oZt4DmgVKqxZ5AbEI3k0MTwRQUuxZPAbJWlk1Bhz7Msdo62clpZekbO03QT9VYv3thfYcZg7VtGNcYuJ9WE2KSpcJzKbxGlGTViYR4X05kQeOK1HZ9gYPf2fBRdbkLlRnMjLJLr8sEBQiENgvZZ+jToINiukUIOG1h/2r/BRZpyanQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NOkZM4acDPbKfSQgKUo/PKxEwOtiN/1orcB6tGsEud/YXlu7IBLtYetz8Q7uLiJO6ALeIwpEIUbzY9v+EyHcxtPp6JsO87alM/fue6eLIiFcau4Jc1YGJc8iWBdzFg0CPup/Dn0xYaBizfTIE2WK/JHKBArU40a1f3EQlsMjKlfISUwFOPaPGj4yJcMOtAzUzZLQhkWQhJEm/IRzK4o1mDgFwYXJ2IdW+LufOCvApVTFqNw2qBkYUWd/e4+lQL+LqoU5fpvVrcoRs1BjLPLIK2B9ExXPXp9z/73O0yAMB2uVam/Rlm2CGKhCl1eEor2UyJZYy3L1TDEEDHf2V1q9hg==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 11 Jan 2021 17:04:59 +0000
  • Ironport-sdr: SJHqcfI/mAEhNTFc01dVLezf84StVhUqPeZa3Jx2cudJGxRKof6gITcG4JZ2VeWfrCcQMlNBTL iw9EzoeaXA7pELDK5HkKDsyRRoMBrnEisPoSiw97FT5cPGvPinR9kE81fygfCpHSRgXQTjpjkY JqNsR/CRboVcy/hCRdeJI8RD5ZTzF/PVo8nyzQqqn3Pv+cugRSUMnvh1Y+2DYHjVXmFx0T17B5 Ua/l3Mr1ceiDVvAfmjmu1b9+lC2D3t3JP8ayJsecKkuqesB1QKwYzHPu4PGBhZ3ZGD4S+xYAFZ MME=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Sun, Jan 10, 2021 at 01:40:50PM +0100, Manuel Bouyer wrote:
> On Mon, Jan 04, 2021 at 06:24:11PM +0100, Roger Pau Monné wrote:
> > 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.
> 
> Actually I just checked, the files are quite different, because the
> GNTTAB ioctls are not the same, and it seems they don't work the same way
> either. FreeBSD does mmap against the gnttab device; this is not supported
> on NetBSD. Merging the two would cause an #ifdef maze.

Ack, my bad. Then it's fine. I got to think they where the same by the
copyright message.

Thanks, Roger.



 


Rackspace

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