1 /******************************************************************************
4 * Interface to /proc/xen/privcmd.
6 * Copyright (c) 2003-2004, K A Fraser
8 * This file may be distributed separately from the Linux kernel, or
9 * incorporated into other software packages, subject to the following license:
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:
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
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
33 typedef struct privcmd_hypercall
37 } privcmd_hypercall_t;
39 typedef struct privcmd_mmap_entry {
43 } privcmd_mmap_entry_t;
45 typedef struct privcmd_mmap {
47 domid_t dom; /* target domain */
48 privcmd_mmap_entry_t *entry;
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
66 * @cmd: IOCTL_PRIVCMD_HYPERCALL
67 * @arg: &privcmd_hypercall_t
68 * Return: Value returned from execution of the specified hypercall.
70 #define IOCTL_PRIVCMD_HYPERCALL \
71 _IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
74 * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
76 * Return: Port associated with domain-controller end of control event channel
77 * for the initial domain.
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__ */