ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h @ 8534:da7873110bbb

Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jan 09 19:46:46 2006 +0100 (2006-01-09)
parents c3cfc4ff3b08
children
line source
1 /******************************************************************************
2 * privcmd.h
3 *
4 * Interface to /proc/xen/privcmd.
5 *
6 * Copyright (c) 2003-2005, K A Fraser
7 *
8 * This file may be distributed separately from the Linux kernel, or
9 * incorporated into other software packages, subject to the following license:
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this source file (the "Software"), to deal in the Software without
13 * restriction, including without limitation the rights to use, copy, modify,
14 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
15 * and to permit persons to whom the Software is furnished to do so, subject to
16 * the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
27 * IN THE SOFTWARE.
28 */
30 #ifndef __LINUX_PUBLIC_PRIVCMD_H__
31 #define __LINUX_PUBLIC_PRIVCMD_H__
33 #ifndef __user
34 #define __user
35 #endif
37 typedef struct privcmd_hypercall
38 {
39 unsigned long op;
40 unsigned long arg[5];
41 } privcmd_hypercall_t;
43 typedef struct privcmd_mmap_entry {
44 unsigned long va;
45 unsigned long mfn;
46 unsigned long npages;
47 } privcmd_mmap_entry_t;
49 typedef struct privcmd_mmap {
50 int num;
51 domid_t dom; /* target domain */
52 privcmd_mmap_entry_t __user *entry;
53 } privcmd_mmap_t;
55 typedef struct privcmd_mmapbatch {
56 int num; /* number of pages to populate */
57 domid_t dom; /* target domain */
58 unsigned long addr; /* virtual address */
59 unsigned long __user *arr; /* array of mfns - top nibble set on err */
60 } privcmd_mmapbatch_t;
62 typedef struct privcmd_blkmsg
63 {
64 unsigned long op;
65 void *buf;
66 int buf_size;
67 } privcmd_blkmsg_t;
69 /*
70 * @cmd: IOCTL_PRIVCMD_HYPERCALL
71 * @arg: &privcmd_hypercall_t
72 * Return: Value returned from execution of the specified hypercall.
73 */
74 #define IOCTL_PRIVCMD_HYPERCALL \
75 _IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
76 #define IOCTL_PRIVCMD_MMAP \
77 _IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
78 #define IOCTL_PRIVCMD_MMAPBATCH \
79 _IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
81 #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
83 /*
84 * Local variables:
85 * c-file-style: "linux"
86 * indent-tabs-mode: t
87 * c-indent-level: 8
88 * c-basic-offset: 8
89 * tab-width: 8
90 * End:
91 */