diff options
Diffstat (limited to 'include/xen/privcmd.h')
-rw-r--r-- | include/xen/privcmd.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/xen/privcmd.h b/include/xen/privcmd.h index 45c1aa14b83d..a85316811d79 100644 --- a/include/xen/privcmd.h +++ b/include/xen/privcmd.h | |||
@@ -58,13 +58,33 @@ struct privcmd_mmapbatch { | |||
58 | int num; /* number of pages to populate */ | 58 | int num; /* number of pages to populate */ |
59 | domid_t dom; /* target domain */ | 59 | domid_t dom; /* target domain */ |
60 | __u64 addr; /* virtual address */ | 60 | __u64 addr; /* virtual address */ |
61 | xen_pfn_t __user *arr; /* array of mfns - top nibble set on err */ | 61 | xen_pfn_t __user *arr; /* array of mfns - or'd with |
62 | PRIVCMD_MMAPBATCH_*_ERROR on err */ | ||
63 | }; | ||
64 | |||
65 | #define PRIVCMD_MMAPBATCH_MFN_ERROR 0xf0000000U | ||
66 | #define PRIVCMD_MMAPBATCH_PAGED_ERROR 0x80000000U | ||
67 | |||
68 | struct privcmd_mmapbatch_v2 { | ||
69 | unsigned int num; /* number of pages to populate */ | ||
70 | domid_t dom; /* target domain */ | ||
71 | __u64 addr; /* virtual address */ | ||
72 | const xen_pfn_t __user *arr; /* array of mfns */ | ||
73 | int __user *err; /* array of error codes */ | ||
62 | }; | 74 | }; |
63 | 75 | ||
64 | /* | 76 | /* |
65 | * @cmd: IOCTL_PRIVCMD_HYPERCALL | 77 | * @cmd: IOCTL_PRIVCMD_HYPERCALL |
66 | * @arg: &privcmd_hypercall_t | 78 | * @arg: &privcmd_hypercall_t |
67 | * Return: Value returned from execution of the specified hypercall. | 79 | * Return: Value returned from execution of the specified hypercall. |
80 | * | ||
81 | * @cmd: IOCTL_PRIVCMD_MMAPBATCH_V2 | ||
82 | * @arg: &struct privcmd_mmapbatch_v2 | ||
83 | * Return: 0 on success (i.e., arg->err contains valid error codes for | ||
84 | * each frame). On an error other than a failed frame remap, -1 is | ||
85 | * returned and errno is set to EINVAL, EFAULT etc. As an exception, | ||
86 | * if the operation was otherwise successful but any frame failed with | ||
87 | * -ENOENT, then -1 is returned and errno is set to ENOENT. | ||
68 | */ | 88 | */ |
69 | #define IOCTL_PRIVCMD_HYPERCALL \ | 89 | #define IOCTL_PRIVCMD_HYPERCALL \ |
70 | _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall)) | 90 | _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall)) |
@@ -72,5 +92,7 @@ struct privcmd_mmapbatch { | |||
72 | _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap)) | 92 | _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap)) |
73 | #define IOCTL_PRIVCMD_MMAPBATCH \ | 93 | #define IOCTL_PRIVCMD_MMAPBATCH \ |
74 | _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch)) | 94 | _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch)) |
95 | #define IOCTL_PRIVCMD_MMAPBATCH_V2 \ | ||
96 | _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) | ||
75 | 97 | ||
76 | #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ | 98 | #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ |