[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 12/24] Implement gnttab on NetBSD
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. -- Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx> NetBSD: 26 ans d'experience feront toujours la difference --
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |