direct-io.hg

view linux-2.6.9-xen-sparse/include/asm-xen/linux-public/privcmd.h @ 2821:724449a888fe

bitkeeper revision 1.1159.1.332 (41874e954CLIDA2J3phVFD2RnzVTpA)

Clean up public XenLinux header files. Now accessible from userspace as
#include <xen/linux...>
Got rid of the linux-xen-sparse symlink as it's no longer needed.
author kaf24@freefall.cl.cam.ac.uk
date Tue Nov 02 09:08:37 2004 +0000 (2004-11-02)
parents
children
line source
1 /******************************************************************************
2 * privcmd.h
3 *
4 * Interface to /proc/xen/privcmd.
5 *
6 * Copyright (c) 2003-2004, 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 __PRIVCMD_H__
31 #define __PRIVCMD_H__
33 typedef struct privcmd_hypercall
34 {
35 unsigned long op;
36 unsigned long arg[5];
37 } privcmd_hypercall_t;
39 typedef struct privcmd_mmap_entry {
40 unsigned long va;
41 unsigned long mfn;
42 unsigned long npages;
43 } privcmd_mmap_entry_t;
45 typedef struct privcmd_mmap {
46 int num;
47 domid_t dom; /* target domain */
48 privcmd_mmap_entry_t *entry;
49 } privcmd_mmap_t;
51 typedef struct privcmd_mmapbatch {
52 int num; /* number of pages to populate */
53 domid_t dom; /* target domain */
54 unsigned long addr; /* virtual address */
55 unsigned long *arr; /* array of mfns - top nibble set on err */
56 } privcmd_mmapbatch_t;
58 typedef struct privcmd_blkmsg
59 {
60 unsigned long op;
61 void *buf;
62 int buf_size;
63 } privcmd_blkmsg_t;
65 /*
66 * @cmd: IOCTL_PRIVCMD_HYPERCALL
67 * @arg: &privcmd_hypercall_t
68 * Return: Value returned from execution of the specified hypercall.
69 */
70 #define IOCTL_PRIVCMD_HYPERCALL \
71 _IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
73 /*
74 * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
75 * @arg: n/a
76 * Return: Port associated with domain-controller end of control event channel
77 * for the initial domain.
78 */
79 #define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
80 _IOC(_IOC_NONE, 'P', 1, 0)
81 #define IOCTL_PRIVCMD_MMAP \
82 _IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
83 #define IOCTL_PRIVCMD_MMAPBATCH \
84 _IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
85 #define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
86 _IOC(_IOC_READ, 'P', 4, sizeof(unsigned long))
88 #endif /* __PRIVCMD_H__ */