ia64/xen-unstable

view tools/include/SunOS/privcmd.h @ 15315:de47ca8be7fe

Include Solaris kernel headers

Add the Solaris kernel headers used be the userspace tools to the
distribution. The same setup as used by Linux is taken. We modify the
Linux kernel headers to also install in /usr/include/xen/sys/ -
without a kernel-neutral path, it can make using the headers very
difficult, and encourages errors.

Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Mon Jun 11 15:50:35 2007 +0100 (2007-06-11)
parents
children
line source
1 /*
2 * Copyright (c) 2003-2005, K A Fraser
3 *
4 * This file may be distributed separately from the Linux kernel, or
5 * incorporated into other software packages, subject to the following license:
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this source file (the "Software"), to deal in the Software without
9 * restriction, including without limitation the rights to use, copy, modify,
10 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
11 * and to permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23 * IN THE SOFTWARE.
24 */
26 /*
27 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
31 #ifndef _XEN_SYS_PRIVCMD_H
32 #define _XEN_SYS_PRIVCMD_H
34 /*
35 * WARNING:
36 * These numbers and structure are built into the ON privcmd
37 * driver, as well as the low-level tools and libraries in
38 * the Xen consolidation.
39 */
41 #include <sys/types.h>
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
47 /*
48 * ioctl numbers and corresponding data structures
49 */
51 #define __PRIVCMD_IOC (('p'<<24)|('r'<<16)|('v'<<8))
53 #define IOCTL_PRIVCMD_HYPERCALL (__PRIVCMD_IOC|0)
54 #define IOCTL_PRIVCMD_MMAP (__PRIVCMD_IOC|1)
55 #define IOCTL_PRIVCMD_MMAPBATCH (__PRIVCMD_IOC|2)
57 typedef struct __privcmd_hypercall {
58 unsigned long op;
59 unsigned long arg[5];
60 } privcmd_hypercall_t;
62 typedef struct __privcmd_mmap_entry {
63 unsigned long va;
64 unsigned long mfn;
65 unsigned long npages;
66 } privcmd_mmap_entry_t;
68 typedef struct __privcmd_mmap {
69 int num;
70 domid_t dom; /* target domain */
71 privcmd_mmap_entry_t *entry;
72 } privcmd_mmap_t;
74 typedef struct __privcmd_mmapbatch {
75 int num; /* number of pages to populate */
76 domid_t dom; /* target domain */
77 unsigned long addr; /* virtual address */
78 unsigned long *arr; /* array of mfns - top nibble set on err */
79 } privcmd_mmapbatch_t;
81 #ifdef __cplusplus
82 }
83 #endif
85 #endif /* _XEN_SYS_PRIVCMD_H */