ia64/xen-unstable

changeset 16900:69b8816b5c8c

Move xen/sys parts down to tools/include/xen-sys.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Jan 26 14:42:55 2008 +0000 (2008-01-26)
parents 221b867ee084
children b8ec663b0f6b
files tools/include/Linux/evtchn.h tools/include/Linux/gntdev.h tools/include/Linux/privcmd.h tools/include/Makefile tools/include/NetBSD/evtchn.h tools/include/NetBSD/privcmd.h tools/include/SunOS/evtchn.h tools/include/SunOS/privcmd.h tools/include/SunOS/xenbus.h tools/include/xen-sys/Linux/evtchn.h tools/include/xen-sys/Linux/gntdev.h tools/include/xen-sys/Linux/privcmd.h tools/include/xen-sys/NetBSD/evtchn.h tools/include/xen-sys/NetBSD/privcmd.h tools/include/xen-sys/SunOS/evtchn.h tools/include/xen-sys/SunOS/privcmd.h tools/include/xen-sys/SunOS/xenbus.h
line diff
     1.1 --- a/tools/include/Linux/evtchn.h	Sat Jan 26 14:42:03 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,88 +0,0 @@
     1.4 -/******************************************************************************
     1.5 - * evtchn.h
     1.6 - * 
     1.7 - * Interface to /dev/xen/evtchn.
     1.8 - * 
     1.9 - * Copyright (c) 2003-2005, K A Fraser
    1.10 - * 
    1.11 - * This program is free software; you can redistribute it and/or
    1.12 - * modify it under the terms of the GNU General Public License version 2
    1.13 - * as published by the Free Software Foundation; or, when distributed
    1.14 - * separately from the Linux kernel or incorporated into other
    1.15 - * software packages, subject to the following license:
    1.16 - * 
    1.17 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    1.18 - * of this source file (the "Software"), to deal in the Software without
    1.19 - * restriction, including without limitation the rights to use, copy, modify,
    1.20 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    1.21 - * and to permit persons to whom the Software is furnished to do so, subject to
    1.22 - * the following conditions:
    1.23 - * 
    1.24 - * The above copyright notice and this permission notice shall be included in
    1.25 - * all copies or substantial portions of the Software.
    1.26 - * 
    1.27 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.28 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.29 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.30 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.31 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    1.32 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    1.33 - * IN THE SOFTWARE.
    1.34 - */
    1.35 -
    1.36 -#ifndef __LINUX_PUBLIC_EVTCHN_H__
    1.37 -#define __LINUX_PUBLIC_EVTCHN_H__
    1.38 -
    1.39 -/*
    1.40 - * Bind a fresh port to VIRQ @virq.
    1.41 - * Return allocated port.
    1.42 - */
    1.43 -#define IOCTL_EVTCHN_BIND_VIRQ				\
    1.44 -	_IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
    1.45 -struct ioctl_evtchn_bind_virq {
    1.46 -	unsigned int virq;
    1.47 -};
    1.48 -
    1.49 -/*
    1.50 - * Bind a fresh port to remote <@remote_domain, @remote_port>.
    1.51 - * Return allocated port.
    1.52 - */
    1.53 -#define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
    1.54 -	_IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
    1.55 -struct ioctl_evtchn_bind_interdomain {
    1.56 -	unsigned int remote_domain, remote_port;
    1.57 -};
    1.58 -
    1.59 -/*
    1.60 - * Allocate a fresh port for binding to @remote_domain.
    1.61 - * Return allocated port.
    1.62 - */
    1.63 -#define IOCTL_EVTCHN_BIND_UNBOUND_PORT			\
    1.64 -	_IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
    1.65 -struct ioctl_evtchn_bind_unbound_port {
    1.66 -	unsigned int remote_domain;
    1.67 -};
    1.68 -
    1.69 -/*
    1.70 - * Unbind previously allocated @port.
    1.71 - */
    1.72 -#define IOCTL_EVTCHN_UNBIND				\
    1.73 -	_IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
    1.74 -struct ioctl_evtchn_unbind {
    1.75 -	unsigned int port;
    1.76 -};
    1.77 -
    1.78 -/*
    1.79 - * Unbind previously allocated @port.
    1.80 - */
    1.81 -#define IOCTL_EVTCHN_NOTIFY				\
    1.82 -	_IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
    1.83 -struct ioctl_evtchn_notify {
    1.84 -	unsigned int port;
    1.85 -};
    1.86 -
    1.87 -/* Clear and reinitialise the event buffer. Clear error condition. */
    1.88 -#define IOCTL_EVTCHN_RESET				\
    1.89 -	_IOC(_IOC_NONE, 'E', 5, 0)
    1.90 -
    1.91 -#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
     2.1 --- a/tools/include/Linux/gntdev.h	Sat Jan 26 14:42:03 2008 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,105 +0,0 @@
     2.4 -/******************************************************************************
     2.5 - * gntdev.h
     2.6 - * 
     2.7 - * Interface to /dev/xen/gntdev.
     2.8 - * 
     2.9 - * Copyright (c) 2007, D G Murray
    2.10 - * 
    2.11 - * This program is free software; you can redistribute it and/or
    2.12 - * modify it under the terms of the GNU General Public License version 2
    2.13 - * as published by the Free Software Foundation; or, when distributed
    2.14 - * separately from the Linux kernel or incorporated into other
    2.15 - * software packages, subject to the following license:
    2.16 - * 
    2.17 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    2.18 - * of this source file (the "Software"), to deal in the Software without
    2.19 - * restriction, including without limitation the rights to use, copy, modify,
    2.20 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    2.21 - * and to permit persons to whom the Software is furnished to do so, subject to
    2.22 - * the following conditions:
    2.23 - * 
    2.24 - * The above copyright notice and this permission notice shall be included in
    2.25 - * all copies or substantial portions of the Software.
    2.26 - * 
    2.27 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    2.28 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    2.29 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    2.30 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    2.31 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    2.32 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    2.33 - * IN THE SOFTWARE.
    2.34 - */
    2.35 -
    2.36 -#ifndef __LINUX_PUBLIC_GNTDEV_H__
    2.37 -#define __LINUX_PUBLIC_GNTDEV_H__
    2.38 -
    2.39 -struct ioctl_gntdev_grant_ref {
    2.40 -	/* The domain ID of the grant to be mapped. */
    2.41 -	uint32_t domid;
    2.42 -	/* The grant reference of the grant to be mapped. */
    2.43 -	uint32_t ref;
    2.44 -};
    2.45 -
    2.46 -/*
    2.47 - * Inserts the grant references into the mapping table of an instance
    2.48 - * of gntdev. N.B. This does not perform the mapping, which is deferred
    2.49 - * until mmap() is called with @index as the offset.
    2.50 - */
    2.51 -#define IOCTL_GNTDEV_MAP_GRANT_REF \
    2.52 -_IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
    2.53 -struct ioctl_gntdev_map_grant_ref {
    2.54 -	/* IN parameters */
    2.55 -	/* The number of grants to be mapped. */
    2.56 -	uint32_t count;
    2.57 -	uint32_t pad;
    2.58 -	/* OUT parameters */
    2.59 -	/* The offset to be used on a subsequent call to mmap(). */
    2.60 -	uint64_t index;
    2.61 -	/* Variable IN parameter. */
    2.62 -	/* Array of grant references, of size @count. */
    2.63 -	struct ioctl_gntdev_grant_ref refs[1];
    2.64 -};
    2.65 -
    2.66 -/*
    2.67 - * Removes the grant references from the mapping table of an instance of
    2.68 - * of gntdev. N.B. munmap() must be called on the relevant virtual address(es)
    2.69 - * before this ioctl is called, or an error will result.
    2.70 - */
    2.71 -#define IOCTL_GNTDEV_UNMAP_GRANT_REF \
    2.72 -_IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))       
    2.73 -struct ioctl_gntdev_unmap_grant_ref {
    2.74 -	/* IN parameters */
    2.75 -	/* The offset was returned by the corresponding map operation. */
    2.76 -	uint64_t index;
    2.77 -	/* The number of pages to be unmapped. */
    2.78 -	uint32_t count;
    2.79 -	uint32_t pad;
    2.80 -};
    2.81 -
    2.82 -/*
    2.83 - * Returns the offset in the driver's address space that corresponds
    2.84 - * to @vaddr. This can be used to perform a munmap(), followed by an
    2.85 - * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by
    2.86 - * the caller. The number of pages that were allocated at the same time as
    2.87 - * @vaddr is returned in @count.
    2.88 - *
    2.89 - * N.B. Where more than one page has been mapped into a contiguous range, the
    2.90 - *      supplied @vaddr must correspond to the start of the range; otherwise
    2.91 - *      an error will result. It is only possible to munmap() the entire
    2.92 - *      contiguously-allocated range at once, and not any subrange thereof.
    2.93 - */
    2.94 -#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
    2.95 -_IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
    2.96 -struct ioctl_gntdev_get_offset_for_vaddr {
    2.97 -	/* IN parameters */
    2.98 -	/* The virtual address of the first mapped page in a range. */
    2.99 -	uint64_t vaddr;
   2.100 -	/* OUT parameters */
   2.101 -	/* The offset that was used in the initial mmap() operation. */
   2.102 -	uint64_t offset;
   2.103 -	/* The number of pages mapped in the VM area that begins at @vaddr. */
   2.104 -	uint32_t count;
   2.105 -	uint32_t pad;
   2.106 -};
   2.107 -
   2.108 -#endif /* __LINUX_PUBLIC_GNTDEV_H__ */
     3.1 --- a/tools/include/Linux/privcmd.h	Sat Jan 26 14:42:03 2008 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,79 +0,0 @@
     3.4 -/******************************************************************************
     3.5 - * privcmd.h
     3.6 - * 
     3.7 - * Interface to /proc/xen/privcmd.
     3.8 - * 
     3.9 - * Copyright (c) 2003-2005, K A Fraser
    3.10 - * 
    3.11 - * This program is free software; you can redistribute it and/or
    3.12 - * modify it under the terms of the GNU General Public License version 2
    3.13 - * as published by the Free Software Foundation; or, when distributed
    3.14 - * separately from the Linux kernel or incorporated into other
    3.15 - * software packages, subject to the following license:
    3.16 - * 
    3.17 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    3.18 - * of this source file (the "Software"), to deal in the Software without
    3.19 - * restriction, including without limitation the rights to use, copy, modify,
    3.20 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    3.21 - * and to permit persons to whom the Software is furnished to do so, subject to
    3.22 - * the following conditions:
    3.23 - * 
    3.24 - * The above copyright notice and this permission notice shall be included in
    3.25 - * all copies or substantial portions of the Software.
    3.26 - * 
    3.27 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    3.28 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    3.29 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    3.30 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    3.31 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    3.32 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    3.33 - * IN THE SOFTWARE.
    3.34 - */
    3.35 -
    3.36 -#ifndef __LINUX_PUBLIC_PRIVCMD_H__
    3.37 -#define __LINUX_PUBLIC_PRIVCMD_H__
    3.38 -
    3.39 -#include <linux/types.h>
    3.40 -
    3.41 -#ifndef __user
    3.42 -#define __user
    3.43 -#endif
    3.44 -
    3.45 -typedef struct privcmd_hypercall
    3.46 -{
    3.47 -	__u64 op;
    3.48 -	__u64 arg[5];
    3.49 -} privcmd_hypercall_t;
    3.50 -
    3.51 -typedef struct privcmd_mmap_entry {
    3.52 -	__u64 va;
    3.53 -	__u64 mfn;
    3.54 -	__u64 npages;
    3.55 -} privcmd_mmap_entry_t; 
    3.56 -
    3.57 -typedef struct privcmd_mmap {
    3.58 -	int num;
    3.59 -	domid_t dom; /* target domain */
    3.60 -	privcmd_mmap_entry_t __user *entry;
    3.61 -} privcmd_mmap_t; 
    3.62 -
    3.63 -typedef struct privcmd_mmapbatch {
    3.64 -	int num;     /* number of pages to populate */
    3.65 -	domid_t dom; /* target domain */
    3.66 -	__u64 addr;  /* virtual address */
    3.67 -	xen_pfn_t __user *arr; /* array of mfns - top nibble set on err */
    3.68 -} privcmd_mmapbatch_t; 
    3.69 -
    3.70 -/*
    3.71 - * @cmd: IOCTL_PRIVCMD_HYPERCALL
    3.72 - * @arg: &privcmd_hypercall_t
    3.73 - * Return: Value returned from execution of the specified hypercall.
    3.74 - */
    3.75 -#define IOCTL_PRIVCMD_HYPERCALL					\
    3.76 -	_IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
    3.77 -#define IOCTL_PRIVCMD_MMAP					\
    3.78 -	_IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
    3.79 -#define IOCTL_PRIVCMD_MMAPBATCH					\
    3.80 -	_IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
    3.81 -
    3.82 -#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
     4.1 --- a/tools/include/Makefile	Sat Jan 26 14:42:03 2008 +0000
     4.2 +++ b/tools/include/Makefile	Sat Jan 26 14:42:55 2008 +0000
     4.3 @@ -11,7 +11,7 @@ all:
     4.4  	ln -sf ../$(XEN_ROOT)/xen/include/public/COPYING xen
     4.5  	ln -sf $(addprefix ../,$(wildcard $(XEN_ROOT)/xen/include/public/*.h)) xen
     4.6  	ln -sf $(addprefix ../$(XEN_ROOT)/xen/include/public/,arch-ia64 arch-x86 hvm io xsm) xen
     4.7 -	ln -sf ../$(XEN_OS) xen/sys
     4.8 +	ln -sf ../xen-sys/$(XEN_OS) xen/sys
     4.9  	$(MAKE) -C xen-foreign
    4.10  	ln -s ../xen-foreign xen/foreign
    4.11  	touch $@
     5.1 --- a/tools/include/NetBSD/evtchn.h	Sat Jan 26 14:42:03 2008 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,89 +0,0 @@
     5.4 -/* $NetBSD: evtchn.h,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ */
     5.5 -/******************************************************************************
     5.6 - * evtchn.h
     5.7 - * 
     5.8 - * Interface to /dev/xen/evtchn.
     5.9 - * 
    5.10 - * Copyright (c) 2003-2005, K A Fraser
    5.11 - * 
    5.12 - * This file may be distributed separately from the Linux kernel, or
    5.13 - * incorporated into other software packages, subject to the following license:
    5.14 - * 
    5.15 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    5.16 - * of this source file (the "Software"), to deal in the Software without
    5.17 - * restriction, including without limitation the rights to use, copy, modify,
    5.18 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    5.19 - * and to permit persons to whom the Software is furnished to do so, subject to
    5.20 - * the following conditions:
    5.21 - * 
    5.22 - * The above copyright notice and this permission notice shall be included in
    5.23 - * all copies or substantial portions of the Software.
    5.24 - * 
    5.25 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    5.26 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    5.27 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    5.28 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    5.29 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    5.30 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    5.31 - * IN THE SOFTWARE.
    5.32 - */
    5.33 -
    5.34 -#ifndef __NetBSD_EVTCHN_H__
    5.35 -#define __NetBSD_EVTCHN_H__
    5.36 -
    5.37 -/*
    5.38 - * Bind a fresh port to VIRQ @virq.
    5.39 - * Return allocated port.
    5.40 - */
    5.41 -#define IOCTL_EVTCHN_BIND_VIRQ				\
    5.42 -	_IOWR('E', 4, struct ioctl_evtchn_bind_virq)
    5.43 -struct ioctl_evtchn_bind_virq {
    5.44 -	unsigned int virq;
    5.45 -	unsigned int port;
    5.46 -};
    5.47 -
    5.48 -/*
    5.49 - * Bind a fresh port to remote <@remote_domain, @remote_port>.
    5.50 - * Return allocated port.
    5.51 - */
    5.52 -#define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
    5.53 -	_IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
    5.54 -struct ioctl_evtchn_bind_interdomain {
    5.55 -	unsigned int remote_domain, remote_port;
    5.56 -	unsigned int port;
    5.57 -};
    5.58 -
    5.59 -/*
    5.60 - * Allocate a fresh port for binding to @remote_domain.
    5.61 - * Return allocated port.
    5.62 - */
    5.63 -#define IOCTL_EVTCHN_BIND_UNBOUND_PORT			\
    5.64 -	_IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
    5.65 -struct ioctl_evtchn_bind_unbound_port {
    5.66 -	unsigned int remote_domain;
    5.67 -	unsigned int port;
    5.68 -};
    5.69 -
    5.70 -/*
    5.71 - * Unbind previously allocated @port.
    5.72 - */
    5.73 -#define IOCTL_EVTCHN_UNBIND				\
    5.74 -	_IOW('E', 7, struct ioctl_evtchn_unbind)
    5.75 -struct ioctl_evtchn_unbind {
    5.76 -	unsigned int port;
    5.77 -};
    5.78 -
    5.79 -/*
    5.80 - * Send event to previously allocated @port.
    5.81 - */
    5.82 -#define IOCTL_EVTCHN_NOTIFY				\
    5.83 -	_IOW('E', 8, struct ioctl_evtchn_notify)
    5.84 -struct ioctl_evtchn_notify {
    5.85 -	unsigned int port;
    5.86 -};
    5.87 -
    5.88 -/* Clear and reinitialise the event buffer. Clear error condition. */
    5.89 -#define IOCTL_EVTCHN_RESET				\
    5.90 -	_IO('E', 9)
    5.91 -
    5.92 -#endif /* __NetBSD_EVTCHN_H__ */
     6.1 --- a/tools/include/NetBSD/privcmd.h	Sat Jan 26 14:42:03 2008 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,105 +0,0 @@
     6.4 -/*	NetBSD: xenio.h,v 1.3 2005/05/24 12:07:12 yamt Exp $	*/
     6.5 -
     6.6 -/******************************************************************************
     6.7 - * privcmd.h
     6.8 - * 
     6.9 - * Copyright (c) 2003-2004, K A Fraser
    6.10 - * 
    6.11 - * This file may be distributed separately from the Linux kernel, or
    6.12 - * incorporated into other software packages, subject to the following license:
    6.13 - * 
    6.14 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    6.15 - * of this source file (the "Software"), to deal in the Software without
    6.16 - * restriction, including without limitation the rights to use, copy, modify,
    6.17 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    6.18 - * and to permit persons to whom the Software is furnished to do so, subject to
    6.19 - * the following conditions:
    6.20 - * 
    6.21 - * The above copyright notice and this permission notice shall be included in
    6.22 - * all copies or substantial portions of the Software.
    6.23 - * 
    6.24 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    6.25 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    6.26 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    6.27 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    6.28 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    6.29 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    6.30 - * IN THE SOFTWARE.
    6.31 - */
    6.32 -
    6.33 -#ifndef __NetBSD_PRIVCMD_H__
    6.34 -#define __NetBSD_PRIVCMD_H__
    6.35 -
    6.36 -/* Interface to /proc/xen/privcmd */
    6.37 -
    6.38 -typedef struct privcmd_hypercall
    6.39 -{
    6.40 -    unsigned long op;
    6.41 -    unsigned long arg[5];
    6.42 -} privcmd_hypercall_t;
    6.43 -
    6.44 -typedef struct privcmd_mmap_entry {
    6.45 -    unsigned long va;
    6.46 -    unsigned long mfn;
    6.47 -    unsigned long npages;
    6.48 -} privcmd_mmap_entry_t; 
    6.49 -
    6.50 -typedef struct privcmd_mmap {
    6.51 -    int num;
    6.52 -    domid_t dom; /* target domain */
    6.53 -    privcmd_mmap_entry_t *entry;
    6.54 -} privcmd_mmap_t; 
    6.55 -
    6.56 -typedef struct privcmd_mmapbatch {
    6.57 -    int num;     /* number of pages to populate */
    6.58 -    domid_t dom; /* target domain */
    6.59 -    unsigned long addr;  /* virtual address */
    6.60 -    unsigned long *arr; /* array of mfns - top nibble set on err */
    6.61 -} privcmd_mmapbatch_t; 
    6.62 -
    6.63 -typedef struct privcmd_blkmsg
    6.64 -{
    6.65 -    unsigned long op;
    6.66 -    void         *buf;
    6.67 -    int           buf_size;
    6.68 -} privcmd_blkmsg_t;
    6.69 -
    6.70 -/*
    6.71 - * @cmd: IOCTL_PRIVCMD_HYPERCALL
    6.72 - * @arg: &privcmd_hypercall_t
    6.73 - * Return: Value returned from execution of the specified hypercall.
    6.74 - */
    6.75 -#define IOCTL_PRIVCMD_HYPERCALL         \
    6.76 -    _IOWR('P', 0, privcmd_hypercall_t)
    6.77 -
    6.78 -#if defined(_KERNEL)
    6.79 -/* compat */
    6.80 -#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD \
    6.81 -    _IO('P', 1)
    6.82 -#endif /* defined(_KERNEL) */
    6.83 -    
    6.84 -#define IOCTL_PRIVCMD_MMAP             \
    6.85 -    _IOW('P', 2, privcmd_mmap_t)
    6.86 -#define IOCTL_PRIVCMD_MMAPBATCH        \
    6.87 -    _IOW('P', 3, privcmd_mmapbatch_t)
    6.88 -#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
    6.89 -    _IOR('P', 4, unsigned long)
    6.90 -
    6.91 -/*
    6.92 - * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
    6.93 - * @arg: n/a
    6.94 - * Return: Port associated with domain-controller end of control event channel
    6.95 - *         for the initial domain.
    6.96 - */
    6.97 -#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
    6.98 -    _IOR('P', 5, int)
    6.99 -
   6.100 -/* Interface to /dev/xenevt */
   6.101 -/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */
   6.102 -#define EVTCHN_RESET  _IO('E', 1)
   6.103 -/* EVTCHN_BIND: Bind to the specified event-channel port. */
   6.104 -#define EVTCHN_BIND   _IOW('E', 2, unsigned long)
   6.105 -/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
   6.106 -#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
   6.107 -
   6.108 -#endif /* __NetBSD_PRIVCMD_H__ */
     7.1 --- a/tools/include/SunOS/evtchn.h	Sat Jan 26 14:42:03 2008 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,94 +0,0 @@
     7.4 -/******************************************************************************
     7.5 - * evtchn.h
     7.6 - * 
     7.7 - * Interface to /dev/xen/evtchn.
     7.8 - * 
     7.9 - * Copyright (c) 2003-2005, K A Fraser
    7.10 - * 
    7.11 - * This file may be distributed separately from the Linux kernel, or
    7.12 - * incorporated into other software packages, subject to the following license:
    7.13 - * 
    7.14 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    7.15 - * of this source file (the "Software"), to deal in the Software without
    7.16 - * restriction, including without limitation the rights to use, copy, modify,
    7.17 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    7.18 - * and to permit persons to whom the Software is furnished to do so, subject to
    7.19 - * the following conditions:
    7.20 - * 
    7.21 - * The above copyright notice and this permission notice shall be included in
    7.22 - * all copies or substantial portions of the Software.
    7.23 - * 
    7.24 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    7.25 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    7.26 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    7.27 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    7.28 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    7.29 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    7.30 - * IN THE SOFTWARE.
    7.31 - */
    7.32 -
    7.33 -#ifndef _XEN_SYS_EVTCHN_H
    7.34 -#define _XEN_SYS_EVTCHN_H
    7.35 -
    7.36 -#define	_IOC_NONE	0
    7.37 -#define	_IOC(flag, letter, inum, size)	((letter) << 8 | (inum))
    7.38 -
    7.39 -/*
    7.40 - * Bind a fresh port to VIRQ @virq.
    7.41 - * Return allocated port.
    7.42 - */
    7.43 -#define IOCTL_EVTCHN_BIND_VIRQ				\
    7.44 -	_IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
    7.45 -struct ioctl_evtchn_bind_virq {
    7.46 -	unsigned int virq;
    7.47 -};
    7.48 -
    7.49 -/*
    7.50 - * Bind a fresh port to remote <@remote_domain, @remote_port>.
    7.51 - * Return allocated port.
    7.52 - */
    7.53 -#define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
    7.54 -	_IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
    7.55 -struct ioctl_evtchn_bind_interdomain {
    7.56 -	unsigned int remote_domain, remote_port;
    7.57 -};
    7.58 -
    7.59 -/*
    7.60 - * Allocate a fresh port for binding to @remote_domain.
    7.61 - * Return allocated port.
    7.62 - */
    7.63 -#define IOCTL_EVTCHN_BIND_UNBOUND_PORT                  \
    7.64 -        _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
    7.65 -struct ioctl_evtchn_bind_unbound_port {
    7.66 -        unsigned int remote_domain;
    7.67 -};
    7.68 -
    7.69 -/*
    7.70 - * Unbind previously allocated @port.
    7.71 - */
    7.72 -#define IOCTL_EVTCHN_UNBIND				\
    7.73 -	_IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
    7.74 -struct ioctl_evtchn_unbind {
    7.75 -	unsigned int port;
    7.76 -};
    7.77 -
    7.78 -/*
    7.79 - * Notify the given @port.
    7.80 - */
    7.81 -#define IOCTL_EVTCHN_NOTIFY				\
    7.82 -	_IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
    7.83 -struct ioctl_evtchn_notify {
    7.84 -	unsigned int port;
    7.85 -};
    7.86 -
    7.87 -#endif /* _XEN_SYS_EVTCHN_H */
    7.88 -
    7.89 -/*
    7.90 - * Local variables:
    7.91 - *  c-file-style: "solaris"
    7.92 - *  indent-tabs-mode: t
    7.93 - *  c-indent-level: 8
    7.94 - *  c-basic-offset: 8
    7.95 - *  tab-width: 8
    7.96 - * End:
    7.97 - */
     8.1 --- a/tools/include/SunOS/privcmd.h	Sat Jan 26 14:42:03 2008 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,85 +0,0 @@
     8.4 -/*
     8.5 - * Copyright (c) 2003-2005, K A Fraser
     8.6 - *
     8.7 - * This file may be distributed separately from the Linux kernel, or
     8.8 - * incorporated into other software packages, subject to the following license:
     8.9 - *
    8.10 - * Permission is hereby granted, free of charge, to any person obtaining a copy
    8.11 - * of this source file (the "Software"), to deal in the Software without
    8.12 - * restriction, including without limitation the rights to use, copy, modify,
    8.13 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    8.14 - * and to permit persons to whom the Software is furnished to do so, subject to
    8.15 - * the following conditions:
    8.16 - *
    8.17 - * The above copyright notice and this permission notice shall be included in
    8.18 - * all copies or substantial portions of the Software.
    8.19 - *
    8.20 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    8.21 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    8.22 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    8.23 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    8.24 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    8.25 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    8.26 - * IN THE SOFTWARE.
    8.27 - */
    8.28 -
    8.29 -/*
    8.30 - * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    8.31 - * Use is subject to license terms.
    8.32 - */
    8.33 -
    8.34 -#ifndef	_XEN_SYS_PRIVCMD_H
    8.35 -#define	_XEN_SYS_PRIVCMD_H
    8.36 -
    8.37 -/*
    8.38 - * WARNING:
    8.39 - *	These numbers and structure are built into the ON privcmd
    8.40 - *	driver, as well as the low-level tools and libraries in
    8.41 - *	the Xen consolidation.
    8.42 - */
    8.43 -
    8.44 -#include <sys/types.h>
    8.45 -
    8.46 -#ifdef __cplusplus
    8.47 -extern "C" {
    8.48 -#endif
    8.49 -
    8.50 -/*
    8.51 - * ioctl numbers and corresponding data structures
    8.52 - */
    8.53 -
    8.54 -#define	__PRIVCMD_IOC			(('p'<<24)|('r'<<16)|('v'<<8))
    8.55 -
    8.56 -#define	IOCTL_PRIVCMD_HYPERCALL		(__PRIVCMD_IOC|0)
    8.57 -#define	IOCTL_PRIVCMD_MMAP		(__PRIVCMD_IOC|1)
    8.58 -#define	IOCTL_PRIVCMD_MMAPBATCH		(__PRIVCMD_IOC|2)
    8.59 -
    8.60 -typedef struct __privcmd_hypercall {
    8.61 -	unsigned long op;
    8.62 -	unsigned long arg[5];
    8.63 -} privcmd_hypercall_t;
    8.64 -
    8.65 -typedef struct __privcmd_mmap_entry {
    8.66 -	unsigned long va;
    8.67 -	unsigned long mfn;
    8.68 -	unsigned long npages;
    8.69 -} privcmd_mmap_entry_t;
    8.70 -
    8.71 -typedef struct __privcmd_mmap {
    8.72 -	int num;
    8.73 -	domid_t dom;	/* target domain */
    8.74 -	privcmd_mmap_entry_t *entry;
    8.75 -} privcmd_mmap_t;
    8.76 -
    8.77 -typedef struct __privcmd_mmapbatch {
    8.78 -	int num;	/* number of pages to populate */
    8.79 -	domid_t dom;	/* target domain */
    8.80 -	unsigned long addr;	  /* virtual address */
    8.81 -	unsigned long *arr;	  /* array of mfns - top nibble set on err */
    8.82 -} privcmd_mmapbatch_t;
    8.83 -
    8.84 -#ifdef __cplusplus
    8.85 -}
    8.86 -#endif
    8.87 -
    8.88 -#endif /* _XEN_SYS_PRIVCMD_H */
     9.1 --- a/tools/include/SunOS/xenbus.h	Sat Jan 26 14:42:03 2008 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,42 +0,0 @@
     9.4 -/*
     9.5 - * This file may be distributed separately from the Linux kernel, or
     9.6 - * incorporated into other software packages, subject to the following license:
     9.7 - * 
     9.8 - * Permission is hereby granted, free of charge, to any person obtaining a copy
     9.9 - * of this source file (the "Software"), to deal in the Software without
    9.10 - * restriction, including without limitation the rights to use, copy, modify,
    9.11 - * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    9.12 - * and to permit persons to whom the Software is furnished to do so, subject to
    9.13 - * the following conditions:
    9.14 - * 
    9.15 - * The above copyright notice and this permission notice shall be included in
    9.16 - * all copies or substantial portions of the Software.
    9.17 - * 
    9.18 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    9.19 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    9.20 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    9.21 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    9.22 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    9.23 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    9.24 - * IN THE SOFTWARE.
    9.25 - */
    9.26 -
    9.27 -/*
    9.28 - * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    9.29 - * Use is subject to license terms.
    9.30 - */
    9.31 -
    9.32 -#ifndef _XEN_SYS_XENBUS_H
    9.33 -#define _XEN_SYS_XENBUS_H
    9.34 -
    9.35 -/*
    9.36 - * Return the xenstore event channel.
    9.37 - */
    9.38 -#define	IOCTL_XENBUS_XENSTORE_EVTCHN ('X' << 8)
    9.39 -
    9.40 -/*
    9.41 - * Notify the kernel that the xenstore is up and running
    9.42 - */
    9.43 -#define	IOCTL_XENBUS_NOTIFY_UP ('U' << 8)
    9.44 -
    9.45 -#endif /* _XEN_SYS_XENBUS_H */
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/tools/include/xen-sys/Linux/evtchn.h	Sat Jan 26 14:42:55 2008 +0000
    10.3 @@ -0,0 +1,88 @@
    10.4 +/******************************************************************************
    10.5 + * evtchn.h
    10.6 + * 
    10.7 + * Interface to /dev/xen/evtchn.
    10.8 + * 
    10.9 + * Copyright (c) 2003-2005, K A Fraser
   10.10 + * 
   10.11 + * This program is free software; you can redistribute it and/or
   10.12 + * modify it under the terms of the GNU General Public License version 2
   10.13 + * as published by the Free Software Foundation; or, when distributed
   10.14 + * separately from the Linux kernel or incorporated into other
   10.15 + * software packages, subject to the following license:
   10.16 + * 
   10.17 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   10.18 + * of this source file (the "Software"), to deal in the Software without
   10.19 + * restriction, including without limitation the rights to use, copy, modify,
   10.20 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   10.21 + * and to permit persons to whom the Software is furnished to do so, subject to
   10.22 + * the following conditions:
   10.23 + * 
   10.24 + * The above copyright notice and this permission notice shall be included in
   10.25 + * all copies or substantial portions of the Software.
   10.26 + * 
   10.27 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   10.28 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   10.29 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   10.30 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   10.31 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   10.32 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   10.33 + * IN THE SOFTWARE.
   10.34 + */
   10.35 +
   10.36 +#ifndef __LINUX_PUBLIC_EVTCHN_H__
   10.37 +#define __LINUX_PUBLIC_EVTCHN_H__
   10.38 +
   10.39 +/*
   10.40 + * Bind a fresh port to VIRQ @virq.
   10.41 + * Return allocated port.
   10.42 + */
   10.43 +#define IOCTL_EVTCHN_BIND_VIRQ				\
   10.44 +	_IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
   10.45 +struct ioctl_evtchn_bind_virq {
   10.46 +	unsigned int virq;
   10.47 +};
   10.48 +
   10.49 +/*
   10.50 + * Bind a fresh port to remote <@remote_domain, @remote_port>.
   10.51 + * Return allocated port.
   10.52 + */
   10.53 +#define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
   10.54 +	_IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
   10.55 +struct ioctl_evtchn_bind_interdomain {
   10.56 +	unsigned int remote_domain, remote_port;
   10.57 +};
   10.58 +
   10.59 +/*
   10.60 + * Allocate a fresh port for binding to @remote_domain.
   10.61 + * Return allocated port.
   10.62 + */
   10.63 +#define IOCTL_EVTCHN_BIND_UNBOUND_PORT			\
   10.64 +	_IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
   10.65 +struct ioctl_evtchn_bind_unbound_port {
   10.66 +	unsigned int remote_domain;
   10.67 +};
   10.68 +
   10.69 +/*
   10.70 + * Unbind previously allocated @port.
   10.71 + */
   10.72 +#define IOCTL_EVTCHN_UNBIND				\
   10.73 +	_IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
   10.74 +struct ioctl_evtchn_unbind {
   10.75 +	unsigned int port;
   10.76 +};
   10.77 +
   10.78 +/*
   10.79 + * Unbind previously allocated @port.
   10.80 + */
   10.81 +#define IOCTL_EVTCHN_NOTIFY				\
   10.82 +	_IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
   10.83 +struct ioctl_evtchn_notify {
   10.84 +	unsigned int port;
   10.85 +};
   10.86 +
   10.87 +/* Clear and reinitialise the event buffer. Clear error condition. */
   10.88 +#define IOCTL_EVTCHN_RESET				\
   10.89 +	_IOC(_IOC_NONE, 'E', 5, 0)
   10.90 +
   10.91 +#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/tools/include/xen-sys/Linux/gntdev.h	Sat Jan 26 14:42:55 2008 +0000
    11.3 @@ -0,0 +1,105 @@
    11.4 +/******************************************************************************
    11.5 + * gntdev.h
    11.6 + * 
    11.7 + * Interface to /dev/xen/gntdev.
    11.8 + * 
    11.9 + * Copyright (c) 2007, D G Murray
   11.10 + * 
   11.11 + * This program is free software; you can redistribute it and/or
   11.12 + * modify it under the terms of the GNU General Public License version 2
   11.13 + * as published by the Free Software Foundation; or, when distributed
   11.14 + * separately from the Linux kernel or incorporated into other
   11.15 + * software packages, subject to the following license:
   11.16 + * 
   11.17 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   11.18 + * of this source file (the "Software"), to deal in the Software without
   11.19 + * restriction, including without limitation the rights to use, copy, modify,
   11.20 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   11.21 + * and to permit persons to whom the Software is furnished to do so, subject to
   11.22 + * the following conditions:
   11.23 + * 
   11.24 + * The above copyright notice and this permission notice shall be included in
   11.25 + * all copies or substantial portions of the Software.
   11.26 + * 
   11.27 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   11.28 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   11.29 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   11.30 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   11.31 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   11.32 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   11.33 + * IN THE SOFTWARE.
   11.34 + */
   11.35 +
   11.36 +#ifndef __LINUX_PUBLIC_GNTDEV_H__
   11.37 +#define __LINUX_PUBLIC_GNTDEV_H__
   11.38 +
   11.39 +struct ioctl_gntdev_grant_ref {
   11.40 +	/* The domain ID of the grant to be mapped. */
   11.41 +	uint32_t domid;
   11.42 +	/* The grant reference of the grant to be mapped. */
   11.43 +	uint32_t ref;
   11.44 +};
   11.45 +
   11.46 +/*
   11.47 + * Inserts the grant references into the mapping table of an instance
   11.48 + * of gntdev. N.B. This does not perform the mapping, which is deferred
   11.49 + * until mmap() is called with @index as the offset.
   11.50 + */
   11.51 +#define IOCTL_GNTDEV_MAP_GRANT_REF \
   11.52 +_IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
   11.53 +struct ioctl_gntdev_map_grant_ref {
   11.54 +	/* IN parameters */
   11.55 +	/* The number of grants to be mapped. */
   11.56 +	uint32_t count;
   11.57 +	uint32_t pad;
   11.58 +	/* OUT parameters */
   11.59 +	/* The offset to be used on a subsequent call to mmap(). */
   11.60 +	uint64_t index;
   11.61 +	/* Variable IN parameter. */
   11.62 +	/* Array of grant references, of size @count. */
   11.63 +	struct ioctl_gntdev_grant_ref refs[1];
   11.64 +};
   11.65 +
   11.66 +/*
   11.67 + * Removes the grant references from the mapping table of an instance of
   11.68 + * of gntdev. N.B. munmap() must be called on the relevant virtual address(es)
   11.69 + * before this ioctl is called, or an error will result.
   11.70 + */
   11.71 +#define IOCTL_GNTDEV_UNMAP_GRANT_REF \
   11.72 +_IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))       
   11.73 +struct ioctl_gntdev_unmap_grant_ref {
   11.74 +	/* IN parameters */
   11.75 +	/* The offset was returned by the corresponding map operation. */
   11.76 +	uint64_t index;
   11.77 +	/* The number of pages to be unmapped. */
   11.78 +	uint32_t count;
   11.79 +	uint32_t pad;
   11.80 +};
   11.81 +
   11.82 +/*
   11.83 + * Returns the offset in the driver's address space that corresponds
   11.84 + * to @vaddr. This can be used to perform a munmap(), followed by an
   11.85 + * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by
   11.86 + * the caller. The number of pages that were allocated at the same time as
   11.87 + * @vaddr is returned in @count.
   11.88 + *
   11.89 + * N.B. Where more than one page has been mapped into a contiguous range, the
   11.90 + *      supplied @vaddr must correspond to the start of the range; otherwise
   11.91 + *      an error will result. It is only possible to munmap() the entire
   11.92 + *      contiguously-allocated range at once, and not any subrange thereof.
   11.93 + */
   11.94 +#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
   11.95 +_IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
   11.96 +struct ioctl_gntdev_get_offset_for_vaddr {
   11.97 +	/* IN parameters */
   11.98 +	/* The virtual address of the first mapped page in a range. */
   11.99 +	uint64_t vaddr;
  11.100 +	/* OUT parameters */
  11.101 +	/* The offset that was used in the initial mmap() operation. */
  11.102 +	uint64_t offset;
  11.103 +	/* The number of pages mapped in the VM area that begins at @vaddr. */
  11.104 +	uint32_t count;
  11.105 +	uint32_t pad;
  11.106 +};
  11.107 +
  11.108 +#endif /* __LINUX_PUBLIC_GNTDEV_H__ */
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/tools/include/xen-sys/Linux/privcmd.h	Sat Jan 26 14:42:55 2008 +0000
    12.3 @@ -0,0 +1,79 @@
    12.4 +/******************************************************************************
    12.5 + * privcmd.h
    12.6 + * 
    12.7 + * Interface to /proc/xen/privcmd.
    12.8 + * 
    12.9 + * Copyright (c) 2003-2005, K A Fraser
   12.10 + * 
   12.11 + * This program is free software; you can redistribute it and/or
   12.12 + * modify it under the terms of the GNU General Public License version 2
   12.13 + * as published by the Free Software Foundation; or, when distributed
   12.14 + * separately from the Linux kernel or incorporated into other
   12.15 + * software packages, subject to the following license:
   12.16 + * 
   12.17 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   12.18 + * of this source file (the "Software"), to deal in the Software without
   12.19 + * restriction, including without limitation the rights to use, copy, modify,
   12.20 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   12.21 + * and to permit persons to whom the Software is furnished to do so, subject to
   12.22 + * the following conditions:
   12.23 + * 
   12.24 + * The above copyright notice and this permission notice shall be included in
   12.25 + * all copies or substantial portions of the Software.
   12.26 + * 
   12.27 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   12.28 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   12.29 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   12.30 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   12.31 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   12.32 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   12.33 + * IN THE SOFTWARE.
   12.34 + */
   12.35 +
   12.36 +#ifndef __LINUX_PUBLIC_PRIVCMD_H__
   12.37 +#define __LINUX_PUBLIC_PRIVCMD_H__
   12.38 +
   12.39 +#include <linux/types.h>
   12.40 +
   12.41 +#ifndef __user
   12.42 +#define __user
   12.43 +#endif
   12.44 +
   12.45 +typedef struct privcmd_hypercall
   12.46 +{
   12.47 +	__u64 op;
   12.48 +	__u64 arg[5];
   12.49 +} privcmd_hypercall_t;
   12.50 +
   12.51 +typedef struct privcmd_mmap_entry {
   12.52 +	__u64 va;
   12.53 +	__u64 mfn;
   12.54 +	__u64 npages;
   12.55 +} privcmd_mmap_entry_t; 
   12.56 +
   12.57 +typedef struct privcmd_mmap {
   12.58 +	int num;
   12.59 +	domid_t dom; /* target domain */
   12.60 +	privcmd_mmap_entry_t __user *entry;
   12.61 +} privcmd_mmap_t; 
   12.62 +
   12.63 +typedef struct privcmd_mmapbatch {
   12.64 +	int num;     /* number of pages to populate */
   12.65 +	domid_t dom; /* target domain */
   12.66 +	__u64 addr;  /* virtual address */
   12.67 +	xen_pfn_t __user *arr; /* array of mfns - top nibble set on err */
   12.68 +} privcmd_mmapbatch_t; 
   12.69 +
   12.70 +/*
   12.71 + * @cmd: IOCTL_PRIVCMD_HYPERCALL
   12.72 + * @arg: &privcmd_hypercall_t
   12.73 + * Return: Value returned from execution of the specified hypercall.
   12.74 + */
   12.75 +#define IOCTL_PRIVCMD_HYPERCALL					\
   12.76 +	_IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
   12.77 +#define IOCTL_PRIVCMD_MMAP					\
   12.78 +	_IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
   12.79 +#define IOCTL_PRIVCMD_MMAPBATCH					\
   12.80 +	_IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
   12.81 +
   12.82 +#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/tools/include/xen-sys/NetBSD/evtchn.h	Sat Jan 26 14:42:55 2008 +0000
    13.3 @@ -0,0 +1,89 @@
    13.4 +/* $NetBSD: evtchn.h,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ */
    13.5 +/******************************************************************************
    13.6 + * evtchn.h
    13.7 + * 
    13.8 + * Interface to /dev/xen/evtchn.
    13.9 + * 
   13.10 + * Copyright (c) 2003-2005, K A Fraser
   13.11 + * 
   13.12 + * This file may be distributed separately from the Linux kernel, or
   13.13 + * incorporated into other software packages, subject to the following license:
   13.14 + * 
   13.15 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   13.16 + * of this source file (the "Software"), to deal in the Software without
   13.17 + * restriction, including without limitation the rights to use, copy, modify,
   13.18 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   13.19 + * and to permit persons to whom the Software is furnished to do so, subject to
   13.20 + * the following conditions:
   13.21 + * 
   13.22 + * The above copyright notice and this permission notice shall be included in
   13.23 + * all copies or substantial portions of the Software.
   13.24 + * 
   13.25 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   13.26 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   13.27 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   13.28 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   13.29 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   13.30 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   13.31 + * IN THE SOFTWARE.
   13.32 + */
   13.33 +
   13.34 +#ifndef __NetBSD_EVTCHN_H__
   13.35 +#define __NetBSD_EVTCHN_H__
   13.36 +
   13.37 +/*
   13.38 + * Bind a fresh port to VIRQ @virq.
   13.39 + * Return allocated port.
   13.40 + */
   13.41 +#define IOCTL_EVTCHN_BIND_VIRQ				\
   13.42 +	_IOWR('E', 4, struct ioctl_evtchn_bind_virq)
   13.43 +struct ioctl_evtchn_bind_virq {
   13.44 +	unsigned int virq;
   13.45 +	unsigned int port;
   13.46 +};
   13.47 +
   13.48 +/*
   13.49 + * Bind a fresh port to remote <@remote_domain, @remote_port>.
   13.50 + * Return allocated port.
   13.51 + */
   13.52 +#define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
   13.53 +	_IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
   13.54 +struct ioctl_evtchn_bind_interdomain {
   13.55 +	unsigned int remote_domain, remote_port;
   13.56 +	unsigned int port;
   13.57 +};
   13.58 +
   13.59 +/*
   13.60 + * Allocate a fresh port for binding to @remote_domain.
   13.61 + * Return allocated port.
   13.62 + */
   13.63 +#define IOCTL_EVTCHN_BIND_UNBOUND_PORT			\
   13.64 +	_IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
   13.65 +struct ioctl_evtchn_bind_unbound_port {
   13.66 +	unsigned int remote_domain;
   13.67 +	unsigned int port;
   13.68 +};
   13.69 +
   13.70 +/*
   13.71 + * Unbind previously allocated @port.
   13.72 + */
   13.73 +#define IOCTL_EVTCHN_UNBIND				\
   13.74 +	_IOW('E', 7, struct ioctl_evtchn_unbind)
   13.75 +struct ioctl_evtchn_unbind {
   13.76 +	unsigned int port;
   13.77 +};
   13.78 +
   13.79 +/*
   13.80 + * Send event to previously allocated @port.
   13.81 + */
   13.82 +#define IOCTL_EVTCHN_NOTIFY				\
   13.83 +	_IOW('E', 8, struct ioctl_evtchn_notify)
   13.84 +struct ioctl_evtchn_notify {
   13.85 +	unsigned int port;
   13.86 +};
   13.87 +
   13.88 +/* Clear and reinitialise the event buffer. Clear error condition. */
   13.89 +#define IOCTL_EVTCHN_RESET				\
   13.90 +	_IO('E', 9)
   13.91 +
   13.92 +#endif /* __NetBSD_EVTCHN_H__ */
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/tools/include/xen-sys/NetBSD/privcmd.h	Sat Jan 26 14:42:55 2008 +0000
    14.3 @@ -0,0 +1,105 @@
    14.4 +/*	NetBSD: xenio.h,v 1.3 2005/05/24 12:07:12 yamt Exp $	*/
    14.5 +
    14.6 +/******************************************************************************
    14.7 + * privcmd.h
    14.8 + * 
    14.9 + * Copyright (c) 2003-2004, K A Fraser
   14.10 + * 
   14.11 + * This file may be distributed separately from the Linux kernel, or
   14.12 + * incorporated into other software packages, subject to the following license:
   14.13 + * 
   14.14 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   14.15 + * of this source file (the "Software"), to deal in the Software without
   14.16 + * restriction, including without limitation the rights to use, copy, modify,
   14.17 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   14.18 + * and to permit persons to whom the Software is furnished to do so, subject to
   14.19 + * the following conditions:
   14.20 + * 
   14.21 + * The above copyright notice and this permission notice shall be included in
   14.22 + * all copies or substantial portions of the Software.
   14.23 + * 
   14.24 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   14.25 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   14.26 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   14.27 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   14.28 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   14.29 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   14.30 + * IN THE SOFTWARE.
   14.31 + */
   14.32 +
   14.33 +#ifndef __NetBSD_PRIVCMD_H__
   14.34 +#define __NetBSD_PRIVCMD_H__
   14.35 +
   14.36 +/* Interface to /proc/xen/privcmd */
   14.37 +
   14.38 +typedef struct privcmd_hypercall
   14.39 +{
   14.40 +    unsigned long op;
   14.41 +    unsigned long arg[5];
   14.42 +} privcmd_hypercall_t;
   14.43 +
   14.44 +typedef struct privcmd_mmap_entry {
   14.45 +    unsigned long va;
   14.46 +    unsigned long mfn;
   14.47 +    unsigned long npages;
   14.48 +} privcmd_mmap_entry_t; 
   14.49 +
   14.50 +typedef struct privcmd_mmap {
   14.51 +    int num;
   14.52 +    domid_t dom; /* target domain */
   14.53 +    privcmd_mmap_entry_t *entry;
   14.54 +} privcmd_mmap_t; 
   14.55 +
   14.56 +typedef struct privcmd_mmapbatch {
   14.57 +    int num;     /* number of pages to populate */
   14.58 +    domid_t dom; /* target domain */
   14.59 +    unsigned long addr;  /* virtual address */
   14.60 +    unsigned long *arr; /* array of mfns - top nibble set on err */
   14.61 +} privcmd_mmapbatch_t; 
   14.62 +
   14.63 +typedef struct privcmd_blkmsg
   14.64 +{
   14.65 +    unsigned long op;
   14.66 +    void         *buf;
   14.67 +    int           buf_size;
   14.68 +} privcmd_blkmsg_t;
   14.69 +
   14.70 +/*
   14.71 + * @cmd: IOCTL_PRIVCMD_HYPERCALL
   14.72 + * @arg: &privcmd_hypercall_t
   14.73 + * Return: Value returned from execution of the specified hypercall.
   14.74 + */
   14.75 +#define IOCTL_PRIVCMD_HYPERCALL         \
   14.76 +    _IOWR('P', 0, privcmd_hypercall_t)
   14.77 +
   14.78 +#if defined(_KERNEL)
   14.79 +/* compat */
   14.80 +#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD \
   14.81 +    _IO('P', 1)
   14.82 +#endif /* defined(_KERNEL) */
   14.83 +    
   14.84 +#define IOCTL_PRIVCMD_MMAP             \
   14.85 +    _IOW('P', 2, privcmd_mmap_t)
   14.86 +#define IOCTL_PRIVCMD_MMAPBATCH        \
   14.87 +    _IOW('P', 3, privcmd_mmapbatch_t)
   14.88 +#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
   14.89 +    _IOR('P', 4, unsigned long)
   14.90 +
   14.91 +/*
   14.92 + * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
   14.93 + * @arg: n/a
   14.94 + * Return: Port associated with domain-controller end of control event channel
   14.95 + *         for the initial domain.
   14.96 + */
   14.97 +#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
   14.98 +    _IOR('P', 5, int)
   14.99 +
  14.100 +/* Interface to /dev/xenevt */
  14.101 +/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */
  14.102 +#define EVTCHN_RESET  _IO('E', 1)
  14.103 +/* EVTCHN_BIND: Bind to the specified event-channel port. */
  14.104 +#define EVTCHN_BIND   _IOW('E', 2, unsigned long)
  14.105 +/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
  14.106 +#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
  14.107 +
  14.108 +#endif /* __NetBSD_PRIVCMD_H__ */
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/tools/include/xen-sys/SunOS/evtchn.h	Sat Jan 26 14:42:55 2008 +0000
    15.3 @@ -0,0 +1,94 @@
    15.4 +/******************************************************************************
    15.5 + * evtchn.h
    15.6 + * 
    15.7 + * Interface to /dev/xen/evtchn.
    15.8 + * 
    15.9 + * Copyright (c) 2003-2005, K A Fraser
   15.10 + * 
   15.11 + * This file may be distributed separately from the Linux kernel, or
   15.12 + * incorporated into other software packages, subject to the following license:
   15.13 + * 
   15.14 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   15.15 + * of this source file (the "Software"), to deal in the Software without
   15.16 + * restriction, including without limitation the rights to use, copy, modify,
   15.17 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   15.18 + * and to permit persons to whom the Software is furnished to do so, subject to
   15.19 + * the following conditions:
   15.20 + * 
   15.21 + * The above copyright notice and this permission notice shall be included in
   15.22 + * all copies or substantial portions of the Software.
   15.23 + * 
   15.24 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   15.25 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   15.26 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   15.27 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   15.28 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   15.29 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   15.30 + * IN THE SOFTWARE.
   15.31 + */
   15.32 +
   15.33 +#ifndef _XEN_SYS_EVTCHN_H
   15.34 +#define _XEN_SYS_EVTCHN_H
   15.35 +
   15.36 +#define	_IOC_NONE	0
   15.37 +#define	_IOC(flag, letter, inum, size)	((letter) << 8 | (inum))
   15.38 +
   15.39 +/*
   15.40 + * Bind a fresh port to VIRQ @virq.
   15.41 + * Return allocated port.
   15.42 + */
   15.43 +#define IOCTL_EVTCHN_BIND_VIRQ				\
   15.44 +	_IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
   15.45 +struct ioctl_evtchn_bind_virq {
   15.46 +	unsigned int virq;
   15.47 +};
   15.48 +
   15.49 +/*
   15.50 + * Bind a fresh port to remote <@remote_domain, @remote_port>.
   15.51 + * Return allocated port.
   15.52 + */
   15.53 +#define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
   15.54 +	_IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
   15.55 +struct ioctl_evtchn_bind_interdomain {
   15.56 +	unsigned int remote_domain, remote_port;
   15.57 +};
   15.58 +
   15.59 +/*
   15.60 + * Allocate a fresh port for binding to @remote_domain.
   15.61 + * Return allocated port.
   15.62 + */
   15.63 +#define IOCTL_EVTCHN_BIND_UNBOUND_PORT                  \
   15.64 +        _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
   15.65 +struct ioctl_evtchn_bind_unbound_port {
   15.66 +        unsigned int remote_domain;
   15.67 +};
   15.68 +
   15.69 +/*
   15.70 + * Unbind previously allocated @port.
   15.71 + */
   15.72 +#define IOCTL_EVTCHN_UNBIND				\
   15.73 +	_IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
   15.74 +struct ioctl_evtchn_unbind {
   15.75 +	unsigned int port;
   15.76 +};
   15.77 +
   15.78 +/*
   15.79 + * Notify the given @port.
   15.80 + */
   15.81 +#define IOCTL_EVTCHN_NOTIFY				\
   15.82 +	_IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
   15.83 +struct ioctl_evtchn_notify {
   15.84 +	unsigned int port;
   15.85 +};
   15.86 +
   15.87 +#endif /* _XEN_SYS_EVTCHN_H */
   15.88 +
   15.89 +/*
   15.90 + * Local variables:
   15.91 + *  c-file-style: "solaris"
   15.92 + *  indent-tabs-mode: t
   15.93 + *  c-indent-level: 8
   15.94 + *  c-basic-offset: 8
   15.95 + *  tab-width: 8
   15.96 + * End:
   15.97 + */
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/tools/include/xen-sys/SunOS/privcmd.h	Sat Jan 26 14:42:55 2008 +0000
    16.3 @@ -0,0 +1,85 @@
    16.4 +/*
    16.5 + * Copyright (c) 2003-2005, K A Fraser
    16.6 + *
    16.7 + * This file may be distributed separately from the Linux kernel, or
    16.8 + * incorporated into other software packages, subject to the following license:
    16.9 + *
   16.10 + * Permission is hereby granted, free of charge, to any person obtaining a copy
   16.11 + * of this source file (the "Software"), to deal in the Software without
   16.12 + * restriction, including without limitation the rights to use, copy, modify,
   16.13 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   16.14 + * and to permit persons to whom the Software is furnished to do so, subject to
   16.15 + * the following conditions:
   16.16 + *
   16.17 + * The above copyright notice and this permission notice shall be included in
   16.18 + * all copies or substantial portions of the Software.
   16.19 + *
   16.20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   16.21 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   16.22 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   16.23 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   16.24 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   16.25 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   16.26 + * IN THE SOFTWARE.
   16.27 + */
   16.28 +
   16.29 +/*
   16.30 + * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
   16.31 + * Use is subject to license terms.
   16.32 + */
   16.33 +
   16.34 +#ifndef	_XEN_SYS_PRIVCMD_H
   16.35 +#define	_XEN_SYS_PRIVCMD_H
   16.36 +
   16.37 +/*
   16.38 + * WARNING:
   16.39 + *	These numbers and structure are built into the ON privcmd
   16.40 + *	driver, as well as the low-level tools and libraries in
   16.41 + *	the Xen consolidation.
   16.42 + */
   16.43 +
   16.44 +#include <sys/types.h>
   16.45 +
   16.46 +#ifdef __cplusplus
   16.47 +extern "C" {
   16.48 +#endif
   16.49 +
   16.50 +/*
   16.51 + * ioctl numbers and corresponding data structures
   16.52 + */
   16.53 +
   16.54 +#define	__PRIVCMD_IOC			(('p'<<24)|('r'<<16)|('v'<<8))
   16.55 +
   16.56 +#define	IOCTL_PRIVCMD_HYPERCALL		(__PRIVCMD_IOC|0)
   16.57 +#define	IOCTL_PRIVCMD_MMAP		(__PRIVCMD_IOC|1)
   16.58 +#define	IOCTL_PRIVCMD_MMAPBATCH		(__PRIVCMD_IOC|2)
   16.59 +
   16.60 +typedef struct __privcmd_hypercall {
   16.61 +	unsigned long op;
   16.62 +	unsigned long arg[5];
   16.63 +} privcmd_hypercall_t;
   16.64 +
   16.65 +typedef struct __privcmd_mmap_entry {
   16.66 +	unsigned long va;
   16.67 +	unsigned long mfn;
   16.68 +	unsigned long npages;
   16.69 +} privcmd_mmap_entry_t;
   16.70 +
   16.71 +typedef struct __privcmd_mmap {
   16.72 +	int num;
   16.73 +	domid_t dom;	/* target domain */
   16.74 +	privcmd_mmap_entry_t *entry;
   16.75 +} privcmd_mmap_t;
   16.76 +
   16.77 +typedef struct __privcmd_mmapbatch {
   16.78 +	int num;	/* number of pages to populate */
   16.79 +	domid_t dom;	/* target domain */
   16.80 +	unsigned long addr;	  /* virtual address */
   16.81 +	unsigned long *arr;	  /* array of mfns - top nibble set on err */
   16.82 +} privcmd_mmapbatch_t;
   16.83 +
   16.84 +#ifdef __cplusplus
   16.85 +}
   16.86 +#endif
   16.87 +
   16.88 +#endif /* _XEN_SYS_PRIVCMD_H */
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/tools/include/xen-sys/SunOS/xenbus.h	Sat Jan 26 14:42:55 2008 +0000
    17.3 @@ -0,0 +1,42 @@
    17.4 +/*
    17.5 + * This file may be distributed separately from the Linux kernel, or
    17.6 + * incorporated into other software packages, subject to the following license:
    17.7 + * 
    17.8 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    17.9 + * of this source file (the "Software"), to deal in the Software without
   17.10 + * restriction, including without limitation the rights to use, copy, modify,
   17.11 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
   17.12 + * and to permit persons to whom the Software is furnished to do so, subject to
   17.13 + * the following conditions:
   17.14 + * 
   17.15 + * The above copyright notice and this permission notice shall be included in
   17.16 + * all copies or substantial portions of the Software.
   17.17 + * 
   17.18 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   17.19 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   17.20 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   17.21 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   17.22 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   17.23 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   17.24 + * IN THE SOFTWARE.
   17.25 + */
   17.26 +
   17.27 +/*
   17.28 + * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
   17.29 + * Use is subject to license terms.
   17.30 + */
   17.31 +
   17.32 +#ifndef _XEN_SYS_XENBUS_H
   17.33 +#define _XEN_SYS_XENBUS_H
   17.34 +
   17.35 +/*
   17.36 + * Return the xenstore event channel.
   17.37 + */
   17.38 +#define	IOCTL_XENBUS_XENSTORE_EVTCHN ('X' << 8)
   17.39 +
   17.40 +/*
   17.41 + * Notify the kernel that the xenstore is up and running
   17.42 + */
   17.43 +#define	IOCTL_XENBUS_NOTIFY_UP ('U' << 8)
   17.44 +
   17.45 +#endif /* _XEN_SYS_XENBUS_H */