[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 11/24] Implement foreignmemory on NetBSD
On Tue, Dec 29, 2020 at 01:46:30PM +0100, Roger Pau Monné wrote: > [...] > > diff --git a/tools/libs/foreignmemory/private.h > > b/tools/libs/foreignmemory/private.h > > index 8f1bf081ed..abeceb8720 100644 > > --- a/tools/libs/foreignmemory/private.h > > +++ b/tools/libs/foreignmemory/private.h > > @@ -8,7 +8,13 @@ > > #include <xentoolcore_internal.h> > > > > #include <xen/xen.h> > > + > > +#ifdef __NetBSD__ > > +#include <xen/xen.h> > > +#include <xen/xenio.h> > > +#else > > #include <xen/sys/privcmd.h> > > +#endif > > > > #ifndef PAGE_SHIFT /* Mini-os, Yukk */ > > #define PAGE_SHIFT 12 > > @@ -38,7 +44,7 @@ int osdep_xenforeignmemory_unmap(xenforeignmemory_handle > > *fmem, > > > > #if defined(__NetBSD__) || defined(__sun__) > > /* Strictly compat for those two only only */ > > -void *compat_mapforeign_batch(xenforeignmem_handle *fmem, uint32_t dom, > > +void *osdep_map_foreign_batch(xenforeignmemory_handle *fmem, uint32_t dom, > > void *addr, int prot, int flags, > > xen_pfn_t *arr, int num); > > You will have to split this into NetBSD and Solaris variants now if > this is really required, but AFAICT you replace > osdep_map_foreign_batch with osdep_xenforeignmemory_map, so this > prototype is stale? I think on solaris too, compat_mapforeign_batch() has to be changed to osdep_map_foreign_batch() as compat.c and solaris.c has something called osdep_map_foreign_batch(), but nothing defines compat_mapforeign_batch(). Looks like a rename that missed private.h Indeed osdep_map_foreign_batch() should not be needed on NetBSD now > > Also a little bit below these prototypes are the dummy implementations > of osdep_xenforeignmemory_restrict, > osdep_xenforeignmemory_map_resource and > osdep_xenforeignmemory_unmap_resource. I think you at least need to > modify the condition below so that on NetBSD the dummy inlines are not > used? This is !defined(__NetBSD__) so it should not be used ? -- Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx> NetBSD: 26 ans d'experience feront toujours la difference --
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |