ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h @ 6689:7d0fb56b4a91

merge?
author cl349@firebug.cl.cam.ac.uk
date Wed Sep 07 19:01:31 2005 +0000 (2005-09-07)
parents 549f4256ab3c dd668f7527cb
children b2f4823b6ff0 b35215021b32 9af349b055e5 3233e7ecfa9f
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 #define IOCTL_PRIVCMD_MMAP \
74 _IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
75 #define IOCTL_PRIVCMD_MMAPBATCH \
76 _IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
77 #define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
78 _IOC(_IOC_READ, 'P', 4, sizeof(unsigned long))
79 #define IOCTL_PRIVCMD_INITDOMAIN_STORE \
80 _IOC(_IOC_READ, 'P', 5, 0)
82 #endif /* __PRIVCMD_H__ */