blob: 08e452de15bd7f582d61286bbf7681642e4f777e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/******************************************************************************
* proc_cmd.h
*
* Interface to /proc/cmd and /proc/xen/privcmd.
*/
#ifndef __PROC_CMD_H__
#define __PROC_CMD_H__
typedef struct privcmd_hypercall
{
unsigned long op;
unsigned long arg[5];
} privcmd_hypercall_t;
typedef struct privcmd_mmap_entry {
unsigned long va;
unsigned long mfn;
unsigned long npages;
} privcmd_mmap_entry_t;
typedef struct privcmd_mmap {
int num;
domid_t dom; /* target domain */
privcmd_mmap_entry_t *entry;
} privcmd_mmap_t;
typedef struct privcmd_mmapbatch {
int num; // number of pages to populate
domid_t dom; // target domain
unsigned long addr; // virtual address
unsigned long *arr; // array of mfns - top nibble set on err
} privcmd_mmapbatch_t;
typedef struct privcmd_blkmsg
{
unsigned long op;
void *buf;
int buf_size;
} privcmd_blkmsg_t;
/*
* @cmd: IOCTL_PRIVCMD_HYPERCALL
* @arg: &privcmd_hypercall_t
* Return: Value returned from execution of the specified hypercall.
*/
#define IOCTL_PRIVCMD_HYPERCALL \
_IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t))
/*
* @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
* @arg: n/a
* Return: Port associated with domain-controller end of control event channel
* for the initial domain.
*/
#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
_IOC(_IOC_NONE, 'P', 1, 0)
#define IOCTL_PRIVCMD_MMAP \
_IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t))
#define IOCTL_PRIVCMD_MMAPBATCH \
_IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmapbatch_t))
#endif /* __PROC_CMD_H__ */
|