diff options
Diffstat (limited to 'tools/libxc/xc_solaris.c')
-rw-r--r-- | tools/libxc/xc_solaris.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c index cdcc2222c4..8152868e7c 100644 --- a/tools/libxc/xc_solaris.c +++ b/tools/libxc/xc_solaris.c @@ -74,12 +74,14 @@ static int solaris_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privc return ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall); } -void *xc_map_foreign_batch(xc_interface *xch, uint32_t dom, int prot, - xen_pfn_t *arr, int num) +static void *solaris_privcmd_map_foreign_batch(xc_interface *xch, xc_osdep_handle h, + uint32_t dom, int prot, + xen_pfn_t *arr, int num) { + int fd = (int)h; privcmd_mmapbatch_t ioctlx; void *addr; - addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_SHARED, xch->fd, 0); + addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_SHARED, fd, 0); if ( addr == MAP_FAILED ) return NULL; @@ -87,7 +89,7 @@ void *xc_map_foreign_batch(xc_interface *xch, uint32_t dom, int prot, ioctlx.dom=dom; ioctlx.addr=(unsigned long)addr; ioctlx.arr=arr; - if ( ioctl(xch->fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 ) + if ( ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 ) { int saved_errno = errno; PERROR("XXXXXXXX"); @@ -168,6 +170,9 @@ static struct xc_osdep_ops solaris_privcmd_ops = { .u.privcmd = { .hypercall = &solaris_privcmd_hypercall; + + .map_foreign_batch = &solaris_privcmd_map_foreign_batch, + .map_foreign_bulk = &xc_map_foreign_bulk_compat, }, }; |